|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractAction
com.lightdev.app.shtm.FrmMain.SHTMLFileCloseAction
public class FrmMain.SHTMLFileCloseAction
close a document.
the action takes into account whether or not a document needs to be saved.
By having the actual closing task in a separate public method of this action, the close functionality can be shared with action 'close all' or others that might need it.
Field Summary |
---|
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 | |
---|---|
FrmMain.SHTMLFileCloseAction()
constructor |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
close the currently active document, if there is one |
void |
closeDocument(int index,
java.awt.event.ActionEvent ae,
boolean ignoreChanges)
close a document by its tab index. |
void |
getProperties()
this method should be called from the constructor of each SHTMLAction and can be used to get action properties from a resource file |
void |
update()
update the state of this action |
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 |
Methods inherited from interface javax.swing.Action |
---|
addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Constructor Detail |
---|
public FrmMain.SHTMLFileCloseAction()
Method Detail |
---|
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
public void closeDocument(int index, java.awt.event.ActionEvent ae, boolean ignoreChanges)
The method takes care of saving the document if necessary prior to closing.
the
- tab index number of the document in the tabbed pane.public void update()
update
in interface SHTMLAction
public void getProperties()
SHTMLAction
getProperties
in interface SHTMLAction
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |