|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--harmonic.mz.data.ModelNode
|
+--harmonic.mz.function.FunctionStarter
This class represents a user function, an application feature the user can invoke. FunctionStarters are added registered with Module.addFunction(). This class is only the starter of the function. We are not useing the approach of requireing the programmer subclass this class with the to implement the specific user feature, although thats not a bad one. Instead, one simply initializes this class with a pointer and callback name that is invoked when this function is started. The Task class resembles the first approach.
Typically there is at least one user interface device used to invoke the function, such as a menu item, toolbar tool, key combination, or an utterance. These devices tickle this class with the actionPerformed() function.
This class extends ModelNode to alow user function information to be stored in the application database. These nodes are not under a model subtree of cource, they are under the application wide section. Information about what points to this function is stored this class, for example the menu text.
| Field Summary | |
java.util.Vector |
args
|
boolean |
bFunction
|
boolean |
bInvokedByContextMenu
|
int |
helpLoc
|
FileField |
iconFile
|
IntField |
imageId
|
StringField |
keyMap
|
StringField |
menuText
|
Module |
mod
|
int |
partialEchoLine
|
| Fields inherited from class harmonic.mz.data.ModelNode |
_fileRoot_, _thread_, ATTRIB_CONTROL_WIDGET, ATTRIB_LISTABLE, ATTRIB_PRESENTABLE, ATTRIB_PRIVATE, ATTRIB_REMOVEABLE, ATTRIB_RENAMEABLE, ATTRIB_SHOW_CONTEXT_MENU, ATTRIB_TYPE_FILTER, ATTRIB_USERGROUP, ATTRIB_VALUE_GROUP, ATTRIB_VE_LISTENER, bCustomCS, bDebug, bValid, name |
| Constructor Summary | |
FunctionStarter()
|
|
FunctionStarter(Module module,
java.lang.Object listener,
java.lang.String callback)
Constructs and FunctionStarter |
|
FunctionStarter(Module module,
java.lang.Object listener,
java.lang.String callback,
java.lang.String menuText)
Constructs and FunctionStarter |
|
| Method Summary | |
void |
actionPerformed()
|
void |
actionPerformed(java.awt.event.ActionEvent e)
Start the function! |
void |
actionPerformed(boolean b)
|
void |
addPointer(FunctionPointer p)
Add pointer to this function to update list. |
void |
contextInvoke()
|
java.awt.Component |
createControlWidget()
Returns an ActionMapDialog |
void |
echoFunction_Cancel()
|
void |
echoFunction_Final()
|
void |
echoFunction()
|
void |
echoFunction(boolean b)
|
ModelNode |
getField()
|
java.lang.String |
getIconFilename()
Returns the image icon filename, includeing modules support directory in front. |
javax.swing.ImageIcon |
getImageIcon()
Returns the image for this function. |
int |
getImageId()
|
java.lang.String |
getInstanceURL()
Return a URL associated with this instance of the object. |
java.lang.String |
getKeyMap()
Get key map string. |
java.lang.String |
getMenuText()
Returns menu text of this function. |
Module |
getModule()
Returns module that owns this function. |
static FunctionStarter |
getPendingAction()
|
java.awt.Image |
getTypeImage()
Returns the image to be used for this node in list interfaces that may put an image by node |
java.lang.String |
getTypeURL()
Return a URL associated with this objects type. |
java.lang.String |
getUndoName()
|
void |
help()
|
boolean |
invokedByContextMenu()
|
void |
makeContextMenu(HWM_GroupData menu)
May be overrideen to add functions pertaining to this node to context menu. |
void |
setField(ModelNode field)
|
void |
setIconFilename(java.lang.String filename)
Sets the image icon filename. |
void |
setKeyMap(java.lang.String keyMap)
Set key map string. |
void |
setMenuText(java.lang.String menuText)
Sets menu text of this function, and update any points to this function. |
static void |
setPendingAction(FunctionStarter fs)
|
void |
updatePointers()
Update pointes to this if a setting was changed. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public StringField menuText
public FileField iconFile
public StringField keyMap
public IntField imageId
public boolean bFunction
public Module mod
public int helpLoc
public boolean bInvokedByContextMenu
public java.util.Vector args
public int partialEchoLine
| Constructor Detail |
public FunctionStarter()
public FunctionStarter(Module module,
java.lang.Object listener,
java.lang.String callback)
module - Module that owns functionlistener - Listener to invoke to start user functioncallback - Callback function of listener
public FunctionStarter(Module module,
java.lang.Object listener,
java.lang.String callback,
java.lang.String menuText)
module - Module that owns functionlistener - Listener to invoke to start user functioncallback - Callback function of listenermenuText - Menu text setting| Method Detail |
public int getImageId()
public static FunctionStarter getPendingAction()
public static void setPendingAction(FunctionStarter fs)
public java.awt.Image getTypeImage()
ModelNode
getTypeImage in interface DataNodegetTypeImage in class ModelNodepublic java.lang.String getUndoName()
public void makeContextMenu(HWM_GroupData menu)
ModelNode
makeContextMenu in class ModelNodepublic void help()
public java.awt.Component createControlWidget()
createControlWidget in class ModelNodepublic void setIconFilename(java.lang.String filename)
public java.lang.String getIconFilename()
public javax.swing.ImageIcon getImageIcon()
public Module getModule()
public java.lang.String getMenuText()
public void setMenuText(java.lang.String menuText)
public ModelNode getField()
public void setField(ModelNode field)
public java.lang.String getKeyMap()
public void setKeyMap(java.lang.String keyMap)
public void addPointer(FunctionPointer p)
public void updatePointers()
public void actionPerformed()
public void actionPerformed(boolean b)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListeneractionPerformed in class ModelNodepublic void contextInvoke()
public boolean invokedByContextMenu()
public void echoFunction(boolean b)
public void echoFunction()
public void echoFunction_Final()
public void echoFunction_Cancel()
public java.lang.String getInstanceURL()
Documentable
getInstanceURL in interface DocumentablegetInstanceURL in class ModelNodepublic java.lang.String getTypeURL()
Documentable
getTypeURL in interface DocumentablegetTypeURL in class ModelNode
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||