allensoft.javacvs.client.ui.swing
Class DefaultGraphicalClientAction
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--allensoft.javacvs.client.ui.swing.DefaultGraphicalClientAction
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, CVSAction, java.util.EventListener, java.lang.Runnable, java.io.Serializable
- Direct Known Subclasses:
- AbortAction, DefaultGraphicalClientFilesAction, EditRepositoriesAction
- public abstract class DefaultGraphicalClientAction
- extends javax.swing.AbstractAction
- implements CVSAction, java.lang.Runnable
The base class for actions that perform CVS opertions using a default graphical client.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface allensoft.javacvs.client.ui.swing.CVSAction |
ABORT, ADD, ANNOTATE, CHECKOUT, COMMIT, DIFF, EXPORT, IMPORT, LOG, REMOVE, STATUS, TAG, UPDATE |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, 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 |
Methods inherited from interface java.lang.Runnable |
run |
MEDIUM_ICON
public static final java.lang.String MEDIUM_ICON
LARGE_ICON
public static final java.lang.String LARGE_ICON
m_Event
protected java.awt.event.ActionEvent m_Event
DefaultGraphicalClientAction
protected DefaultGraphicalClientAction(DefaultGraphicalClient client,
java.lang.String sID,
java.lang.String sName,
java.lang.String sDescription,
javax.swing.Icon small,
javax.swing.Icon medium,
javax.swing.Icon large)
DefaultGraphicalClientAction
protected DefaultGraphicalClientAction(DefaultGraphicalClient client,
java.lang.String sID,
java.lang.String sName,
java.lang.String sDescription)
loadIcon
protected javax.swing.Icon loadIcon(java.lang.String sIconName)
getSourceComponent
protected java.awt.Component getSourceComponent()
- Gets the component that caused this action to fire.
getSourceWindow
protected java.awt.Window getSourceWindow()
- Gets the window that the component that fired this event belongs to.
getParentFrameForDialog
protected java.awt.Frame getParentFrameForDialog()
- Gets a frame that can be used as the parent frame for a dialog based on the component that caused this action to fire.
displayError
protected void displayError(java.lang.Object message)
displayInformation
protected void displayInformation(java.lang.Object message)
askQuestion
protected boolean askQuestion(java.lang.Object message)
dispose
public void dispose()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed
in interface java.awt.event.ActionListener
- Overrides:
actionPerformed
in class javax.swing.AbstractAction
getID
public java.lang.String getID()
getDescription
public java.lang.String getDescription()
setDescription
public void setDescription(java.lang.String s)
getSmallIcon
public javax.swing.Icon getSmallIcon()
setSmallIcon
public void setSmallIcon(javax.swing.Icon icon)
getMediumIcon
public javax.swing.Icon getMediumIcon()
setMediumIcon
public void setMediumIcon(javax.swing.Icon icon)
getLargeIcon
public javax.swing.Icon getLargeIcon()
setLargeIcon
public void setLargeIcon(javax.swing.Icon icon)
getGraphicalClient
public DefaultGraphicalClient getGraphicalClient()
getClient
public CVSClient getClient()
- Gets the client that this action will run on.
updateEnabled
public void updateEnabled()
- Description copied from interface:
CVSAction
- Updates whether this action should be enabled or not.
- Specified by:
updateEnabled
in interface CVSAction
invoke
public void invoke()
- Invokes this action by calling the actionPerformed method. Only if this action is enabled will this do anything.