|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
ilog.views.util.swing.context.ComponentAction
ilog.views.diagrammer.application.IlvDiagrammerAction
ilog.views.diagrammer.application.IlvDiagrammerAction.ToggleAction
public abstract static class IlvDiagrammerAction.ToggleAction
This subclass of IlvDiagrammerAction can be used as a base class for
custom selectable (or "toggle") actions. It provides an implementation of
the perform(java.awt.event.ActionEvent, ilog.views.diagrammer.IlvDiagrammer) method that toggles the "selected" state of the
action and calls the abstract
isSelected(ilog.views.diagrammer.IlvDiagrammer) and
setSelected(ilog.views.diagrammer.IlvDiagrammer,boolean)
methods.
To write your own toggle action, you just need to implement the
isSelected(ilog.views.diagrammer.IlvDiagrammer) and
setSelected(ilog.views.diagrammer.IlvDiagrammer,boolean)
methods.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ilog.views.diagrammer.application.IlvDiagrammerAction |
|---|
IlvDiagrammerAction.ErrorHandler, IlvDiagrammerAction.FileAction, IlvDiagrammerAction.Handler, IlvDiagrammerAction.StatusEvent, IlvDiagrammerAction.StatusListener, IlvDiagrammerAction.ToggleAction |
| Field Summary |
|---|
| Fields inherited from class ilog.views.diagrammer.application.IlvDiagrammerAction |
|---|
_new, about, ABOUT_APPLICATION_NAME, alignBottom, alignHorizontalCenter, alignLeft, alignRight, alignTop, alignVerticalCenter, autoEditLabel, autoLabelLayout, autoLinkLayout, autoNodeLayout, callBuilder, clearPrintArea, close, copy, createLink, createNode, cut, delete, distributeHorizontally, distributeVertically, duplicate, editing, editLabel, exit, fitToContents, grid, gridSpacing, group, help, layoutAllNodes, layoutSelectedNodes, open, openStyleSheet, pageSetup, pan, paste, printPreview, printToBitmap, printWithDialog, printWithoutDialog, read, redo, refresh, resetZoom, resizing, save, saveAs, select, selectAll, setPrintArea, stickyModes, undo, ungroup, zoom, zoomIn, zoomOut |
| Fields inherited from class ilog.views.util.swing.context.ComponentAction |
|---|
hideToolbarButtonBordersOnOceanTheme |
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
IlvDiagrammerAction.ToggleAction(String prefix)
Creates a new toggle action. |
|
IlvDiagrammerAction.ToggleAction(String prefix,
ResourceBundle bundle)
Creates a new toggle action. |
|
| Method Summary | |
|---|---|
boolean |
isSelectable()
Returns true. |
protected abstract boolean |
isSelected(IlvDiagrammer diagrammer)
This method is called to determine if this action is currently selected. |
void |
perform(ActionEvent e,
IlvDiagrammer diagrammer)
Toggles the "selected" state of the action and calls the abstract isSelected(ilog.views.diagrammer.IlvDiagrammer) and
setSelected(ilog.views.diagrammer.IlvDiagrammer,boolean)
methods. |
protected abstract void |
setSelected(IlvDiagrammer diagrammer,
boolean selected)
This method is called when the selected state of the action changes. |
| Methods inherited from class ilog.views.diagrammer.application.IlvDiagrammerAction |
|---|
addActionToUpdate, addStatusListener, call, chooseFile, getActionFileChooser, getDefaultResourceBundle, getDefaultSelectedFile, getErrorHandler, getFileChooserDirectory, getString, isEnabled, isEnabled, isSelected, perform, removeActionToUpdate, removeStatusListener, setDefaultSelectedFile, setErrorHandler, setFileChooserDirectory, setHandler, update, update, updateActions |
| Methods inherited from class ilog.views.util.swing.context.ComponentAction |
|---|
actionPerformed, addActionToUpdate, addPropertyChangeListener, addStatusListener, call, clone, createMenuItem, createToolBarButton, delayedUpdateActions, error, fireActionFinished, fireActionStarted, getActionErrorHandler, getPrefix, getResourceBundle, getSmallIconSize, init, isSelected, removeActions, removeActionToUpdate, removeStatusListener, setActionErrorHandler, setHandler, setSelected, setSmallIconSize, updateActions |
| Methods inherited from class javax.swing.AbstractAction |
|---|
firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvDiagrammerAction.ToggleAction(String prefix)
prefix - The localization prefix key.
public IlvDiagrammerAction.ToggleAction(String prefix,
ResourceBundle bundle)
prefix - The localization prefix key.bundle - The resource bundle from which to get the properties of the action.| Method Detail |
|---|
public boolean isSelectable()
true.
isSelectable in class ilog.views.util.swing.context.ComponentAction
public void perform(ActionEvent e,
IlvDiagrammer diagrammer)
throws Exception
isSelected(ilog.views.diagrammer.IlvDiagrammer) and
setSelected(ilog.views.diagrammer.IlvDiagrammer,boolean)
methods.
perform in class IlvDiagrammerActione - The action event that caused this action to be performed.diagrammer - The IlvDiagrammer on which the action is to be performed
(may be null if there is no current diagram component).
Exception - When an error occurs while performing the action.
protected abstract boolean isSelected(IlvDiagrammer diagrammer)
throws Exception
isSelected in class IlvDiagrammerActiondiagrammer - The IlvDiagrammer instance on which the action is to be performed
(may be null if there is no current diagram component).
Exception - When an error occurs while getting the state of the action.
protected abstract void setSelected(IlvDiagrammer diagrammer,
boolean selected)
throws Exception
diagrammer - The IlvDiagrammer isntance on which the action is performed
(may be null if there is no current diagram component).selected - The new selected state.
Exception - When an error occurs while getting the state of the action.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||