|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
com.ephox.editlive.java2.editor.actionhandler.EphoxAction
An extension of Action that provides support for tracking selection and other useful settings.
| Field Summary | |
static String |
BACKGROUND_COLOR
The key to indicate the background color for the action. |
static String |
BORDER
Whether or not to paint a border when this action is in a combo box or menu. |
static String |
COLOR
The key to indicate the color to paint the item. |
static String |
FONT
The key to indicate the font face for the action. |
static String |
FOREGROUND_COLOR
The key to indicate the foreground color for the action. |
static String |
SELECTED
The property name used for property change events for the selected state of the action. |
static String |
SHOW_CHECKMARK
Whether or not to show the checkmark when selected. |
static String |
SHOW_WHEN_DISABLED
The log for this class. |
static String |
SUB_ITEMS
The property name used when the sub items for this action change. |
static String |
TABLE_WIZARD
Whether or not this action is a table wizard. |
| Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
EphoxAction()
Creates a new EphoxAction. |
|
EphoxAction(String name)
Creates a new EphoxAction. |
|
EphoxAction(String name,
Icon icon)
Creates a new EphoxAction. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
|
void |
addActionListener(ActionListener listener)
Add an action listener to notify when this action is performed. |
void |
addEnabledFilter(EnabledFilter filter)
Add an enabled filter to this action. |
int |
compareTo(Object o)
Simple comparator to implement standard string sorting based on the action name |
protected List |
createStaticSubItems()
Create the static list of sub items for this action. |
boolean |
equals(Object obj)
|
List |
getActionListeners()
Get the list of action listeners added to this action |
List |
getEnabledFilters()
Get the list of enabled filters that have been added to this action. |
List |
getSubItems()
Get the sub items for this action. |
int |
hashCode()
|
boolean |
hasSubItems()
|
boolean |
isEnabled()
|
boolean |
isSelected()
Get whether or not the action is selected (ie: toggled on). |
void |
removeActionListener(ActionListener listener)
Remove an action listener from this action. |
void |
setSelected(boolean selected)
Set whether or not the action is selected. |
String |
toString()
|
| Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String SHOW_WHEN_DISABLED
public static final String SELECTED
public static final String COLOR
public static final String TABLE_WIZARD
public static final String FONT
public static final String FOREGROUND_COLOR
public static final String BACKGROUND_COLOR
public static final String BORDER
public static final String SUB_ITEMS
public static final String SHOW_CHECKMARK
| Constructor Detail |
public EphoxAction()
public EphoxAction(String name)
name - the name of the action.
public EphoxAction(String name,
Icon icon)
name - the name of the action.icon - the icon for the action.| Method Detail |
public void addActionListener(ActionListener listener)
listener - the listener to notify.public void removeActionListener(ActionListener listener)
listener - the listener to remove.public List getActionListeners()
public void addEnabledFilter(EnabledFilter filter)
filter - the filter to add.public List getEnabledFilters()
EnabledFilter instances that apply to this action.public boolean isEnabled()
isEnabled in interface ActionAction.isEnabled()public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerActionListener.actionPerformed(java.awt.event.ActionEvent)public boolean isSelected()
public void setSelected(boolean selected)
selected - true to select the action, otherwise false.public List getSubItems()
Override this method if dynamic subitems are required. For static items, instead override
createStaticSubItems().
protected List createStaticSubItems()
public String toString()
Object.toString()public int compareTo(Object o)
compareTo in interface Comparableo - EphoxAction to compare to
Comparable.compareTo(Object o)public boolean equals(Object obj)
Object.equals(java.lang.Object)public int hashCode()
Object.hashCode()public boolean hasSubItems()
|
Copyright (c) 2005-2007 Ephox Pty Ltd. All rights reserved. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||