public class IlvZoomOutAction extends IlvAction
IlvZoomOutAction
class implements an action that will
zoom out on a specified IlvTimeScrollable
.
Typically, this will be an IlvHierarchyChart
.
When an IlvZoomOutAction
is created, it registers an
internal, private event listener with the IlvTimeScrollable
so that the action can automatically enable and disable itself
appropriately. If, at a later time, you want to remove the
IlvZoomOutAction
from the user interface and have it
garbage-collected, you will need to explicitly call the
removeFromTimeScrollable()
method.changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
IlvZoomOutAction(IlvTimeScrollable timeScrollable,
String name,
Icon icon,
KeyStroke accelerator,
String shortDescription,
String longDescription)
Creates an
IlvZoomOutAction for the specified
IlvTimeScrollable object. |
IlvZoomOutAction(IlvTimeScrollable timeScrollable,
String name,
KeyStroke accelerator,
String shortDescription,
String longDescription)
Creates an
IlvZoomOutAction for the specified
IlvTimeScrollable object with a default icon. |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent event)
Performs the zoom out action on the
IlvTimeScrollable object. |
double |
getZoomFactor()
Returns the zoom factor.
|
void |
perform()
Performs the zoom out action on the
IlvTimeScrollable object. |
void |
removeFromTimeScrollable()
Removes this action as a registered observer of its
IlvTimeScrollable object. |
void |
setZoomFactor(double zoomFactor)
Sets the zoom factor.
|
getAccelerator, getAcceleratorText, getIcon, getLongDescription, getMnemonic, getName, getShortDescription, setAccelerator, setIcon, setIcon, setLongDescription, setMnemonic, setName, setShortDescription
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public IlvZoomOutAction(IlvTimeScrollable timeScrollable, String name, KeyStroke accelerator, String shortDescription, String longDescription)
IlvZoomOutAction
for the specified
IlvTimeScrollable
object with a default icon. Typically, the
scrollable will be an IlvHierarchyChart
.
When an IlvZoomOutAction
is created, it registers an
internal, private event listener with the
IlvTimeScrollable
so that the action can automatically
enable and disable itself appropriately. If, at a later time, you want
to remove the IlvZoomOutAction
from the user interface
and have it garbage-collected, you will need to explicitly call the
removeFromTimeScrollable()
method.timeScrollable
- The time scrollable object that will be zoomed
by the action.name
- The name of the action. If the action is added to a
JMenu
, the name will be used as the menu item
text. If the action is added to a JToolBar
,
the name will be used as the button text.accelerator
- The action's optional keyboard accelerator.shortDescription
- The action's optional short description. This
text, if not null
, will be typically used for
tooltips.longDescription
- The action's optional long description. This
text, if not null
, will be typically used for
display in a status bar.public IlvZoomOutAction(IlvTimeScrollable timeScrollable, String name, Icon icon, KeyStroke accelerator, String shortDescription, String longDescription)
IlvZoomOutAction
for the specified
IlvTimeScrollable
object. Typically, this is will be an
IlvHierarchyChart
. When an
IlvZoomOutAction
is created, it registers an internal,
private event listener with the IlvTimeScrollable
so
that the action can automatically enable and disable itself
appropriately. If, at a later time, you want to remove the
IlvZoomOutAction
from the user interface and have it
garbage-collected, you will need to explicitly call the
removeFromTimeScrollable()
method.timeScrollable
- The time scrollable object that will be zoomed
by the action.name
- The name of the action. If the action is added to a
JMenu
, the name will be used as the menu item
text. If the action is added to a JToolBar
,
the name will be used as the button text.icon
- The action's icon or null
to use the
default icon.accelerator
- The action's optional keyboard accelerator.shortDescription
- The action's optional short description. This
text, if not null
, will be typically used for
tooltips.longDescription
- The action's optional long description. This
text, if not null
, will be typically used for
display in a status bar.public double getZoomFactor()
public void setZoomFactor(double zoomFactor)
zoomFactor
- A double
representing the zoom
factor.public void actionPerformed(ActionEvent event)
IlvTimeScrollable
object. This method
invokes perform()
.event
- The ActionEvent
.public void perform()
IlvTimeScrollable
object.actionPerformed(ActionEvent)
public void removeFromTimeScrollable()
IlvTimeScrollable
object.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.