net.sf.doolin.gui.window.support
Class AbstractRootPaneGUIWindow<B>

java.lang.Object
  extended by net.sf.doolin.gui.window.support.AbstractGUIWindow<B>
      extended by net.sf.doolin.gui.window.support.AbstractRootPaneGUIWindow<B>
Type Parameters:
B - Type of data for the window
All Implemented Interfaces:
PropertyContainer, GUIWindow<B>
Direct Known Subclasses:
AbstractDialogWindow, FrameGUIWindow

public abstract class AbstractRootPaneGUIWindow<B>
extends AbstractGUIWindow<B>

Window implementation that allows the management of tool bars and menu bars. It is based on the JRootPane of the window implementation. This pane contains a root panel based on a DockLayout and contains as its main content a window panel, used to hold the actual content of the window.

Author:
Damien Coraboeuf

Field Summary
protected  Map<String,ActionBarContext> menuBarContextMap
          List of menu bars and their context
 
Constructor Summary
AbstractRootPaneGUIWindow()
           
 
Method Summary
protected  void build()
          Builds the window.
 JPanel getRootPanel()
          Gets the root panel for this window.
 JPanel getWindowPanel()
          Content panel.
protected  void installMenuBar()
          Installs the menu bar
 void installMenuBar(String id, ActionBarContext menuBar)
          Installs a menu bar in the window for a given context (which can be different form the window's one)
 void installToolBar(ToolBar toolBar, ActionContext actionContext)
          Installs a tool bar in the window
 void uninstallMenuBar(String id)
          Uninstalls a menu bar with the given id
 void uninstallToolBar(String id)
          Uninstalls a tool bar with the given id
 
Methods inherited from class net.sf.doolin.gui.window.support.AbstractGUIWindow
addGUIWindowListener, addView, build, canClose, close, getActionContext, getApplication, getId, getOpenViews, getProperty, getView, getWindowData, getWindowDescriptor, getWindowListeners, isClosed, onPostCreate, removeView, setProperty, showView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.doolin.gui.window.GUIWindow
display, setWindowIcon, setWindowTitle
 

Field Detail

menuBarContextMap

protected final Map<String,ActionBarContext> menuBarContextMap
List of menu bars and their context

Constructor Detail

AbstractRootPaneGUIWindow

public AbstractRootPaneGUIWindow()
Method Detail

build

protected void build()
Description copied from class: AbstractGUIWindow
Builds the window.

Specified by:
build in class AbstractGUIWindow<B>
See Also:
AbstractGUIWindow.getApplication(), AbstractGUIWindow.getWindowData()

getRootPanel

public JPanel getRootPanel()
Gets the root panel for this window.

Returns:
Root panel

getWindowPanel

public JPanel getWindowPanel()
Description copied from interface: GUIWindow
Content panel.

Returns:
Content panel for this window

installMenuBar

public void installMenuBar(String id,
                           ActionBarContext menuBar)
Description copied from interface: GUIWindow
Installs a menu bar in the window for a given context (which can be different form the window's one)

Parameters:
id - ID of the menu bar
menuBar - Action bar context

uninstallMenuBar

public void uninstallMenuBar(String id)
Description copied from interface: GUIWindow
Uninstalls a menu bar with the given id

Parameters:
id - ID of the menu bar to uninstall

installToolBar

public void installToolBar(ToolBar toolBar,
                           ActionContext actionContext)
Description copied from interface: GUIWindow
Installs a tool bar in the window

Parameters:
toolBar - Tool bar to install
actionContext - Action context

uninstallToolBar

public void uninstallToolBar(String id)
Description copied from interface: GUIWindow
Uninstalls a tool bar with the given id

Parameters:
id - ID of the tool bar to uninstall

installMenuBar

protected void installMenuBar()
Installs the menu bar



Copyright © 2011. All Rights Reserved.