com.sas.visuals
Interface TabBarInterface

All Superinterfaces:
ActionSource, Alignment, Direction, java.util.EventListener, java.awt.event.ItemListener, java.awt.ItemSelectable, Justification, Sizing
All Known Implementing Classes:
TabBar

public interface TabBarInterface
extends java.awt.ItemSelectable, java.awt.event.ItemListener, ActionSource, Justification, Direction, Sizing

TabBarInterface is an interface for containers of TabButtonInterface objects. It supports creating and adding the TabButtonInterface objects, as well as laying out the tabButtons in a multi-row or a single row style. The tabButtons orientation can also be setup using the TabBarInterface. The tabButtons can also be enabled or hidden using the TabBarInterface.

See Also:
TabBar, TabButtonInterface

Field Summary
static int BOTTOM
           
static int LEFT
           
static int MULTIGROUP
           
static int NONE
           
static int RIGHT
           
static int SCROLLABLE
           
static int TOP
           
 
Fields inherited from interface com.sas.visuals.Justification
FULL
 
Fields inherited from interface com.sas.visuals.Alignment
BEGIN, CENTER, END
 
Fields inherited from interface com.sas.visuals.Direction
BOTTOM_TO_TOP, COLUMN_MAJOR, LEFT_TO_RIGHT, RB_KEY, RIGHT_TO_LEFT, ROW_MAJOR, TOP_TO_BOTTOM
 
Fields inherited from interface com.sas.visuals.Sizing
PROPORTIONAL, UNIFORM
 
Method Summary
 void add(java.awt.Component comp, java.lang.Object constraints, int index)
          Add a TabButtonInterface component to the TabBarInterface container with the specified constraints at the specified index.
 java.awt.Component addItem(java.lang.Object tabItem, java.lang.Integer grpIndex, int index)
          Construct and add a TabButtonInterface component to the container with the specified item in the specified group.
 int getGroupCount()
          Get the number of groups in this TabBar.
 java.awt.LayoutManager getLayout()
          Get the layout manager of the TabBar.
 int getOrientation()
          Get the orientation of the panel.
 BorderInterface getRowBorder()
          Get the Border used to draw the rows.
 int getSelectedIndex()
          Get the index of the selected tab.
 java.lang.Object getSelectedItem()
          Get the item property of the selected TabButtonInterface object.
 SelectionGroupInterface getSelectionGroup()
          Get the SelectionGroupInterface that the tabs belong to.
 int getStyle()
          Get the style of the RowLayout.
 int getTabGroupIndex(TabButtonInterface tab)
          Get the index of the group this tab belongs to.
 void remove(java.awt.Component comp)
          Remove the specified tab from the TabBarInterface.
 void removeAll()
          Remove all tabs from this TabBarInterface.
 void removeItem(java.lang.Object item)
          Remove the tab with the specified item property.
 void setOrientation(int orient)
          Set the orientation of the tabs on this container.
 void setRowBorder(BorderInterface border)
          Set the row border of the TabBarInterface
 void setSelectedIndex(int index)
          Select the tab at the specified index.
 void setSelectedItem(java.lang.Object item)
          Select the tab with specified item property.
 void setStyle(int newStyle)
          Set the tab layout style.
 void setTabButtonClass(java.lang.Class tClass)
          Set the class of the default tabs created when an addItem() method is called.
 void setTabEnabled(boolean enabled, int index)
          Set the enabled state of the tab at the specified index.
 void setTabEnabled(boolean enabled, java.lang.Object item)
          Set the enabled state of the tab with the specified item.
 void setTabVisible(boolean visible, int index)
          Set the visisble state of the tab at the specified index.
 void setTabVisible(boolean visible, java.lang.Object item)
          Set the visible state of the tab with the specified item.
 
Methods inherited from interface com.sas.awt.ActionSource
addActionListener, removeActionListener
 

Field Detail

NONE

static final int NONE
See Also:
Constant Field Values

TOP

static final int TOP
See Also:
Constant Field Values

BOTTOM

static final int BOTTOM
See Also:
Constant Field Values

LEFT

static final int LEFT
See Also:
Constant Field Values

RIGHT

static final int RIGHT
See Also:
Constant Field Values

SCROLLABLE

static final int SCROLLABLE
See Also:
Constant Field Values

MULTIGROUP

static final int MULTIGROUP
See Also:
Constant Field Values
Method Detail

add

void add(java.awt.Component comp,
         java.lang.Object constraints,
         int index)
Add a TabButtonInterface component to the TabBarInterface container with the specified constraints at the specified index.

