Top Fields Constructors Methods
org.apache.pdfbox.debugger.streampane

pack-priv Class StreamImageView

extends Object
implements ActionListener, AncestorListener
Class Inheritance
All Implemented Interfaces
javax.swing.event.AncestorListener, java.util.EventListener, java.awt.event.ActionListener
Imports
java.awt.Color, .Component, .Dimension, .GraphicsEnvironment, .Image, java.awt.event.ActionEvent, .ActionListener, java.awt.geom.AffineTransform, java.awt.image.BufferedImage, javax.swing.Box, .BoxLayout, .JComponent, .JLabel, .JPanel, .JScrollPane, javax.swing.border.LineBorder, javax.swing.event.AncestorEvent, .AncestorListener, org.apache.pdfbox.debugger.ui.HighResolutionImageIcon, .ImageUtil, .RotationMenu, .ZoomMenu

Author
Khyrul Bashar A class that provides the container for the image in case of image showing in stream pane.

Field Summary

Modifier and TypeField and Description
private final BufferedImage
private JLabel
private RotationMenu
private JScrollPane
private ZoomMenu

Constructor Summary

AccessConstructor and Description
pack-priv
StreamImageView(BufferedImage
instance of BufferedImage.
image
)

constructor.

Method Summary

Modifier and TypeMethod and Description
public void
actionPerformed(ActionEvent
the event to be processed
actionEvent
)

Implements java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

private void
public void
ancestorAdded(AncestorEvent
an AncestorEvent signifying a change in an ancestor-component's display-status
ancestorEvent
)

Implements javax.swing.event.AncestorListener.ancestorAdded.

Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy.

public void
ancestorMoved(AncestorEvent
an AncestorEvent signifying a change in an ancestor-component's display-status
ancestorEvent
)

Implements javax.swing.event.AncestorListener.ancestorMoved.

Called when either the source or one of its ancestors is moved.

public void
ancestorRemoved(AncestorEvent
an AncestorEvent signifying a change in an ancestor-component's display-status
ancestorEvent
)

Implements javax.swing.event.AncestorListener.ancestorRemoved.

Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being removed from the component hierarchy.

pack-priv JComponent

Returns:

A JComponent instance.
getView
()

Returns the view i.e container containing image.

private void
private Image
zoomImage(BufferedImage origin, float scale, int rotation)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

imageback to summary
private final BufferedImage image
labelback to summary
private JLabel label
rotationMenuback to summary
private RotationMenu rotationMenu
scrollPaneback to summary
private JScrollPane scrollPane
zoomMenuback to summary
private ZoomMenu zoomMenu

Constructor Detail

StreamImageViewback to summary
pack-priv StreamImageView(BufferedImage image)

constructor.

Parameters
image:BufferedImage

instance of BufferedImage.

Method Detail

actionPerformedback to summary
public void actionPerformed(ActionEvent actionEvent)

Implements java.awt.event.ActionListener.actionPerformed.

Doc from java.awt.event.ActionListener.actionPerformed.

Invoked when an action occurs.

Parameters
actionEvent:ActionEvent

the event to be processed

Annotations
@Override
addImageback to summary
private void addImage(Image img)
ancestorAddedback to summary
public void ancestorAdded(AncestorEvent ancestorEvent)

Implements javax.swing.event.AncestorListener.ancestorAdded.

Doc from javax.swing.event.AncestorListener.ancestorAdded.

Called when the source or one of its ancestors is made visible either by setVisible(true) being called or by its being added to the component hierarchy. The method is only called if the source has actually become visible. For this to be true all its parents must be visible and it must be in a hierarchy rooted at a Window

Parameters
ancestorEvent:AncestorEvent

an AncestorEvent signifying a change in an ancestor-component's display-status

Annotations
@Override
ancestorMovedback to summary
public void ancestorMoved(AncestorEvent ancestorEvent)

Implements javax.swing.event.AncestorListener.ancestorMoved.

Doc from javax.swing.event.AncestorListener.ancestorMoved.

Called when either the source or one of its ancestors is moved.

Parameters
ancestorEvent:AncestorEvent

an AncestorEvent signifying a change in an ancestor-component's display-status

Annotations
@Override
ancestorRemovedback to summary
public void ancestorRemoved(AncestorEvent ancestorEvent)

Implements javax.swing.event.AncestorListener.ancestorRemoved.

Doc from javax.swing.event.AncestorListener.ancestorRemoved.

Called when the source or one of its ancestors is made invisible either by setVisible(false) being called or by its being removed from the component hierarchy. The method is only called if the source has actually become invisible. For this to be true at least one of its parents must by invisible or it is not in a hierarchy rooted at a Window

Parameters
ancestorEvent:AncestorEvent

an AncestorEvent signifying a change in an ancestor-component's display-status

Annotations
@Override
getViewback to summary
pack-priv JComponent getView()

Returns the view i.e container containing image.

Returns:JComponent

A JComponent instance.

initUIback to summary
private void initUI()
zoomImageback to summary
private Image zoomImage(BufferedImage origin, float scale, int rotation)