net.sf.doolin.gui.view
Interface GUIView<B>

Type Parameters:
B - Type of the view data.
All Superinterfaces:
PropertyContainer
All Known Implementing Classes:
AbstractGUIView, DefaultGUIView

public interface GUIView<B>
extends PropertyContainer

View instance.

Author:
Damien Coraboeuf

Method Summary
 void addViewListener(GUIViewListener<B> listener)
          Adds a listener for the view life-cycle
 void close()
          Actually closes the view
 boolean close(boolean force)
          Closes the view
 ActionContext getActionContext()
          Gets the action context for this view
 GUIApplication getApplication()
          Gets the view owner
 String getID()
          Gets the ID for the view
 GUIWindow<?> getParentWindow()
          Gets the parent window.
 JComponent getViewComponent()
          Gets the view component.
 B getViewData()
          Data for the view
 GUIViewDescriptor<B> getViewDescriptor()
          Gets the view descriptor.
 void init()
          This method when the view is created.
 void installToolBar(ActionPathList toolBar, ActionContext actionContext)
          Installs a tool bar in the view
 boolean isClosed()
          Returns true if the view is closed.
 void removeViewListener(GUIViewListener<B> listener)
          Removes a listener for the view life-cycle
 void show()
          Shows the view
 
Methods inherited from interface net.sf.doolin.gui.util.PropertyContainer
getProperty, setProperty
 

Method Detail

addViewListener

void addViewListener(GUIViewListener<B> listener)
Adds a listener for the view life-cycle

Parameters:
listener - Listener to add

close

void close()
Actually closes the view


close

boolean close(boolean force)
Closes the view

Parameters:
force - true if the view must be closed.
Returns:
true if the view could be closed

getActionContext

ActionContext getActionContext()
Gets the action context for this view

Returns:
Action context

getApplication

GUIApplication getApplication()
Gets the view owner

Returns:
Application

getID

String getID()
Gets the ID for the view

Returns:
ID

getParentWindow

GUIWindow<?> getParentWindow()
Gets the parent window.

Returns:
the parent window

getViewComponent

JComponent getViewComponent()
Gets the view component.

Returns:
the view component

getViewData

B getViewData()
Data for the view

Returns:
Data

getViewDescriptor

GUIViewDescriptor<B> getViewDescriptor()
Gets the view descriptor.

Returns:
the view descriptor

init

void init()
This method when the view is created.


installToolBar

void installToolBar(ActionPathList toolBar,
                    ActionContext actionContext)
Installs a tool bar in the view

Parameters:
toolBar - Tool bar specification
actionContext - Action context for the tool bar

isClosed

boolean isClosed()
Returns true if the view is closed.

Returns:
true if the view is closed.

removeViewListener

void removeViewListener(GUIViewListener<B> listener)
Removes a listener for the view life-cycle

Parameters:
listener - Listener to remove

show

void show()
Shows the view



Copyright © 2011. All Rights Reserved.