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

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.web.AbstractView
        |
        +--org.objectweb.jac.aspects.gui.web.AbstractCompositeView
              |
              +--org.objectweb.jac.aspects.gui.web.Panel
All Implemented Interfaces:
CompositeView, HTMLViewer, PanelView, View, ViewIdentity

public class Panel
extends AbstractCompositeView
implements PanelView, HTMLViewer


Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
column, context, description, height, isCellViewer, label, parentView, row, table, width
 
Fields inherited from interface org.objectweb.jac.aspects.gui.PanelView
LEFT, LOWER, LOWER_LEFT, LOWER_RIGHT, RIGHT, UPPER, UPPER_LEFT, UPPER_RIGHT
 
Constructor Summary
Panel(ViewFactory factory, int subPanesCount, int geometry, Map paneContainers, boolean[] scrollings, Map splitterLocations)
           
 
Method Summary
 void addView(View component, Object extraInfo)
          Adds a view.
 void close(boolean validate)
          Close this view.
protected  void construct()
           
 void genHTML(PrintWriter out)
          Generate the HTML code for the editor.
protected  float getSplitterLocation(int splitId)
          Returns a splitter's loctation as a percentage between 0 and 100.
 View getView(Object id)
          Gets a component view from an id object.
 Collection getViews()
          Gets all the component views in this composite.
 void removeAllViews()
           
 void setSplitterLocation(int splitId, float location)
          Sets a splitter location.
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractCompositeView
add, addHorizontalStrut, addVerticalStrut, addView, closeAllViews, containsView, genDescription, genMessage, removeAllViews, removeView, setContext
 
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.CompositeView
addHorizontalStrut, addVerticalStrut, addView, containsView, removeAllViews, removeView
 
Methods inherited from interface org.objectweb.jac.aspects.gui.View
getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, setContext, 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

Panel

public Panel(ViewFactory factory,
             int subPanesCount,
             int geometry,
             Map paneContainers,
             boolean[] scrollings,
             Map splitterLocations)
Method Detail

construct

protected void construct()

setSplitterLocation

public void setSplitterLocation(int splitId,
                                float location)
Description copied from interface: PanelView
Sets a splitter location.

The splitter is referenced by its index going from the front-end splitter to the back-end splitters. For instance, in the case of a 3 sub-panel window, the 0 index references the splitter that splits the main window in two, the 1 index, the one that splits the half-window in two other smaller parts.

Specified by:
setSplitterLocation in interface PanelView
Parameters:
splitId - the splitter's index
location - the position in pixel, regarding to the top/left component, a negative value means that the splitter should be set at the preferred sized of the inner components

getSplitterLocation

protected float getSplitterLocation(int splitId)
Returns a splitter's loctation as a percentage between 0 and 100.


addView

public void addView(View component,
                    Object extraInfo)
Adds a view.

Specified by:
addView in interface CompositeView
Overrides:
addView in class AbstractCompositeView
Parameters:
component - the view to add
extraInfo - the panel ID

getViews

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

Specified by:
getViews in interface CompositeView
Overrides:
getViews in class AbstractCompositeView

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
Overrides:
getView in class AbstractCompositeView

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 AbstractCompositeView
Parameters:
validate - wether to validate any value contained in editors.

removeAllViews

public void removeAllViews()

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
Overrides:
genHTML in class AbstractCompositeView
Parameters:
out - the writer where to write the HTML code.
IOException