public abstract class IcyAbstractAction extends javax.swing.AbstractAction
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENABLED_KEY
The "enabled" property key.
|
Constructor and Description |
---|
IcyAbstractAction(java.lang.String name) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon,
java.lang.String description) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon,
java.lang.String description,
boolean bgProcess,
java.lang.String processMessage) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon,
java.lang.String description,
int keyCode) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon,
java.lang.String description,
int keyCode,
int modifiers) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon,
java.lang.String description,
java.lang.String longDescription) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon,
java.lang.String description,
java.lang.String longDescription,
boolean bgProcess,
java.lang.String processMessage) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon,
java.lang.String description,
java.lang.String longDescription,
int keyCode,
int modifiers) |
IcyAbstractAction(java.lang.String name,
IcyIcon icon,
java.lang.String description,
java.lang.String longDescription,
int keyCode,
int modifiers,
boolean bgProcess,
java.lang.String processMessage) |
IcyAbstractAction(java.lang.String name,
java.lang.String iconName)
Deprecated.
Use
IcyAbstractAction(String, IcyIcon) instead. |
IcyAbstractAction(java.lang.String name,
java.lang.String iconName,
java.lang.String description)
Deprecated.
Use
IcyAbstractAction(String, IcyIcon, String) instead. |
IcyAbstractAction(java.lang.String name,
java.lang.String iconName,
java.lang.String description,
int keyCode)
Deprecated.
Use
IcyAbstractAction(String, IcyIcon, String, int) instead. |
IcyAbstractAction(java.lang.String name,
java.lang.String iconName,
java.lang.String description,
int keyCode,
int modifiers)
Deprecated.
Use
IcyAbstractAction(String, IcyIcon, String, int, int) instead. |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
boolean |
doAction()
Deprecated.
Use
executeNow() instead |
void |
enabledChanged()
Helper method to fire enabled changed event (this force component refresh)
|
void |
execute()
Execute action (delayed execution if action requires it)
|
boolean |
executeNow()
Execute action now (wait for execution to complete)
|
java.lang.String |
getDescription() |
IcyIcon |
getIcon() |
javax.swing.KeyStroke |
getKeyStroke()
Returns the
KeyStroke for this action (can be null). |
javax.swing.JLabel |
getLabelComponent()
Returns a
JLabel component representing the action. |
javax.swing.JLabel |
getLabelComponent(boolean wantIcon,
boolean wantText)
Returns a
JLabel component representing the action. |
java.lang.String |
getLongDescription() |
java.lang.String |
getName() |
java.lang.String |
getProcessMessage() |
org.pushingpixels.flamingo.api.common.RichTooltip |
getRichToolTip() |
boolean |
isBgProcess() |
boolean |
isEnabled() |
boolean |
isProcessing() |
boolean |
isSelected()
Returns the selected state (for toggle button type).
|
void |
setAccelerator(int keyCode) |
void |
setAccelerator(int keyCode,
int modifiers) |
void |
setBgProcess(boolean bgProcess)
Set to true if you want to action to be processed in a background thread.
|
void |
setDescription(java.lang.String value) |
void |
setEnabled(boolean value) |
void |
setIcon(IcyIcon value) |
void |
setLongDescription(java.lang.String value) |
void |
setName(java.lang.String value) |
void |
setProcessMessage(java.lang.String processMessage)
Set the process message to display for background action process.
|
void |
setSelected(boolean value)
Sets the selected state (for toggle button type).
|
static void |
setToolTipTextFromAction(javax.swing.JComponent c,
javax.swing.Action a)
Sets the tooltip text of a component from an Action.
|
public static final java.lang.String ENABLED_KEY
public IcyAbstractAction(java.lang.String name, IcyIcon icon, java.lang.String description, java.lang.String longDescription, int keyCode, int modifiers, boolean bgProcess, java.lang.String processMessage)
public IcyAbstractAction(java.lang.String name, IcyIcon icon, java.lang.String description, java.lang.String longDescription, int keyCode, int modifiers)
public IcyAbstractAction(java.lang.String name, IcyIcon icon, java.lang.String description, java.lang.String longDescription, boolean bgProcess, java.lang.String processMessage)
public IcyAbstractAction(java.lang.String name, IcyIcon icon, java.lang.String description, boolean bgProcess, java.lang.String processMessage)
public IcyAbstractAction(java.lang.String name, IcyIcon icon, java.lang.String description, int keyCode, int modifiers)
public IcyAbstractAction(java.lang.String name, IcyIcon icon, java.lang.String description, int keyCode)
public IcyAbstractAction(java.lang.String name, IcyIcon icon, java.lang.String description, java.lang.String longDescription)
public IcyAbstractAction(java.lang.String name, IcyIcon icon, java.lang.String description)
public IcyAbstractAction(java.lang.String name, IcyIcon icon)
public IcyAbstractAction(java.lang.String name)
@Deprecated public IcyAbstractAction(java.lang.String name, java.lang.String iconName, java.lang.String description, int keyCode, int modifiers)
IcyAbstractAction(String, IcyIcon, String, int, int)
instead.@Deprecated public IcyAbstractAction(java.lang.String name, java.lang.String iconName, java.lang.String description, int keyCode)
IcyAbstractAction(String, IcyIcon, String, int)
instead.@Deprecated public IcyAbstractAction(java.lang.String name, java.lang.String iconName, java.lang.String description)
IcyAbstractAction(String, IcyIcon, String)
instead.@Deprecated public IcyAbstractAction(java.lang.String name, java.lang.String iconName)
IcyAbstractAction(String, IcyIcon)
instead.public static void setToolTipTextFromAction(javax.swing.JComponent c, javax.swing.Action a)
c
- the Component to set the tooltip text ona
- the Action to set the tooltip text from, may be nullpublic boolean isBgProcess()
public void setBgProcess(boolean bgProcess)
isBgProcess()
,
setProcessMessage(String)
public java.lang.String getProcessMessage()
setProcessMessage(String)
,
isBgProcess()
public org.pushingpixels.flamingo.api.common.RichTooltip getRichToolTip()
public void setProcessMessage(java.lang.String processMessage)
setBgProcess(boolean)
public void setName(java.lang.String value)
public java.lang.String getName()
public void setDescription(java.lang.String value)
public java.lang.String getDescription()
public void setLongDescription(java.lang.String value)
public java.lang.String getLongDescription()
public void setAccelerator(int keyCode, int modifiers)
public void setAccelerator(int keyCode)
public boolean isSelected()
public void setSelected(boolean value)
public javax.swing.KeyStroke getKeyStroke()
KeyStroke
for this action (can be null).public boolean isProcessing()
setBgProcess(boolean)
is set to true)public boolean isEnabled()
isEnabled
in interface javax.swing.Action
isEnabled
in class javax.swing.AbstractAction
public void setEnabled(boolean value)
setEnabled
in interface javax.swing.Action
setEnabled
in class javax.swing.AbstractAction
public void enabledChanged()
public javax.swing.JLabel getLabelComponent(boolean wantIcon, boolean wantText)
JLabel
component representing the action.public javax.swing.JLabel getLabelComponent()
JLabel
component representing the action.public void actionPerformed(java.awt.event.ActionEvent e)
public void execute()
@Deprecated public boolean doAction()
executeNow()
insteadpublic boolean executeNow()