|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JMenuItem
javax.swing.JMenu
gate.swing.XJMenu
gate.gui.MainFrame.ToolsMenu
class MainFrame.ToolsMenu
The "Tools" menu, which includes some static menu items (added in initGuiComponents) and some dynamic items contributed by plugins.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JMenu |
|---|
JMenu.AccessibleJMenu, JMenu.WinListener |
| Nested classes/interfaces inherited from class javax.swing.JMenuItem |
|---|
JMenuItem.AccessibleJMenuItem |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected int |
firstPluginItem
The first position in the menu that can be used by dynamic items. |
protected IdentityHashMap<Resource,List<JMenuItem>> |
itemsByResource
|
| Fields inherited from class gate.swing.XJMenu |
|---|
listener |
| Fields inherited from class javax.swing.JMenu |
|---|
popupListener |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
MainFrame.ToolsMenu(String name,
String description,
StatusListener listener)
|
|
| Method Summary | |
|---|---|
protected JMenuItem |
addMenuItem(Action a)
|
void |
datastoreClosed(CreoleEvent e)
Called when a DataStore has been closed |
void |
datastoreCreated(CreoleEvent e)
Called when a DataStore has been created |
void |
datastoreOpened(CreoleEvent e)
Called when a DataStore has been opened |
protected void |
processExistingTools()
Populate the menu with all actions coming from tools that are already loaded. |
protected void |
removeMenuItem(JMenuItem itemToRemove)
|
void |
resourceLoaded(CreoleEvent e)
If the resource just loaded is a tool (according to the creole register) then see if it publishes any actions and if so, add them to the menu in the appropriate places. |
void |
resourceRenamed(Resource resource,
String oldName,
String newName)
Called when the creole register has renamed a resource.1 |
void |
resourceUnloaded(CreoleEvent e)
If the resource just unloaded is one that contributed some menu items then remove them again. |
void |
staticItemsAdded()
Called when the static items have been added to inform the menu that it can start doing its dynamic stuff. |
protected void |
toolLoaded(Resource res)
Add the actions published by the given tool to their appropriate places on the Tools menu. |
| Methods inherited from class gate.swing.XJMenu |
|---|
initListeners, setPopupMenuVisible |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.swing.MenuElement |
|---|
processKeyEvent, processMouseEvent |
| Field Detail |
|---|
protected int firstPluginItem
protected IdentityHashMap<Resource,List<JMenuItem>> itemsByResource
| Constructor Detail |
|---|
public MainFrame.ToolsMenu(String name,
String description,
StatusListener listener)
| Method Detail |
|---|
public void staticItemsAdded()
protected void processExistingTools()
public void resourceLoaded(CreoleEvent e)
resourceLoaded in interface CreoleListenerprotected void toolLoaded(Resource res)
res - the tool instance (which must implement ActionsPublisher)protected JMenuItem addMenuItem(Action a)
public void resourceUnloaded(CreoleEvent e)
resourceUnloaded in interface CreoleListenerprotected void removeMenuItem(JMenuItem itemToRemove)
public void datastoreClosed(CreoleEvent e)
CreoleListenerDataStore has been closed
datastoreClosed in interface CreoleListenerpublic void datastoreCreated(CreoleEvent e)
CreoleListenerDataStore has been created
datastoreCreated in interface CreoleListenerpublic void datastoreOpened(CreoleEvent e)
CreoleListenerDataStore has been opened
datastoreOpened in interface CreoleListener
public void resourceRenamed(Resource resource,
String oldName,
String newName)
CreoleListener
resourceRenamed in interface CreoleListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||