|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractAction | +--com.objexcel.gui.ObjexcelAbstractAction
ObjexcelAbstractAction extends AbstractAction by adding
Inner Class Summary | |
class |
ObjexcelAbstractAction.ObjDocumentListener
add one of these to update these to your text component if the action's status depends on the contents of the a document changes |
class |
ObjexcelAbstractAction.ObjTableModelListener
add one of these to a model to trigger an update based on a selection changing |
static class |
ObjexcelAbstractAction.Rule
Rule allows common logic to be shared accross actions. |
Field Summary | |
static java.lang.String |
ACCELERATOR
Property for keystroke accelerator |
static java.lang.String |
MNEMONIC
Property for changing mnemonic |
Constructor Summary | |
ObjexcelAbstractAction()
|
|
ObjexcelAbstractAction(java.lang.String name)
|
|
ObjexcelAbstractAction(java.lang.String name,
javax.swing.Icon i)
|
|
ObjexcelAbstractAction(java.lang.String name,
javax.swing.Icon i,
java.lang.String shortDescription)
the short description is the default tool tip. |
|
ObjexcelAbstractAction(java.lang.String name,
javax.swing.Icon i,
java.lang.String shortDescription,
char mnemonic,
javax.swing.KeyStroke keystroke)
provide a mnemonic and keystroke accelerator for any controls created from this action. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
we handle this method, you handle actionPerformed2 |
abstract void |
actionPerformed2(java.awt.event.ActionEvent e)
subclass needs to implement this. |
void |
addRule(ObjexcelAbstractAction.Rule rule)
if an action has a rule, the rule will be checked before isEnabled is checked. |
javax.swing.JButton |
createButton()
|
javax.swing.JButton |
createButton(boolean bForToolbar)
|
javax.swing.JMenuItem |
createMenuItem()
create a menu item from this action |
javax.swing.JButton |
createToolbarButton()
create a rollover button without borders. |
static void |
paintLoweredBevel(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
static void |
paintRaisedBevel(java.awt.Component c,
java.awt.Graphics g,
int x,
int y,
int width,
int height)
|
boolean |
resetTooltip()
put the tooltip back to its original (short description per constructor) |
void |
updateStatus()
update the status of the action. |
boolean |
updateStatus(boolean b,
java.lang.String tooltip)
set the enablement state of action. |
void |
updateStatusOnListSelectionChange(javax.swing.JList l)
call this to update the command when the list selection on the specified list changes |
void |
updateStatusOnTableChanged(javax.swing.JTable t)
call this to update the status when the table changes |
void |
updateStatusOnTableChanged(javax.swing.text.JTextComponent t)
call this to update the status when the document changes |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener,
getValue,
isEnabled,
putValue,
removePropertyChangeListener,
setEnabled |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String MNEMONIC
public static final java.lang.String ACCELERATOR
Constructor Detail |
public ObjexcelAbstractAction()
public ObjexcelAbstractAction(java.lang.String name)
public ObjexcelAbstractAction(java.lang.String name, javax.swing.Icon i)
public ObjexcelAbstractAction(java.lang.String name, javax.swing.Icon i, java.lang.String shortDescription)
public ObjexcelAbstractAction(java.lang.String name, javax.swing.Icon i, java.lang.String shortDescription, char mnemonic, javax.swing.KeyStroke keystroke)
Method Detail |
public boolean resetTooltip()
public abstract void actionPerformed2(java.awt.event.ActionEvent e)
public void updateStatus()
public void addRule(ObjexcelAbstractAction.Rule rule)
public boolean updateStatus(boolean b, java.lang.String tooltip)
public final void actionPerformed(java.awt.event.ActionEvent e)
public javax.swing.JButton createButton()
public javax.swing.JButton createToolbarButton()
public static void paintRaisedBevel(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
public static void paintLoweredBevel(java.awt.Component c, java.awt.Graphics g, int x, int y, int width, int height)
public javax.swing.JButton createButton(boolean bForToolbar)
public javax.swing.JMenuItem createMenuItem()
public void updateStatusOnListSelectionChange(javax.swing.JList l)
public void updateStatusOnTableChanged(javax.swing.JTable t)
public void updateStatusOnTableChanged(javax.swing.text.JTextComponent t)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |