org.objectweb.jac.aspects.gui.web
Class AbstractCompositeView

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.web.AbstractView
        |
        +--org.objectweb.jac.aspects.gui.web.AbstractCompositeView
All Implemented Interfaces:
CompositeView, HTMLViewer, View, ViewIdentity
Direct Known Subclasses:
Container, Customized, EmbeddedMethod, Panel, SingleSlotContainer, Tabs

public class AbstractCompositeView
extends AbstractView
implements CompositeView, HTMLViewer

Base class for composite views


Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
column, context, description, height, isCellViewer, label, parentView, row, table, width
 
Constructor Summary
AbstractCompositeView()
           
 
Method Summary
protected  void add(View component)
           
 void addHorizontalStrut(int width)
          Adds an horizontal separator in the composite in order to insert blanks between components.
 void addVerticalStrut(int height)
          Adds a vertical separator in the composite in order to insert blanks between components.
 void addView(View view)
          Adds a component view in the composite.
 void addView(View view, Object extraInfo)
          Adds a component view in the composite.
 void close(boolean validate)
          Close this view.
protected  void closeAllViews(boolean validate)
           
 boolean containsView(String viewType, Object[] parameters)
          Tells wether the composite view contains a view with some given view type and paramters
 void genDescription(PrintWriter out)
           
 void genHTML(PrintWriter out)
          Generate the HTML code for the editor.
 void genMessage(PrintWriter out)
           
 View getView(Object id)
          Gets a component view from an id object.
 Collection getViews()
          Gets all the component views in this composite.
 void removeAllViews(boolean validate)
          Removes all the views in this composite.
 void removeView(View component, boolean validate)
          Removes a component view in this composite.
 void setContext(DisplayContext context)
          Sets the display context for this view.
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
closeForm, equalsView, equalsView, eventURL, eventURL, genBody, genEventAndActionButton, genPage, genStyleSheets, getBaseURL, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, iconElement, iconElement, isClosed, isDescendantOf, isInForm, openForm, printAttributes, setAttribute, setColumn, setDescription, setFactory, setFocus, setLabel, setMessage, setParameters, setParentView, setRow, setSize, setStyle, setStyleSheet, setTable, setType, setViewBorder, showButton, showFormButtons, showFormButtons
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jac.aspects.gui.View
getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, setDescription, setFactory, setFocus, setLabel, setMessage, setParentView, setSize, setStyle, setViewBorder
 
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity
equalsView, equalsView, getParameters, getType, setParameters, setType
 
Methods inherited from interface org.objectweb.jac.aspects.gui.web.HTMLViewer
setStyleSheet
 

Constructor Detail

AbstractCompositeView

public AbstractCompositeView()
Method Detail

setContext

public void setContext(DisplayContext context)
Description copied from interface: View
Sets the display context for this view.

The display context contains the factory that is used for this view.

Specified by:
setContext in interface View
Overrides:
setContext in class AbstractView

addHorizontalStrut

public void addHorizontalStrut(int width)
Description copied from interface: CompositeView
Adds an horizontal separator in the composite in order to insert blanks between components.

Specified by:
addHorizontalStrut in interface CompositeView

addVerticalStrut

public void addVerticalStrut(int height)
Description copied from interface: CompositeView
Adds a vertical separator in the composite in order to insert blanks between components.

Specified by:
addVerticalStrut in interface CompositeView

addView

public void addView(View view,
                    Object extraInfo)
Description copied from interface: CompositeView
Adds a component view in the composite.

Specified by:
addView in interface CompositeView
Parameters:
view - the component view
extraInfo - some positionning infos on where the component should be added in the composite

addView

public void addView(View view)
Description copied from interface: CompositeView
Adds a component view in the composite.

Specified by:
addView in interface CompositeView
Parameters:
view - the component view

getViews

public Collection getViews()
Description copied from interface: CompositeView
Gets all the component views in this composite.

Specified by:
getViews in interface CompositeView

getView

public View getView(Object id)
Description copied from interface: CompositeView
Gets a component view from an id object.

Specified by:
getView in interface CompositeView

containsView

public boolean containsView(String viewType,
                            Object[] parameters)
Description copied from interface: CompositeView
Tells wether the composite view contains a view with some given view type and paramters

Specified by:
containsView in interface CompositeView
Parameters:
viewType - the type of the view to look for
parameters - the parameters of the view to look for
Returns:
true if the composite contains a view with the given type and parameters

removeView

public void removeView(View component,
                       boolean validate)
Description copied from interface: CompositeView
Removes a component view in this composite.

Specified by:
removeView in interface CompositeView
Parameters:
component - the component view to remove
validate - wether to validate values in editors

removeAllViews

public void removeAllViews(boolean validate)
Description copied from interface: CompositeView
Removes all the views in this composite.

Specified by:
removeAllViews in interface CompositeView
Parameters:
validate - wether to validate values in editors

close

public void close(boolean validate)
Description copied from interface: View
Close this view. This should be upcalled when the view is closed in order to free resources or close other dependant views.

Specified by:
close in interface View
Overrides:
close in class AbstractView
Parameters:
validate - wether to validate any value contained in editors.

closeAllViews

protected void closeAllViews(boolean validate)

add

protected void add(View component)

genDescription

public void genDescription(PrintWriter out)

genMessage

public void genMessage(PrintWriter out)

genHTML

public void genHTML(PrintWriter out)
             throws IOException
Description copied from interface: HTMLViewer
Generate the HTML code for the editor.

Specified by:
genHTML in interface HTMLViewer
Parameters:
out - the writer where to write the HTML code.
IOException