Parameters:
comp - the tab component to add to the TabBarInterface
constraints - the layout constraints
index - the position in the container's list at which to insert the component. -1 means insert at the end.
See Also:
Container

addItem

java.awt.Component addItem(java.lang.Object tabItem,
                           java.lang.Integer grpIndex,
                           int index)
Construct and add a TabButtonInterface component to the container with the specified item in the specified group.

Parameters:
tabItem - the item to set on the TabButtonInterface.
grpIndex - the index of the group to add the tab to.
index - the position at which to insert the component. -1 means insert at the end.
Returns:
the component added to the TabBarInterface

getGroupCount

int getGroupCount()
Get the number of groups in this TabBar.

Returns:
the number of groups in the TabBarInterface

getLayout

java.awt.LayoutManager getLayout()
Get the layout manager of the TabBar.


getOrientation

int getOrientation()
Get the orientation of the panel.

Returns:
an orientation value: TOP, BOTTOM, RIGHT, or LEFT
See Also:
setOrientation(int)

getRowBorder

BorderInterface getRowBorder()
Get the Border used to draw the rows.

Returns:
the border used to draw the rows of the TabBarInterface.
See Also:
setRowBorder(com.sas.visuals.BorderInterface)

getStyle

int getStyle()
Get the style of the RowLayout.

Returns:
a style value: SCROLLABLE or MULTIGROUP
See Also:
setStyle(int)

getSelectionGroup

SelectionGroupInterface getSelectionGroup()
Get the SelectionGroupInterface that the tabs belong to.

Returns:
the SelectionGroupInterface handling the selection behavior of the tabs.

getSelectedIndex

int getSelectedIndex()
Get the index of the selected tab.

Returns:
the index of the selected tab.
See Also:
setSelectedIndex(int)

getSelectedItem

java.lang.Object getSelectedItem()
Get the item property of the selected TabButtonInterface object.

Returns:
the item property of the selected TabButtonInterface object
See Also:
setSelectedItem(java.lang.Object)

getTabGroupIndex

int getTabGroupIndex(TabButtonInterface tab)
Get the index of the group this tab belongs to.

Parameters:
tab - the tab to determine which group it is in
Returns:
the index of the group the specified tab belongs to

remove

void remove(java.awt.Component comp)
Remove the specified tab from the TabBarInterface.

Parameters:
comp - the TabButtonInterface component to remove from the TabBarInterface

removeItem

void removeItem(java.lang.Object item)
Remove the tab with the specified item property.

Parameters:
item - the item property of the TabButtonInterface object to remove

removeAll

void removeAll()
Remove all tabs from this TabBarInterface.


setOrientation

void setOrientation(int orient)
Set the orientation of the tabs on this container.

Parameters:
orient - an orientation value: TOP, BOTTOM, LEFT, or RIGHT
See Also:
getOrientation()

setRowBorder

void setRowBorder(BorderInterface border)
Set the row border of the TabBarInterface

Parameters:
border - the border drawn for each row
See Also:
getRowBorder()

setSelectedIndex

void setSelectedIndex(int index)
Select the tab at the specified index.

Parameters:
index - the index of the tab to select
See Also:
getSelectedIndex()

setSelectedItem

void setSelectedItem(java.lang.Object item)
Select the tab with specified item property.

Parameters:
item - the item property of the tab to select
See Also:
getSelectedItem()

setStyle

void setStyle(int newStyle)
Set the tab layout style.

Parameters:
newStyle - a style value: SCROLLABLE or MULTIGROUP
See Also:
getStyle()

setTabButtonClass

void setTabButtonClass(java.lang.Class tClass)
Set the class of the default tabs created when an addItem() method is called.

Parameters:
tClass - the class of the tab to create by default

setTabEnabled

void setTabEnabled(boolean enabled,
                   java.lang.Object item)
Set the enabled state of the tab with the specified item.

Parameters:
enabled - the enabled state of the tab
item - the item property of the tab to set the enabled property of.

setTabEnabled

void setTabEnabled(boolean enabled,
                   int index)
Set the enabled state of the tab at the specified index.

Parameters:
enabled - the enabled state of the tab
index - the index of the tab to set the enabled property of.

setTabVisible

void setTabVisible(boolean visible,
                   java.lang.Object item)
Set the visible state of the tab with the specified item.

Parameters:
visible - the visible state of the tab
item - the item property of the tab to set the visible property of.

setTabVisible

void setTabVisible(boolean visible,
                   int index)
Set the visisble state of the tab at the specified index.

Parameters:
visisble - the visisble state of the tab
index - the index of the tab to set the visisble property of.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.