net.sf.doolin.gui.window.descriptor
Interface GUIWindowDescriptor<B>

Type Parameters:
B - Type of data for the window
All Known Implementing Classes:
AbstractCompositeGUIWindowDescriptor, AbstractGUIWindowDescriptor, DockingWindowDescriptor, LayoutGUIWindowDescriptor, SimpleGUIWindowDescriptor, TabbedGUIWindowDescriptor, WizardDescriptor

public interface GUIWindowDescriptor<B>

Window descriptor.

Author:
Damien Coraboeuf

Method Summary
 void activateView(GUIWindow<B> window, GUIView<?> view)
          Activates the view in the window.
 GUIWindow<B> createWindow(GUIApplication application, B windowData)
          Creates a new window.
 ActionFactory getActionFactory()
          Gets the action factory.
 GUIAction getCloseAction()
          Returns the action to call when the window is about to be closed
 WindowSize getSize()
          Returns the size specification
 GUIWindow<B> getWindow(GUIApplication application, B windowData)
          Gets an already opened window for the given model.
 String getWindowId(B windowData)
          Returns the ID of a window model.
 List<GUIWindowListener<B>> getWindowListeners()
           
 void hideView(GUIWindow<B> window, GUIView<?> view)
          Hides the view in the window.
 void onCloseWindow(GUIWindow<B> window)
          Action to execute when a window is closed.
 void onClosingWindow(GUIWindow<B> window)
          Action to execute when a window is about to be closed
 void onOpenedWindow(GUIWindow<B> window)
          This method is called when the window is displayed for the very first time
<V> GUIView<V>
openView(GUIWindow<B> parentWindow, GUIViewDescriptor<V> viewDescriptor, V viewData)
          Opens a view in the window
 

Method Detail

activateView

void activateView(GUIWindow<B> window,
                  GUIView<?> view)
Activates the view in the window.

Parameters:
window - Window
view - View

createWindow

GUIWindow<B> createWindow(GUIApplication application,
                          B windowData)
Creates a new window.

Parameters:
application - Application owner
windowData - Data for the window
Returns:
Opened window (not displayed yet)

getActionFactory

ActionFactory getActionFactory()
Gets the action factory.

Returns:
the action factory

getCloseAction

GUIAction getCloseAction()
Returns the action to call when the window is about to be closed

Returns:
Action to call

getSize

WindowSize getSize()
Returns the size specification

Returns:
Size

getWindow

GUIWindow<B> getWindow(GUIApplication application,
                       B windowData)
Gets an already opened window for the given model. The window is identified among the other ones using an ID generated using the id expression of the window descriptor.

Parameters:
application - Application owner
windowData - Data for the window
Returns:
Opened window if existing, null otherwise.

getWindowId

String getWindowId(B windowData)
Returns the ID of a window model.

Parameters:
windowData - Data for the window
Returns:
ID

getWindowListeners

List<GUIWindowListener<B>> getWindowListeners()

hideView

void hideView(GUIWindow<B> window,
              GUIView<?> view)
Hides the view in the window.

Parameters:
window - Window
view - View

onCloseWindow

void onCloseWindow(GUIWindow<B> window)
Action to execute when a window is closed.

Parameters:
window - Closed window

onClosingWindow

void onClosingWindow(GUIWindow<B> window)
Action to execute when a window is about to be closed

Parameters:
window - Window to close

onOpenedWindow

void onOpenedWindow(GUIWindow<B> window)
This method is called when the window is displayed for the very first time

Parameters:
window - Window which is opened for the very first time

openView

<V> GUIView<V> openView(GUIWindow<B> parentWindow,
                        GUIViewDescriptor<V> viewDescriptor,
                        V viewData)
Opens a view in the window

Type Parameters:
V - Type of data for the view
Parameters:
parentWindow - Parent window
viewDescriptor - Descriptor for the view to open
viewData - Data for the view
Returns:
Opened view


Copyright © 2011. All Rights Reserved.