public abstract static class IlvDiagrammerAction.FileAction extends IlvDiagrammerAction
IlvDiagrammerAction.ErrorHandler, IlvDiagrammerAction.FileAction, IlvDiagrammerAction.Handler, IlvDiagrammerAction.StatusEvent, IlvDiagrammerAction.StatusListener, IlvDiagrammerAction.ToggleAction
_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
hideToolbarButtonBordersOnOceanTheme
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 |
---|
FileAction(String prefix,
ResourceBundle bundle,
boolean save,
String[] suffixes,
String[] descriptionKeys)
Creates a File action.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isEnabled(IlvDiagrammer diagrammer)
This method is called to determine whether this action is currently enabled.
|
protected abstract void |
openOrSave(ActionEvent e,
IlvDiagrammer diagrammer,
URL url)
Open or save action.
|
void |
perform(ActionEvent e,
IlvDiagrammer diagrammer)
This method is called when the action is performed.
|
void |
setDescriptionKeys(String[] newDescriptions)
Sets description keys for suffixes in file selector dialog.
|
void |
setSuffixes(String[] newSuffixes)
Sets favorite suffixes for file selector dialog.
|
addActionToUpdate, addStatusListener, call, chooseFile, getActionFileChooser, getDefaultResourceBundle, getDefaultSelectedFile, getErrorHandler, getFileChooserDirectory, getString, isEnabled, isSelected, isSelected, perform, removeActionToUpdate, removeStatusListener, setDefaultSelectedFile, setErrorHandler, setFileChooserDirectory, setHandler, update, update, updateActions
actionPerformed, addActionToUpdate, addPropertyChangeListener, addStatusListener, call, clone, createMenuItem, createToolBarButton, delayedUpdateActions, error, fireActionFinished, fireActionStarted, getActionErrorHandler, getPrefix, getResourceBundle, getSmallIconSize, init, isSelectable, isSelected, removeActions, removeActionToUpdate, removeStatusListener, setActionErrorHandler, setHandler, setSelected, setSmallIconSize, updateActions
firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public FileAction(String prefix, ResourceBundle bundle, boolean save, String[] suffixes, String[] descriptionKeys)
prefix
- bundle
- save
- suffixes
- descriptionKeys
- public void setSuffixes(String[] newSuffixes)
newSuffixes
- the new suffixespublic void setDescriptionKeys(String[] newDescriptions)
newDescriptions
- the description keyspublic void perform(ActionEvent e, IlvDiagrammer diagrammer) throws Exception
IlvDiagrammerAction
to implement the action.
This method should not be called directly. If you need to call an action
in your code, use the IlvDiagrammerAction.call(ilog.views.diagrammer.IlvDiagrammer)
method instead.
perform
in class IlvDiagrammerAction
e
- The action event that caused this action to be performed.diagrammer
- 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 performing the action.protected abstract void openOrSave(ActionEvent e, IlvDiagrammer diagrammer, URL url) throws Exception
e
- The action event.diagrammer
- The working diagrammer.url
- The diagrammer url.Exception
- Thrown while openning or saving the diagrammer.protected boolean isEnabled(IlvDiagrammer diagrammer) throws Exception
isEnabled
in class IlvDiagrammerAction
diagrammer
- 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.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.