net.sf.doolin.gui.view.descriptor
Interface GUIViewDescriptor<V>

Type Parameters:
V - Type of the view data.
All Known Implementing Classes:
AbstractGUIViewDescriptor, FormViewDescriptor

public interface GUIViewDescriptor<V>

Descriptor for a view.

Author:
Damien Coraboeuf

Method Summary
 boolean close(GUIView<V> view, boolean force)
          Closes the view
 GUIView<V> createView(GUIWindow<?> parentWindow, V model)
          Creates a view according to this descriptor
 ActionFactory getActionFactory()
          Returns the action factory
 String getIconId()
          Gets the icon id
 String getID(V model)
          Gets the ID for the view (can depend on the model)
 String getTitleExpression()
          Returns the expression used to compute the title of any view
 GUIValidator<V> getValidator()
          Gets the validator to be used for the view
 GUIViewDecorator getViewDecorator()
          Additional decorator for the view
 String getViewId()
          Returns the view ID expression
 void initState(GUIView<V> view)
          This method is called after the view is ready to be displayed, giving a last chance to the descriptor to perform some last-minute initialization.
 

Method Detail

close

boolean close(GUIView<V> view,
              boolean force)
Closes the view

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

createView

GUIView<V> createView(GUIWindow<?> parentWindow,
                      V model)
Creates a view according to this descriptor

Parameters:
parentWindow - Parent window
model - Model for the view
Returns:
View

getActionFactory

ActionFactory getActionFactory()
Returns the action factory

Returns:
Action factory

getIconId

String getIconId()
Gets the icon id

Returns:
Icon id

getID

String getID(V model)
Gets the ID for the view (can depend on the model)

Parameters:
model - Model for the view
Returns:
Computed id

getTitleExpression

String getTitleExpression()
Returns the expression used to compute the title of any view

Returns:
Expression

getValidator

GUIValidator<V> getValidator()
Gets the validator to be used for the view

Returns:
Validator

getViewDecorator

GUIViewDecorator getViewDecorator()
Additional decorator for the view

Returns:
Decorator or null if none is defined.

getViewId

String getViewId()
Returns the view ID expression

Returns:
Expression for the view ID

initState

void initState(GUIView<V> view)
This method is called after the view is ready to be displayed, giving a last chance to the descriptor to perform some last-minute initialization.

Parameters:
view - View to initialize


Copyright © 2011. All Rights Reserved.