|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.morpho.framework.UIController
The UIController handles the state of the morpho menu and toolbars so that they are synchronized across the various plugins. This is a singleton class because only one instance is ever needed. Plugins that need a new frame for a window should call UIController.newWindow(). The single instance of UIController can be obtained statically using getInstance().
Field Summary | |
static java.lang.String |
MENU_PATH
|
static java.lang.String |
PULL_RIGHT_MENU
|
static java.lang.String |
SEPARATOR_FOLLOWING
|
static java.lang.String |
SEPARATOR_PRECEDING
|
static java.lang.String |
YES
|
Method Summary | |
void |
addGuiAction(GUIAction action)
Add a menu item and optionally a toolbar button by registering an instance of GUIAction. |
MorphoFrame |
addWindow(java.lang.String windowName)
This method is called by plugins to get a new window that is an instance of MorphoFrame. |
MorphoFrame |
getCurrentActiveWindow()
get currently active window |
static GUIAction |
getGUIActionCloneUsedByMorphoFrame(GUIAction action,
MorphoFrame frame)
This method can be used if you have the original GUIAction instance and want to get the existing clone of it that was put into a particular MorphoFrame by UIController. |
static UIController |
getInstance()
Get the single instance of the UIController, creating it if needed. |
static Morpho |
getMorpho()
get Morpho |
static MorphoFrame |
getMorphoFrameContainingGUIAction(GUIAction clone)
return the MorphoFrame that contains the GUIAction clone provided |
static UIController |
initialize(Morpho morpho)
Initialize the single instance of the UIController, creating it if needed. |
void |
refreshWindows()
refresh all visible the windows that are in the windowList. |
void |
removeAllWindows()
Method to remove all windows in window list |
void |
removeGuiAction(GUIAction action)
Remove a menu item and its toolbar button for a particular instance of GUIAction. |
void |
removeWindow(MorphoFrame window)
This method is called to de-register a Window that the plugin has created. |
void |
setCurrentActiveWindow(MorphoFrame window)
set currently active window |
void |
updateAllStatusBars()
updates status bar in response to changes in connection parameters |
void |
updateWindow(MorphoFrame window,
java.lang.String title)
This method is called by plugins to update window that is an instance of MorphoFrame. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String SEPARATOR_PRECEDING
public static final java.lang.String SEPARATOR_FOLLOWING
public static final java.lang.String PULL_RIGHT_MENU
public static final java.lang.String YES
public static final java.lang.String MENU_PATH
Method Detail |
public static UIController initialize(Morpho morpho)
public static UIController getInstance()
public MorphoFrame addWindow(java.lang.String windowName)
windowName
- the initial title for the windowpublic void updateWindow(MorphoFrame window, java.lang.String title)
window
- the window will be given new nametitle
- the new name will give to windowpublic void removeWindow(MorphoFrame window)
window
- the window to be removed from the frameworkpublic void removeAllWindows()
public void addGuiAction(GUIAction action)
action
- the GUIAction instance describing the menu itempublic void removeGuiAction(GUIAction action)
action
- the GUIAction instance to be removedpublic static MorphoFrame getMorphoFrameContainingGUIAction(GUIAction clone)
clone
- the GUIAction clone for which the parent MorphoFrame
will be returnedpublic static GUIAction getGUIActionCloneUsedByMorphoFrame(GUIAction action, MorphoFrame frame)
action
- the GUIAction whose clone is soughtframe
- the MorphoFrame in which the clone is nestedpublic void refreshWindows()
public void updateAllStatusBars()
public void setCurrentActiveWindow(MorphoFrame window)
window
- the currently active MorphoFrame windowpublic MorphoFrame getCurrentActiveWindow()
public static Morpho getMorpho()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |