JAC project
AOPSYS
CEDRIC & LIP6 labs

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

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

public class Tabs
extends AbstractCompositeView
implements TabsListener, TabsView

A tabs component.


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
Tabs()
           
 
Method Summary
 void addTab(View component, String category, String icon)
          Add a view in tab
 void addView(View view, Object extraInfos)
          Adds a component view in the composite.
 void genHTML(PrintWriter out)
          Generate the HTML code for the editor.
 View getTab(String tab)
          Returns the tab with a given name
 View getView(Object id)
          Gets a component view from an id object.
 void onSelect(int index)
          Called when a tab is selected
 void select(String tab)
          Select a tab.
protected  void setSelected(View selected)
          Disable editors which are not an the selected tab
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractCompositeView
add, addHorizontalStrut, addVerticalStrut, addView, close, genDescription, genMessage, getViews, removeAllViews, removeView, setContext
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
equals, eventURL, eventURL, genBody, genPage, genStyleSheets, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, hashCode, iconElement, iconElement, isClosed, isDescendantOf, isInForm, printAttributes, setAttribute, setColumn, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParameters, setParentView, setRow, setStyle, setStyleSheet, setTable, setType, setViewBorder, setWidth, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jac.aspects.gui.CompositeView
addHorizontalStrut, addVerticalStrut, addView, getViews, removeAllViews, removeView
 
Methods inherited from interface org.objectweb.jac.aspects.gui.View
close, getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParentView, setStyle, setViewBorder, setWidth, validate
 
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity
getParameters, getType, setParameters, setType
 
Methods inherited from interface org.objectweb.jac.aspects.gui.web.HTMLViewer
setStyleSheet
 

Constructor Detail

Tabs

public Tabs()
Method Detail

addView

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

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

addTab

public void addTab(View component,
                   String category,
                   String icon)
Description copied from interface: TabsView
Add a view in tab

Specified by:
addTab in interface TabsView
Parameters:
component - the view to add
category - the name of the tab
icon - the icon of the tab

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

select

public void select(String tab)
Description copied from interface: TabsView
Select a tab.

Specified by:
select in interface TabsView
Parameters:
tab - the name of the tab to select

setSelected

protected void setSelected(View selected)
Disable editors which are not an the selected tab


getTab

public View getTab(String tab)
Returns the tab with a given name

Parameters:
tab - the name of the tab

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

onSelect

public void onSelect(int index)
Description copied from interface: TabsListener
Called when a tab is selected

Specified by:
onSelect in interface TabsListener
Parameters:
index - the index of the tab to select

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli