com.pow2.webgui.tabbedselector
Class TabbedSelector

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.pow2.webgui.Widget
              extended by com.pow2.webgui.tabbedselector.TabbedSelector
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.Tag
Direct Known Subclasses:
TabbedSelectorTag

public class TabbedSelector
extends Widget

TabbedSelector class.

Author:
Luca Fossato
See Also:
Serialized Form

Field Summary
static String KEY
          tabbedSelector key
protected  String selectedTab
          name of the selected tab
protected  ArrayList tabs
          tab list
 
Fields inherited from class com.pow2.webgui.Widget
cat, color, content, contentProvider, contentProviderName, drawer, followUp, height, id, name, parentW, title, titleType, widgetDrawer, widgetInfo, width
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
TabbedSelector()
          Default protected constructor.
 
Method Summary
 void addTab(Tab tab)
          Adds a tab widget to this TabbedPanel.
 void addTab(Tab tab, StringBuffer cnt)
          Adds a tab widget to this TabbedPanel.
 String getSelectedTab()
          Gets the selectedTab attribute of the TabbedPanel object
 ArrayList getTabs()
          Gets the the tabs list of this TabbedPanel
protected  StringBuffer getTabsDescription()
          Gets the description of the TabbedPanel tabs.
 void removeTab(String name)
          Removes the tab component with the given name from the tabbedPanel list.
 void removeTab(Tab tab)
          Removes the input tab component from the tabbedPanel list.
 void removeTabs()
          Removes all the tab components
 void setSelectedTab(String newSelectedTab)
          Sets the selectedTab attribute of the TabbedPanel object
 void updateAttributes(TabbedSelector w)
          Updates the input TabbedSelector attributes using the attributes of this class.
 
Methods inherited from class com.pow2.webgui.Widget
draw, getColor, getContent, getContentProvider, getContentProviderName, getDrawer, getFollowUp, getHeight, getId, getName, getParentW, getTitle, getTitleType, getWidgetDrawer, getWidgetInfo, getWidth, setColor, setContent, setContentProvider, setContentProviderName, setDrawer, setFollowUp, setHeight, setId, setName, setParentW, setTitle, setTitleType, setWidgetDrawer, setWidgetInfo, setWidth, updateAttributes
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

KEY

public static final String KEY
tabbedSelector key

See Also:
Constant Field Values

tabs

protected ArrayList tabs
tab list


selectedTab

protected String selectedTab
name of the selected tab

Constructor Detail

TabbedSelector

public TabbedSelector()
Default protected constructor.

Method Detail

setSelectedTab

public void setSelectedTab(String newSelectedTab)
Sets the selectedTab attribute of the TabbedPanel object

Parameters:
newSelectedTab - the new selectedTab value

getSelectedTab

public String getSelectedTab()
Gets the selectedTab attribute of the TabbedPanel object

Returns:
The selectedTab value

getTabs

public ArrayList getTabs()
Gets the the tabs list of this TabbedPanel

Returns:
the ArrayList object containing the tabs list.

addTab

public void addTab(Tab tab,
                   StringBuffer cnt)
Adds a tab widget to this TabbedPanel.

Parameters:
tab - the tab object to add to.
cnt - the tab content.

addTab

public void addTab(Tab tab)
Adds a tab widget to this TabbedPanel.

Parameters:
tab - the tab object to add to.

removeTab

public void removeTab(Tab tab)
Removes the input tab component from the tabbedPanel list.

Parameters:
tab - the tab object to remove.

removeTab

public void removeTab(String name)
Removes the tab component with the given name from the tabbedPanel list.

Parameters:
name - the name of the tab component to remove.

removeTabs

public void removeTabs()
Removes all the tab components


updateAttributes

public void updateAttributes(TabbedSelector w)
Updates the input TabbedSelector attributes using the attributes of this class.
THis method is called by the relative widget tag class.

Parameters:
w - Description of the Parameter

getTabsDescription

protected StringBuffer getTabsDescription()
                                   throws Exception
Gets the description of the TabbedPanel tabs.

Returns:
the description of the TabbedPanel tabs
Throws:
Exception - if any error occurs


Copyright © 2002-2005 Power Of Two S.r.l. All Rights Reserved.