com.pmease.quickbuild.web.component.tabbedpanel
Class Tab

java.lang.Object
  extended by com.pmease.quickbuild.web.component.tabbedpanel.Tab
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GroupingTab, ReportTab

public abstract class Tab
extends java.lang.Object
implements java.io.Serializable

The base class for tab definition of a tabbed panel. A tab has identifier and title. If selected, the this#getPanel(String, Map) method will be called to create a content panel. Tab identifier is used to remember and select this tab. For example the change sets tab can be selected by specifying url as http://<server>:<port>/build/<build id>/changes/change_sets. Here changes and change_sets are tab identifiers.

See Also:
Serialized Form

Constructor Summary
Tab(java.lang.String title)
          Constructs a tab with specified title.
Tab(java.lang.String id, org.apache.wicket.model.IModel<java.lang.String> titleModel)
          Construct a tab with specified identifier and title model.
Tab(java.lang.String id, java.lang.String title)
          Constructs a tab with specified identifier and title.
 
Method Summary
 java.lang.String getId()
          Get identifier of the tab.
 int getOrder()
          Returns the order of this tab
abstract  org.apache.wicket.markup.html.panel.Panel getPanel(java.lang.String id, java.util.Map<java.lang.String,java.lang.String> params)
          Get the content panel with specified identifier and panel parameters.
 java.lang.String getTitle()
          Get title of the tab.
 org.apache.wicket.model.IModel<java.lang.String> getTitleModel()
          Get title model of the tab.
 Tab setOrder(int order)
          Set the order of this tab
static java.lang.String title2id(java.lang.String title)
          Converts a title to identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tab

public Tab(java.lang.String id,
           org.apache.wicket.model.IModel<java.lang.String> titleModel)
Construct a tab with specified identifier and title model.

Parameters:
id - identifier of the tab
titleModel - title model of this tab

Tab

public Tab(java.lang.String id,
           java.lang.String title)
Constructs a tab with specified identifier and title.

Parameters:
id -
title -

Tab

public Tab(java.lang.String title)
Constructs a tab with specified title. The tab identifier will be derived from the title by casting the title string to lower case and replace all space characters with underscores. For example, id will be derived as change_sets if the title is Change Sets.

Parameters:
title -
Method Detail

getId

public java.lang.String getId()
Get identifier of the tab.

Returns:

getTitleModel

public org.apache.wicket.model.IModel<java.lang.String> getTitleModel()
Get title model of the tab.

Returns:

getTitle

public java.lang.String getTitle()
Get title of the tab.

Returns:

title2id

public static java.lang.String title2id(java.lang.String title)
Converts a title to identifier. Used internally by QuickBuild.

Parameters:
title -
Returns:

getOrder

public int getOrder()
Returns the order of this tab

Returns:

setOrder

public Tab setOrder(int order)
Set the order of this tab

Parameters:
order -
Returns:

getPanel

public abstract org.apache.wicket.markup.html.panel.Panel getPanel(java.lang.String id,
                                                                   java.util.Map<java.lang.String,java.lang.String> params)
Get the content panel with specified identifier and panel parameters.

Parameters:
id - wicket id of the panel
params - represents decoded query parameters of the url and can be used to restore panel states. You may safely ignore this parameter if your panel does not need to restore states.
Returns:


Copyright © 2005-2010 PMEase Inc. All Rights Reserved.