com.jalios.jcmsplugin.virtualdesktop
Class Tab

java.lang.Object
  extended by com.jalios.jcmsplugin.virtualdesktop.Tab

public class Tab
extends Object

Tab of a virtual desktop. Used for virtual desktop's layout and serialization.

Since:
virtualdesktop-1.0
Version:
$Revision: 22731 $

Constructor Summary
Tab()
          Default constructor.
 
Method Summary
 void addColumn(Column column)
          Add the specified column (on last position) to this Tab.
 void deselect()
          Deselect this Tab.
 Column getColumn(String id)
          Retrieve a column of this Tab from its id.
 List<Column> getColumnList()
          Retrieve the Column contained in this Tab.
 String getIcon()
          Retrieve the icon name of this Tab.
 String getId()
          Retrieves the id of this desktopElement
 int getServiceNbr()
          Retrieve the total number of Service of this Tab.
 String getShortName()
          Returns the short name of this class to use of all instance.
 String getTitle()
          Retrieve the title of this Tab.
 boolean isSelected()
          Check if this tab is the selected Tab of the Destkop.
 void removeColumn(Column column)
          Remove the specified column from this Tab.
 void select()
          Select this Tab.
 void setIcon(String icon)
          Set the icon name of this Tab.
 void setSelected(boolean selected)
          Change the selected status of this Tab.
 void setTitle(String title)
          Set the title of this Tab.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tab

public Tab()
Default constructor.

Create a new empty Tab (without any column), with an empty title, and empty icon and deselected.

Method Detail

getShortName

public String getShortName()
Returns the short name of this class to use of all instance. e.g. "desktop", "tab", "column", "service"

Returns:
a string, common to all instance of the same type

toString

public String toString()

getTitle

public String getTitle()
Retrieve the title of this Tab.

Returns:
the title (can return an empty string, but never returns null)
Since:
virtualdesktop-1.0

setTitle

public void setTitle(String title)
Set the title of this Tab.

Parameters:
title - the title to set
Since:
virtualdesktop-1.0

getIcon

public String getIcon()
Retrieve the icon name of this Tab.

Returns:
an icon name
Since:
virtualdesktop-1.0
See Also:
DesktopManager.getIcons()

setIcon

public void setIcon(String icon)
Set the icon name of this Tab.

Parameters:
icon - an icon name
Since:
virtualdesktop-1.0
See Also:
DesktopManager.getIcons()

isSelected

public boolean isSelected()
Check if this tab is the selected Tab of the Destkop. The selected tab is the Tab being displayed to the user when he access his Desktop.

Returns:
true if this Tab is the selected Tab, false otherwise
Since:
virtualdesktop-1.0

setSelected

public void setSelected(boolean selected)
Change the selected status of this Tab.

The selected tab is the Tab being displayed to the user when he access his Desktop. Important : Selecting this tab will not deselect any other tab in the desktop, ensure you deselect other tabs, otherwise the first selected tab is displayed.

Parameters:
selected - true to select the Tab, false otherwise.
Since:
virtualdesktop-1.0

select

public void select()
Select this Tab.

The selected tab is the Tab being displayed to the user when he access his Desktop. Important : Selecting this tab will not deselect any other tab in the desktop, ensure you deselect other tabs, otherwise the first selected tab is displayed.

Since:
virtualdesktop-1.0

deselect

public void deselect()
Deselect this Tab.

The selected tab is the Tab being displayed to the user when he access his Desktop.

Since:
virtualdesktop-1.0

getColumnList

public List<Column> getColumnList()
Retrieve the Column contained in this Tab.

Returns:
a list of Column(never return null)
Since:
virtualdesktop-1.0

getColumn

public Column getColumn(String id)
Retrieve a column of this Tab from its id.

Parameters:
id - the column id to retrieve
Returns:
the Column or null if it could be found.
Since:
virtualdesktop-1.0

addColumn

public void addColumn(Column column)
Add the specified column (on last position) to this Tab.

Parameters:
column - the column to add
Since:
virtualdesktop-1.0

removeColumn

public void removeColumn(Column column)
Remove the specified column from this Tab.

Parameters:
column - the column to remove
Since:
virtualdesktop-1.0

getServiceNbr

public int getServiceNbr()
Retrieve the total number of Service of this Tab.

Returns:
the number of service spread in the column of this Tab
Since:
virtualdesktop-1.0

getId

public final String getId()
Retrieves the id of this desktopElement

Returns:
a unique identifier


Copyright © 2001-2007 Jalios SA. All Rights Reserved.