|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.greenstone.gatherer.gui
Class GUIManager

java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.greenstone.gatherer.gui.GUIManager
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, javax.swing.event.ChangeListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants
- public class GUIManager
- extends javax.swing.JFrame
- implements java.awt.event.ActionListener, javax.swing.event.ChangeListener
- extends javax.swing.JFrame
The GUIManager is in charge of creating the Gatherer window frame then filling it with the goodness of the view panes. GUIManager not only creates these panes, but allows some messaging between them. Furthermore GUIManager includes functionality from menu driven choices, simply as it was easier to put it here once and have it accessible from all pane children.
| Nested Class Summary | |
private class |
GUIManager.CreationTask
|
private class |
GUIManager.MenuListenerImpl
Listens to actions upon the menu bar, and if it detects a click over the help menu brings the help window to the front if it has become hidden. |
private class |
GUIManager.TabUpdater
|
private class |
GUIManager.WorkflowUpdater
|
| Nested classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
| Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
| Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
BrowsingPane |
browser_pane
The browsing pane behaves much like an internet browser, or at least will some day. |
CollectionPane |
collection_pane
The collection pane is more like a file manager where you drag files from one tree to another. |
private org.greenstone.gatherer.util.TreeSynchronizer |
collection_tree_sync
Ensures that expansion events between like collection trees are synchronized. |
GConfigPane |
config_pane
The configuration pane allows you to edit the design of the library in terms of the collection configuration file. |
private javax.swing.JPanel |
content_pane
The panel within the window that other components are placed on. |
CreatePane |
create_pane
The create pane contains scripting options for importing and building collections into libraries. |
private javax.swing.JPanel |
export_pane
The dummy export pane. |
private java.util.HashMap |
filters
The filters used to dynamically filter the trees at user request. |
org.greenstone.gatherer.file.FileOpenActionListener |
foa_listener
|
org.greenstone.gatherer.help.HelpFrame |
help
A reference to the currently instantiated help window, if any. |
private boolean |
locked
Are certain panes currently locked? |
MenuBar |
menu_bar
The menu bar. |
org.greenstone.gatherer.gui.metaaudit.MetaAuditFrame |
meta_audit
|
MetaEditPane |
metaedit_pane
The metaedit pane is used to assign, edit and remove metadata from files within the collection. |
MirrorPane |
mirror_pane
The mirror pane contains controls for mirroring internet sites. |
private java.awt.event.MouseListener |
mouse_blocker_listener
|
private javax.swing.JPanel |
previous_pane
The last view pane selected. |
private java.awt.Dimension |
size
The size of the Gatherer window. |
private javax.swing.JTabbedPane |
tab_pane
The main tab pane containing the different views, available here to trap view change events. |
private GUIManager.TabUpdater |
tab_updater
A threaded tab changer to try and avoid NPE on exit. |
private java.lang.ThreadGroup |
thread_group
The thread group this manager, and hence its child graphical rendering threads, belong to. |
private org.greenstone.gatherer.util.TreeSynchronizer |
workspace_tree_sync
Ensures that expansion events between like workspace trees are synchronized. |
| Fields inherited from class javax.swing.JFrame |
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
| Fields inherited from class java.awt.Window |
|
| Fields inherited from class java.awt.Container |
|
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
GUIManager(java.awt.Dimension size)
Constructor. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Any implementation of ActionListener must include this method so that we can be informed when an action has occured. |
void |
afterDisplay()
Any actions that should happen after the display of the Gatherer window can be called here. |
void |
collectionChanged(boolean ready)
Once a collection has been made available to Gatherer, either by its creation or by it being reloaded, we need to inform all the visual components to update necessary data components (such as tree models), enable certain controls that depend on a collection being accessible, and refresh themselves. |
void |
display()
Enabled events on the window to be trapped, creates all the visual components, then builds the tab and other layouts. |
void |
exit()
When called this method ensures that all the things needing saving are saved before Gatherer.exit() is called. |
Filter |
getFilter(org.greenstone.gatherer.gui.tree.DragTree tree)
Retrieve the filter, or if one already exists, spawn a linked copy. |
java.awt.Component |
getSelectedView()
|
void |
lockCollection(boolean import_stage,
boolean lock)
This method is called when the collection is being built, and is used to disable all controls in all pane which could change the state of the collection. |
protected void |
processWindowEvent(java.awt.event.WindowEvent event)
Overridden from JFrame so we can exit safely when window is closed (or destroyed). |
void |
refreshTrees(int refresh_reason)
|
void |
setSelectedView(java.awt.Component component)
Allows the system to programatically set the selected tab. |
void |
setTabEnabled(java.lang.String rawname,
boolean state)
Specifies whether a certain tab is enabled or not. |
void |
setTitle(java.lang.String title,
java.lang.String name)
Change the string shown in the title bar of the main gui frame. |
void |
showEditMetadataBox()
When the edit metadata option is choosen from the menu, this method is called to ensure we only edit the metadata if there is metadata loaded. |
boolean |
showLoadCollectionBox()
When the load collection option is choosen this method is called to produce the modal file load prompt. |
void |
showMetaAuditBox()
When called this method causes the MetaAuditBox class in CollectionManager to display a nice dialog box which contains all the metadata assigned in the collection. |
void |
showNewCollectionPrompt()
This method is used to open the new collection box on the screen. |
boolean |
showSaveCollectionBox(boolean close_after,
boolean exit_after)
This method is used to open the save collection box/prompt on the screen. |
void |
stateChanged(javax.swing.event.ChangeEvent event)
Any implementation of ChangeListener must include this method so we can be informed when the state of one of the registered objects changes. |
void |
wait(boolean waiting)
|
private boolean |
waitForThread()
Called to determine if we should wait for a thread to finish before continuing. |
void |
workflowUpdate(java.lang.String raw,
boolean state)
|
| Methods inherited from class java.awt.Frame |
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
| Field Detail |
browser_pane
public BrowsingPane browser_pane
- The browsing pane behaves much like an internet browser, or at least will some day.
collection_pane
public CollectionPane collection_pane
- The collection pane is more like a file manager where you drag files from one tree to another.
create_pane
public CreatePane create_pane
- The create pane contains scripting options for importing and building collections into libraries.
foa_listener
public org.greenstone.gatherer.file.FileOpenActionListener foa_listener
config_pane
public GConfigPane config_pane
- The configuration pane allows you to edit the design of the library in terms of the collection configuration file.
help
public org.greenstone.gatherer.help.HelpFrame help
- A reference to the currently instantiated help window, if any.
menu_bar
public MenuBar menu_bar
- The menu bar.
meta_audit
public org.greenstone.gatherer.gui.metaaudit.MetaAuditFrame meta_audit
metaedit_pane
public MetaEditPane metaedit_pane
- The metaedit pane is used to assign, edit and remove metadata from files within the collection.
mirror_pane
public MirrorPane mirror_pane
- The mirror pane contains controls for mirroring internet sites.
locked
private boolean locked
- Are certain panes currently locked?
size
private java.awt.Dimension size
- The size of the Gatherer window.
filters
private java.util.HashMap filters
- The filters used to dynamically filter the trees at user request.
content_pane
private javax.swing.JPanel content_pane
- The panel within the window that other components are placed on.
export_pane
private javax.swing.JPanel export_pane
- The dummy export pane.
previous_pane
private javax.swing.JPanel previous_pane
- The last view pane selected.
tab_pane
private javax.swing.JTabbedPane tab_pane
- The main tab pane containing the different views, available here to trap view change events.
tab_updater
private GUIManager.TabUpdater tab_updater
- A threaded tab changer to try and avoid NPE on exit.
thread_group
private java.lang.ThreadGroup thread_group
- The thread group this manager, and hence its child graphical rendering threads, belong to. In a vain attempts to make the Dictionary work across threads.
- See Also:
- org.greenstone.gatherer.Dictionary
collection_tree_sync
private org.greenstone.gatherer.util.TreeSynchronizer collection_tree_sync
- Ensures that expansion events between like collection trees are synchronized.
workspace_tree_sync
private org.greenstone.gatherer.util.TreeSynchronizer workspace_tree_sync
- Ensures that expansion events between like workspace trees are synchronized.
mouse_blocker_listener
private java.awt.event.MouseListener mouse_blocker_listener
| Constructor Detail |
GUIManager
public GUIManager(java.awt.Dimension size)
- Constructor. Enable window events and arranges all other components.
| Method Detail |
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Any implementation of ActionListener must include this method so that we can be informed when an action has occured. In this case we are listening to actions from the menu-bar, and should react appropriately.
- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener
afterDisplay
public void afterDisplay()
- Any actions that should happen after the display of the Gatherer window can be called here. Currently only updates the browser pane if it is active to work around bug in Mozilla renderer implementation.
collectionChanged
public void collectionChanged(boolean ready)
- Once a collection has been made available to Gatherer, either by its creation or by it being reloaded, we need to inform all the visual components to update necessary data components (such as tree models), enable certain controls that depend on a collection being accessible, and refresh themselves.
display
public void display()
- Enabled events on the window to be trapped, creates all the visual components, then builds the tab and other layouts.
exit
public void exit()
- When called this method ensures that all the things needing saving are saved before Gatherer.exit() is called. This includes a save collection prompt if necessary.
getFilter
public Filter getFilter(org.greenstone.gatherer.gui.tree.DragTree tree)
- Retrieve the filter, or if one already exists, spawn a linked copy.
getSelectedView
public java.awt.Component getSelectedView()
lockCollection
public void lockCollection(boolean import_stage,
boolean lock)
- This method is called when the collection is being built, and is used to disable all controls in all pane which could change the state of the collection.
refreshTrees
public void refreshTrees(int refresh_reason)
setSelectedView
public void setSelectedView(java.awt.Component component)
- Allows the system to programatically set the selected tab.
setTabEnabled
public void setTabEnabled(java.lang.String rawname, boolean state)
- Specifies whether a certain tab is enabled or not.
setTitle
public void setTitle(java.lang.String title, java.lang.String name)
- Change the string shown in the title bar of the main gui frame. If either value is null, the 'No Collection' string is shown instead.
showEditMetadataBox
public void showEditMetadataBox()
- When the edit metadata option is choosen from the menu, this method is called to ensure we only edit the metadata if there is metadata loaded.
showLoadCollectionBox
public boolean showLoadCollectionBox()
- When the load collection option is choosen this method is called to produce the modal file load prompt.
showMetaAuditBox
public void showMetaAuditBox()
- When called this method causes the MetaAuditBox class in CollectionManager to display a nice dialog box which contains all the metadata assigned in the collection.
showNewCollectionPrompt
public void showNewCollectionPrompt()
- This method is used to open the new collection box on the screen.
showSaveCollectionBox
public boolean showSaveCollectionBox(boolean close_after,
boolean exit_after)
- This method is used to open the save collection box/prompt on the screen.
stateChanged
public void stateChanged(javax.swing.event.ChangeEvent event)
- Any implementation of ChangeListener must include this method so we can be informed when the state of one of the registered objects changes. In this case we are listening to view changes within the tabbed pane.
- Specified by:
stateChangedin interfacejavax.swing.event.ChangeListener
wait
public void wait(boolean waiting)
workflowUpdate
public void workflowUpdate(java.lang.String raw, boolean state)
waitForThread
private boolean waitForThread()
- Called to determine if we should wait for a thread to finish before continuing. We wait for threads if they are named: GSHELL_BUILD, GSHELL_IMPORT, or GSHELL_NEW.
processWindowEvent
protected void processWindowEvent(java.awt.event.WindowEvent event)
- Overridden from JFrame so we can exit safely when window is closed (or destroyed).
|
|||||||||
| Home >> All >> org >> greenstone >> gatherer >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC