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

java.lang.Object
  extended byorg.objectweb.jac.aspects.gui.web.AbstractView
      extended byorg.objectweb.jac.aspects.gui.web.AbstractCompositeView
          extended byorg.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)
          Add a tab
 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, closeAllViews, containsView, genDescription, genMessage, getViews, 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, 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, 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

Tabs

public Tabs()
Method Detail

addView

public void addView(View view,
                    Object extraInfos)
Add a tab

Specified by:
addView in interface CompositeView
Overrides:
addView in class AbstractCompositeView
Parameters:
extraInfos - a String which is the title of the pane

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
Throws:
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