public class ImageSequenceViewer extends Object
setPosition(int). When the position is changed, the positionChanged()
method is called. Subclasses should override this method to update the image according to the new position.| Constructor and Description |
|---|
ImageSequenceViewer(int number)
Creates a new sequence viewer that can display the specified number of images.
|
ImageSequenceViewer(int number,
int startPos)
Creates a new sequence viewer that can display the specified number of images.
|
| Modifier and Type | Method and Description |
|---|---|
protected JComponent |
createLocationDefinition()
Creates and returns the component that displays the current position to the user.
|
JComponent |
getComponent()
Returns the Swing component for this sequence viewer.
|
ImageViewer |
getImageViewer() |
int |
getPosition()
Returns the current position of this image sequence shower.
|
protected void |
positionChanged()
Called when the current position of the viewer has changed.
|
void |
setPosition(int pos)
Sets the position of the viewer.
|
protected void |
updateLocationDefinition(int pos)
Called when the current position changes to update the location component.
|
public ImageSequenceViewer(int number)
number - the number of imagesIllegalArgumentException - if the number is negativepublic ImageSequenceViewer(int number,
int startPos)
number - the number of imagesstartPos - the initial position of the viewerIllegalArgumentException - if the number is negative or the starting position is not validpublic JComponent getComponent()
protected void positionChanged()
This method is not called from the constructor, but it is called before the viewer is made visible, so subclasses can safely use this method to set the initial image.
public ImageViewer getImageViewer()
public void setPosition(int pos)
pos - the new position of the viewerIllegalArgumentException - if the position is not validpublic int getPosition()
protected JComponent createLocationDefinition()
JLabel.protected void updateLocationDefinition(int pos)
pos - the current positionCopyright © 2012. All Rights Reserved.