public class SharedAction
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_CLOSE_TAB
Default action name.
|
static java.lang.String |
ACTION_CONNECT
Default action name.
|
static java.lang.String |
ACTION_COPY
Default action name.
|
static java.lang.String |
ACTION_CUT
Default action name.
|
static java.lang.String |
ACTION_DELETE
Default action name.
|
static java.lang.String |
ACTION_DISCONNECT
Default action name.
|
static java.lang.String |
ACTION_EXPORT_DATA
Default action name.
|
static java.lang.String |
ACTION_FIND
Default action name.
|
static java.lang.String |
ACTION_HELP
Default action name.
|
static java.lang.String |
ACTION_HIDE_WINDOW
Default action name.
|
static java.lang.String |
ACTION_IMPORT_DATA
Default action name.
|
static java.lang.String |
ACTION_PASTE
Default action name.
|
static java.lang.String |
ACTION_PRINT
Default action name.
|
static java.lang.String |
ACTION_RECONNECT
Default action name.
|
static java.lang.String |
ACTION_REFRESH
Default action name.
|
static java.lang.String |
ACTION_RENAME
Default action name.
|
static java.lang.String |
ACTION_SAVE
Default action name.
|
static java.lang.String |
ACTION_SAVE_AS
Default action name.
|
static java.lang.String |
ACTION_SAVE_AS_URL
Default action name.
|
Constructor and Description |
---|
SharedAction()
Constructor method for i18n purposes only.
|
SharedAction(java.lang.String name,
javax.swing.AbstractButton[] components)
Constructor settings the initial values.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(java.awt.event.ActionListener listener)
Adds an action listener to this shared action.
|
static java.lang.String[] |
combineActions(java.lang.String[]... actions)
Assembles overall shared actions.
|
static SharedAction |
createCloseTabAction(javax.swing.AbstractButton[] components)
Convenience method to get a close tab action.
|
static SharedAction |
createConnectAction(javax.swing.AbstractButton[] components)
Convenience method to get a database connect action.
|
static SharedAction |
createCopyAction(javax.swing.AbstractButton[] components)
Convenience method to get a copy action.
|
static SharedAction |
createCutAction(javax.swing.AbstractButton[] components)
Convenience method to get a cut action.
|
static SharedAction |
createDeleteAction(javax.swing.AbstractButton[] components)
Convenience method to get a delete action.
|
static SharedAction |
createDisconnectAction(javax.swing.AbstractButton[] components)
Convenience method to get a database disconnect action.
|
static SharedAction |
createExportDataAction(javax.swing.AbstractButton[] components)
Convenience method to get a database export data action.
|
static SharedAction |
createFindAction(javax.swing.AbstractButton[] components)
Convenience method to get a find action.
|
static SharedAction |
createHelpAction(javax.swing.AbstractButton[] components)
Convenience method to get a help action.
|
static SharedAction |
createHideWindowAction(javax.swing.AbstractButton[] components)
Convenience method to get a hide window action.
|
static SharedAction |
createImportDataAction(javax.swing.AbstractButton[] components)
Convenience method to get a database import data action.
|
static SharedAction |
createPasteAction(javax.swing.AbstractButton[] components)
Convenience method to get a paste action.
|
static SharedAction |
createPrintAction(javax.swing.AbstractButton[] components)
Convenience method to get a print action.
|
static SharedAction |
createReconnectAction(javax.swing.AbstractButton[] components)
Convenience method to get a database reconnect action.
|
static SharedAction |
createRefreshAction(javax.swing.AbstractButton[] components)
Convenience method to get a refresh action.
|
static SharedAction |
createRenameAction(javax.swing.AbstractButton[] components)
Convenience method to get a rename action.
|
static SharedAction |
createSaveAction(javax.swing.AbstractButton[] components)
Convenience method to get a save action.
|
static SharedAction |
createSaveAsAction(javax.swing.AbstractButton[] components)
Convenience method to get a "Save As" action (file).
|
static SharedAction |
createSaveAsURLAction(javax.swing.AbstractButton[] components)
Convenience method to get a "Save As" action (URL).
|
boolean |
equals(SharedAction tocheck)
Checks wether a given
SharedAction instance is equal to this. |
static SharedAction |
findAction(SharedAction[] actions,
java.lang.String name)
Determines the desired shared action type from the given list.
|
static javax.swing.AbstractButton[] |
findComponents(SharedAction[] actions,
java.lang.String name)
Determines the desired shared action components from the given list.
|
javax.swing.AbstractButton[] |
getComponents()
Getter for components.
|
java.lang.String |
getName()
Getter for name.
|
void |
removeActionListener(java.awt.event.ActionListener listener)
Removes an action listener from this shared action.
|
void |
setEnabled(boolean enabled)
Enables/disables the action components.
|
java.lang.String |
toString()
Overrides method
java.lang.Object.toString . |
public static final java.lang.String ACTION_SAVE
public static final java.lang.String ACTION_SAVE_AS
public static final java.lang.String ACTION_SAVE_AS_URL
public static final java.lang.String ACTION_PRINT
public static final java.lang.String ACTION_REFRESH
public static final java.lang.String ACTION_FIND
public static final java.lang.String ACTION_HELP
public static final java.lang.String ACTION_CLOSE_TAB
public static final java.lang.String ACTION_DELETE
public static final java.lang.String ACTION_RENAME
public static final java.lang.String ACTION_CUT
public static final java.lang.String ACTION_COPY
public static final java.lang.String ACTION_PASTE
public static final java.lang.String ACTION_HIDE_WINDOW
public static final java.lang.String ACTION_CONNECT
public static final java.lang.String ACTION_DISCONNECT
public static final java.lang.String ACTION_RECONNECT
public static final java.lang.String ACTION_IMPORT_DATA
public static final java.lang.String ACTION_EXPORT_DATA
public SharedAction() throws java.lang.InstantiationException
I18NExtractor
).
java.lang.InstantiationException
- Error indicationpublic SharedAction(java.lang.String name, javax.swing.AbstractButton[] components)
name
- The name of the action (required)components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic java.lang.String toString()
java.lang.Object.toString
.
toString
in class java.lang.Object
public boolean equals(SharedAction tocheck)
SharedAction
instance is equal to this.
tocheck
- The instance to be comparedSharedAction
instance to check for equalitypublic java.lang.String getName()
public javax.swing.AbstractButton[] getComponents()
public void setEnabled(boolean enabled)
enabled
- Enable the components?public void addActionListener(java.awt.event.ActionListener listener)
listener
- The action listener to be addedjava.lang.NullPointerException
- If parameter is null
public void removeActionListener(java.awt.event.ActionListener listener)
listener
- The action listener to be removedjava.lang.NullPointerException
- If parameter is null
public static SharedAction findAction(SharedAction[] actions, java.lang.String name)
actions
- The actions to be searchedname
- The desired action typenull
if not availablejava.lang.NullPointerException
- If a parameter is null
public static javax.swing.AbstractButton[] findComponents(SharedAction[] actions, java.lang.String name)
actions
- The actions to be searchedname
- The desired action typenull
if not availablejava.lang.NullPointerException
- If a parameter is null
public static java.lang.String[] combineActions(java.lang.String[]... actions)
actions
- The actionsjava.lang.NullPointerException
- If a parameter is null
public static SharedAction createSaveAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createSaveAsAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createSaveAsURLAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createPrintAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createRefreshAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createFindAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createHelpAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createCloseTabAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createDeleteAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createRenameAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createCutAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createCopyAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createPasteAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createHideWindowAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createConnectAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createDisconnectAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createReconnectAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createImportDataAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidpublic static SharedAction createExportDataAction(javax.swing.AbstractButton[] components)
components
- The associated clickable components (required)java.lang.NullPointerException
- If a parameter is null
java.lang.IllegalArgumentException
- If at least one of the parameters is invalidCopyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.