|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uic.model.UICSimpleAction uic.model.UICAction
This action class contains all the information to provide high quality widgets and an action. The idea behind an action is that one object wraps a certain functionality and provdes various ways to access that functionality. A good example is a print action.
Creating an action and using it with the ActionFactory creates widgets like buttons
or menu entries. When your users click the button or select the menu item the action
will be informed and a method of your choosing will be invoked.
Notice that the default version uses the QueuedPolicy
.
ActionFactory
,
UICToggleAction
Nested Class Summary | |
class |
UICAction.StatusBarUpdater
Helper class. |
Nested classes inherited from class uic.model.UICSimpleAction |
UICSimpleAction.DirectPolicy, UICSimpleAction.ExecutePolicy, UICSimpleAction.OnlyLastPolicy, UICSimpleAction.QueuedPolicy, UICSimpleAction.SimpleQueuedPolicy |
Field Summary |
Fields inherited from class uic.model.UICSimpleAction |
currentPolicy, target, targetObject |
Constructor Summary | |
UICAction(String name)
Base constructor. |
|
UICAction(String name,
Object targetObject,
String targetMethod,
String title)
|
|
UICAction(String name,
Object targetObject,
String targetMethod,
String title,
ActionFactory actions)
|
|
UICAction(String name,
Object targetObject,
String targetMethod,
String title,
String iconBaseName)
|
|
UICAction(String name,
Object targetObject,
String targetMethod,
String title,
String iconBaseName,
ActionFactory actions)
|
|
UICAction(String name,
Object targetObject,
String targetMethod,
String title,
String iconBaseName,
String keyStroke)
|
|
UICAction(String name,
Object targetObject,
String targetMethod,
String title,
String iconBaseName,
String keyStroke,
ActionFactory actions)
|
|
UICAction(String name,
Object targetObject,
String targetMethod,
String title,
String iconBaseName,
String keyStroke,
String toolTipText,
String whatIsThis)
|
|
UICAction(String name,
Object targetObject,
String targetMethod,
String title,
String iconBaseName,
String keyStroke,
String toolTipText,
String whatIsThis,
ActionFactory actions)
Create new action. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
|
void |
addComponent(AbstractButton c)
A button component that represents this action the the users user interface can be registered here. |
Iterator |
getComponentsIterator()
|
String |
getIconBaseName()
The name of the icon that will be used on buttons. |
KeyStroke |
getKeyStroke()
|
String |
getName()
Return the name key. |
String |
getTitle()
return the title of this action, this is mostly the name on screen. |
String |
getToolTipText()
|
String |
getWhatIsThis()
The text used in the popup for whatIs help. |
void |
setEnabled(boolean enabled)
Enable disable this action and all its registered components. |
void |
setIconBaseName(String iconBaseName)
The name of the icon that will be used on buttons. |
void |
setKeyStroke(KeyStroke keyStroke)
|
void |
setName(String name)
Set the unique key that is the name of this action. |
void |
setStatuBar(StatusBar statusBar)
Register a statusbar that will be used to show whatIs texts on on mouseOver of the menuitems. |
void |
setTitle(String title)
Set the title of this action, this is mostly the name on screen. |
void |
setToolTipText(String toolTipText)
|
void |
setWhatIsThis(String whatIsThis)
The text used in the popup for whatIs help. |
String |
toString()
returns the title. |
Methods inherited from class uic.model.UICSimpleAction |
doAction, execute, execute, setDirect, setExecutionPolity, setTarget |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public UICAction(String name)
public UICAction(String name, Object targetObject, String targetMethod, String title, ActionFactory actions)
public UICAction(String name, Object targetObject, String targetMethod, String title, String iconBaseName, ActionFactory actions)
public UICAction(String name, Object targetObject, String targetMethod, String title, String iconBaseName, String keyStroke, ActionFactory actions)
public UICAction(String name, Object targetObject, String targetMethod, String title)
public UICAction(String name, Object targetObject, String targetMethod, String title, String iconBaseName)
public UICAction(String name, Object targetObject, String targetMethod, String title, String iconBaseName, String keyStroke)
public UICAction(String name, Object targetObject, String targetMethod, String title, String iconBaseName, String keyStroke, String toolTipText, String whatIsThis)
public UICAction(String name, Object targetObject, String targetMethod, String title, String iconBaseName, String keyStroke, String toolTipText, String whatIsThis, ActionFactory actions)
name
- The identifying name of the action, must be unique.targetObject
- The object that contains the method we want to connect to.targetMethod
- the name of the method we want to connect to.title
- the name used on buttons or in a menu entry.iconBaseName
- the basename the new widgets can use to fetch the correct icon, or null if nonekeyStroke
- the keyStroke in the format accepted by javax.swing.KeyStroke.getKeyStroke(String)toolTipText
- the text for tooltips, or null for nonewhatIsThis
- the text for the statusBar.actions
- the actionFactory this action belongs to.KeyStroke.getKeyStroke(String)
Method Detail |
public void addComponent(AbstractButton c)
public String getName()
public void setName(String name)
public void setEnabled(boolean enabled)
setEnabled
in class UICSimpleAction
enabled
- the new state of the action.public String getTitle()
public void setTitle(String title)
Setting the title on an action will not change created buttons/menu items.
public String getIconBaseName()
public void setIconBaseName(String iconBaseName)
public String getToolTipText()
public void setToolTipText(String toolTipText)
public String getWhatIsThis()
MainWindow
public void setWhatIsThis(String whatIsThis)
MainWindow
public Iterator getComponentsIterator()
public KeyStroke getKeyStroke()
public void setKeyStroke(KeyStroke keyStroke)
public void setStatuBar(StatusBar statusBar)
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |