net.sf.doolin.gui.window.descriptor
Class AbstractCompositeGUIWindowDescriptor<B,C>

java.lang.Object
  extended by net.sf.doolin.gui.window.descriptor.AbstractGUIWindowDescriptor<B>
      extended by net.sf.doolin.gui.window.descriptor.AbstractCompositeGUIWindowDescriptor<B,C>
Type Parameters:
B - Type of data for the window
C - Type of constraint for the views
All Implemented Interfaces:
GUIWindowDescriptor<B>, org.springframework.beans.factory.BeanNameAware
Direct Known Subclasses:
DockingWindowDescriptor, LayoutGUIWindowDescriptor, TabbedGUIWindowDescriptor

public abstract class AbstractCompositeGUIWindowDescriptor<B,C>
extends AbstractGUIWindowDescriptor<B>
implements org.springframework.beans.factory.BeanNameAware

Window descriptor that contains several views.

Author:
Damien Coraboeuf

Constructor Summary
AbstractCompositeGUIWindowDescriptor()
           
 
Method Summary
protected
<V> void
arrangeView(GUIWindow<B> window, GUIView<V> view, C constraint, DecorationStyle decorationStyle)
          Arrange view.
protected abstract
<V> void
arrangeViewInWindow(GUIWindow<B> window, GUIView<V> view, JComponent viewDecoratedComponent, C constraint)
          Arrange view.
protected
<V> void
arrangeViewReference(ViewReference<V,C> viewReference, GUIWindow<B> window)
          Arrange view reference.
protected  void arrangeViews(GUIWindow<B> window)
          Arranges the views inside the window.
protected
<V> GUIView<V>
arrangeViewWithReference(GUIWindow<B> window, ViewReference<V,C> viewReference, V viewData)
          Arrange view with reference.
protected abstract  void arrangeWindow(GUIWindow<B> window)
          Arranges the window.
protected
<V> ViewReference<V,C>
findViewReference(GUIWindow<B> parentWindow, GUIViewDescriptor<V> viewDescriptor, V viewData)
          Finds a view reference for the given view descriptor and view model.
 GUIViewDecorator getViewDecorator()
          Gets the view decorator.
 List<ViewReference<?,C>> getViewReferences()
          Gets the view references.
<V> GUIView<V>
openView(GUIWindow<B> parentWindow, GUIViewDescriptor<V> viewDescriptor, V viewData)
          Opens a view in the window
 void setViewDecorator(GUIViewDecorator viewDecorator)
          Sets the view decorator.
 void setViewReferences(List<ViewReference<?,C>> viewReferences)
          Sets the view references.
 
Methods inherited from class net.sf.doolin.gui.window.descriptor.AbstractGUIWindowDescriptor
activateView, arrange, arrangeActionBars, createWindow, getActionFactory, getCloseAction, getIconId, getIconService, getMenuBar, getSize, getTitleExpression, getToolBars, getWindow, getWindowId, getWindowId, getWindowListeners, hideView, initViewComponent, onCloseWindow, onClosingWindow, onOpenedWindow, setActionFactory, setBeanName, setCloseAction, setIconId, setIconService, setMenuBar, setSize, setTitleExpression, setToolBars, setWindowFactory, setWindowId, setWindowListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.beans.factory.BeanNameAware
setBeanName
 

Constructor Detail

AbstractCompositeGUIWindowDescriptor

public AbstractCompositeGUIWindowDescriptor()
Method Detail

arrangeView

protected <V> void arrangeView(GUIWindow<B> window,
                               GUIView<V> view,
                               C constraint,
                               DecorationStyle decorationStyle)
Arrange view.

Type Parameters:
V - Type of data for the view
Parameters:
window - the window
view - the view
constraint - the constraint
decorationStyle - the decoration style

arrangeViewInWindow

protected abstract <V> void arrangeViewInWindow(GUIWindow<B> window,
                                                GUIView<V> view,
                                                JComponent viewDecoratedComponent,
                                                C constraint)
Arrange view.

Type Parameters:
V - Type of data for the view
Parameters:
window - the window
view - the view
viewDecoratedComponent - the view decorated component
constraint - the constraint

arrangeViewReference

protected <V> void arrangeViewReference(ViewReference<V,C> viewReference,
                                        GUIWindow<B> window)
Arrange view reference.

Type Parameters:
V - Type of data for the view
Parameters:
viewReference - the view reference
window - the window

arrangeViews

protected void arrangeViews(GUIWindow<B> window)
Arranges the views inside the window.

Specified by:
arrangeViews in class AbstractGUIWindowDescriptor<B>
Parameters:
window - Window to arrange

arrangeViewWithReference

protected <V> GUIView<V> arrangeViewWithReference(GUIWindow<B> window,
                                                  ViewReference<V,C> viewReference,
                                                  V viewData)
Arrange view with reference.

Type Parameters:
V - Type of data for the view
Parameters:
window - the window
viewReference - the view reference
viewData - the view data
Returns:
View

arrangeWindow

protected abstract void arrangeWindow(GUIWindow<B> window)
Arranges the window.

Specified by:
arrangeWindow in class AbstractGUIWindowDescriptor<B>
Parameters:
window - Window

findViewReference

protected <V> ViewReference<V,C> findViewReference(GUIWindow<B> parentWindow,
                                                   GUIViewDescriptor<V> viewDescriptor,
                                                   V viewData)
Finds a view reference for the given view descriptor and view model.

Type Parameters:
V - Type of data for the view
Parameters:
parentWindow - Parent window
viewDescriptor - View descriptor
viewData - Data for the view
Returns:
View reference

getViewDecorator

public GUIViewDecorator getViewDecorator()
Gets the view decorator.

Returns:
the view decorator

getViewReferences

public List<ViewReference<?,C>> getViewReferences()
Gets the view references.

Returns:
the view references

openView

public <V> GUIView<V> openView(GUIWindow<B> parentWindow,
                               GUIViewDescriptor<V> viewDescriptor,
                               V viewData)
Description copied from interface: GUIWindowDescriptor
Opens a view in the window

Specified by:
openView in interface GUIWindowDescriptor<B>
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

setViewDecorator

public void setViewDecorator(GUIViewDecorator viewDecorator)
Sets the view decorator.

Parameters:
viewDecorator - the view decorator

setViewReferences

public void setViewReferences(List<ViewReference<?,C>> viewReferences)
Sets the view references.

Parameters:
viewReferences - the new view references


Copyright © 2011. All Rights Reserved.