ARoad0.gDMak
Class ActionExportPNG
java.lang.Object
javax.swing.AbstractAction
ARoad0.gDMak.ActionExportPNG
- All Implemented Interfaces:
- Singleton, java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class ActionExportPNG
- extends javax.swing.AbstractAction
- implements Singleton
An action that saves an explorer, a structure, a view or a beamer image
in the PNG format.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
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 Summary |
private |
ActionExportPNG()
with this private constructor, the compiler won't generate
a default public constructor |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent _ev)
Selects the view if it is the object to export, then the beamer, then the structure
and finally selects the explorer. |
java.awt.image.BufferedImage |
exportPNG(javax.swing.JComponent _component,
java.lang.String _type,
java.lang.String _name,
boolean _toFile)
Exports in a file an image derived from the local configuration. |
static ActionExportPNG |
getInstance()
constructor() |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, 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 |
instance_
private static ActionExportPNG instance_
desk
private javax.swing.JDesktopPane desk
ActionExportPNG
private ActionExportPNG()
- with this private constructor, the compiler won't generate
a default public constructor
getInstance
public static ActionExportPNG getInstance()
- constructor()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent _ev)
- Selects the view if it is the object to export, then the beamer, then the structure
and finally selects the explorer. Call exportPNG().
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
- Parameters:
_ev
- is the ActionEvent
exportPNG
public java.awt.image.BufferedImage exportPNG(javax.swing.JComponent _component,
java.lang.String _type,
java.lang.String _name,
boolean _toFile)
- Exports in a file an image derived from the local configuration.
For a NMNL view, removes the form '<>' in the view name.
- Parameters:
_component
- to export in PNG_type
- is equals to "view", "explorer", "beamer", "structure"_name
- is the exported object name. May be null if 'explorer'._toFile
- true to export to the local file system, false to simply return the image
- Returns:
- exported image