|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.visuals.TabbedView
public class TabbedView
The TabbedView is a container that allows multiple views to be defined in the same area
and viewed exclusively. The TabbedView is made up of two basic components: a TabBarInterface object
and a Container object. The TabBarInterface object manages the placement of the tabs
associated with individual views. The TabBarInterface contains TabButtonInterface objects
that are members of a SelectionGroup, allowing only one tab to be selected at a time.
The Container object manages showing and hiding the view associated with the selected tab.
The views can be switched by selecting the tab associated with the view to be displayed.
Creating a TabbedView Component
A valid instance is created by instantiating an object of TabbedView followed by calling its public initialize method as shown below. This is necessary in order to initialize internal values and components required by a TabbedView object. Failure to do so may cause unexpected behavior.
TabbedView tabbedView1 = new TabbedView(); tabbedView1.initialize();
By default the TabbedView orientation is com.sas.geometry.Orientations.TOP and the style is TabBarInterface.SCROLLABLE. TabbedView also supports two other constructors to set either the orientation or the orientation and the style of the TabbedView:
// set orientation TabbedView1 tabbedView1 = new TabbedView( Orientations.BOTTOM ); tabbedView1.initialize();
// set orientation and style TabbedView1 tabbedView1 = new TabbedView( com.sas.geometry.Orientations.BOTTOM, TabBarInterface.MULTIGROUP ); tabbedView1.initialize();Usage
The components that can be added and removed from the TabbedView are tabs and views. The view components must be derived from java.awt.Container and the tabs must implement the com.sas.visuals.TabButtonInterface.
Example View and Tab classes:
com.sas.awt.Container view1 = new com.sas.awt.Container // View class com.sas.visuals.TabButton tabButton1 = new com.sas.visuals.TabButton // Tab class
Setting up a Model
The TabbedView requires the StaticOrderedCollectionInterface for use as a model. The model elements should all be made up of the same type of objects. The model can be of Type OrderedCollection if it will be modifiable. The different types that are supported are TabButtonInterface objects(used as the tabs), java.awt.Container objects(used as the views), and item objects( used as the items of the tabs ). The model can also be of type AssociationListInterface. If the model supports this, the key values should be either TabButtonInterface objects or items to be set on the tabs, and the element values should be java.awt.Container types to be used as the views. If a model is not static and an add is called on the tabbedView then the appropriate type object will be added to the model.
Adding Views
Views can be added to the TabbedView in several different ways:
tabbedView1.add( view1, "Tab 1"); // or tabbedView1.add( view1, "Tab 1", 2 ); // to add at position 2(zero-based)
tabButton1 = new TabButton(); tabButton1.setItem("Tab 1"); tabbedView1.add( tabButton1 ); // or tabbedView1.add( tabButton1, new Integer(1) ); // to add tab to the 2nd group(row) java.awt.Container container1 = tabbedView1.getView( tabButton1 ); // or tabbedView1.getView("Tab 1"); container1.add( new Button("Hello World") );
com.sas.awt.Container container1 = new com.sas.awt.Container(); com.sas.visuals.TabButton tabButton1 = new com.sas.visuals.TabButton(); tabButton1.setItem("Tab 1"); container1.add( new Button("Hello World") ); tabbedView1.add( container1, tabButton1 ); // or tabbedView1.add( tabButton1, container1 );
tabbedView1.addItem("Tab 1"); java.awt.Container container1 = tabbedView1.getView("Tab 1"); container1.add( new Button("Hello World") );
view1 = new com.sas.awt.Container(); tabbedView1.addItem( view1, "Tab 1" ); // or tabbedView1.add( view1, "Tab 1", new Integer(1) ); // to add tab to the 2nd group(row) // or tabbedView1.add( view1, "Tab 1", 2 ); // to add tab at position 2(zero-based) // or tabbedView1.add( view1, "Tab 1", new Integer(1), 2 ); // to add tab to the 2nd group(row) at overall position 2(zero-based)
com.sas.visuals.TabFolder tabFolder1 = new TabFolder(); tabbedView1.add( tabFolder1 );
Removing Views
Views can also be removed from the TabbedView in several different ways:
tabbedView1.remove( view1 ); tabbedView1.remove( tabButton1 );
tabbedView1.removeItem("Tab 1");
tabbedView1.remove(0);
tabbedView1.removeAll();
Selecting a View
To select a specific view any of the following can be called:
tabbedView1.setSelectedIndex(0); // based on view index. tabbedView1.setSelectedItem("Tab 1"); // based on the item from the tab component tabbedView1.select( tab1 ); // based on the reference to the tab component tabbedView1.select( view1 ); // based on the reference to the view componentYou can also move between tabs by calling next() and previous() which move to the next or the previous tab by the overall index.
tabbedView1.next(); tabbedView1.previous();
Handling Events
The TabbedView sends out several types of events: ItemEvents, ActionEvents, PropertyChangedEvents, and VetoableChangeEvents.
tabbedView1.addItemListener( itemListenerAdapter1 ); tabbedView1.removeItemListener( itemListenerAdapter1 );
tabbedView1.addActionListener( actionListenerAdapter1 ); tabbedView1.removeActionListener( actionListenerAdapter1 );
tabbedView1.addPropertyChangeListener( propertyChangeListenerAdapter1 ); tabbedView1.removePropertyChangeListener( propertyChangeListenerAdapter1 );
tabbedView1.addVetoableChangeListener( vetoableChangeListenerAdapter1 ); tabbedView1.removeVetoableChangeListener( vetoableChangeListenerAdapter1 );
Customizing the TabbedView
The TabbedView can be customized by changing the orientation or style properties and by changing the properties of the TabBarInterface and TabButtonInterface objects that are contained in it.
The orientation is the placement of the tabs relative to the View area. It can be either the TOP, BOTTOM, RIGHT, or LEFT values from the com.sas.geometry.Orientations class. The style determines if the TabBar displays the tabs in multiple rows or on one row with a SpinButton to display tabs not shown when it is first displayed. It can be either the MULTIGROUP or SCROLLABLE values of the TabBarInterface class. The TabBarInterface object is an instance of com.sas.visuals.TabBar by default. The TabBar can be referenced by getTabBar() to change its properties. Each individual TabButtonInterface object is an instance of com.sas.visuals.TabButton by default and can be referenced by any of the getTab() methods.
Use in webAF
The TabbedView supports Drag and Drop in webAF but only in the following manner at this time:
Drop a TabbedView on a Frame in webAF. This will create a TabbedView with 2 default tabs and views. Views can be added by either dropping java.awt.Container derived components onto the TabBar portion of the TabbedView or using the customizer to add new tab items. To populate the individual views, select the tab associated with the view to be populated and drag and drop all the components for that view on to the view portion of the TabbedView. The components will be added to the currently displayed view.
Summary Example
Here is a sample TabbedView with five views added to it:
import com.sas.visuals.TabbedView; import com.sas.visuals.TabFolder;
public void createTabbedView() { TabbedView tabbedView1 = new TabbedView(); tabbedView1.initialize();
TabFolder tabFolder1 = new TabFolder("Tab 1"); tabbedView1.add( tabFolder1 ); tabFolder1.add( new java.awt.Label("TabFolder View - 1") );
TabFolder tabFolder2 = new TabFolder("Tab 2"); tabbedView1.add( tabFolder2 ); tabFolder2.add( new java.awt.Label("TabFolder View - 2") );
TabFolder tabFolder3 = new TabFolder("Tab 3"); tabbedView1.add( tabFolder3 ); tabFolder3.add( new java.awt.Label("TabFolder View - 3") );
TabFolder tabFolder4 = new TabFolder("Tab 4"); tabbedView1.add( tabFolder4 ); tabFolder4.add( new java.awt.Label("TabFolder View - 4") );
TabFolder tabFolder5 = new TabFolder("Tab 5"); tabbedView1.add( tabFolder5 ); tabFolder5.add( new java.awt.Label("TabFolder View - 5") ); }
TabBar
,
TabBarInterface
,
TabButton
,
TabButtonInterface
,
TabFolder
,
TabFolderInterface
,
Serialized FormField Summary | |
---|---|
protected boolean |
internalAdd
|
protected boolean |
internalRemove
|
static java.lang.String |
RB_KEY
|
Constructor Summary | |
---|---|
TabbedView()
Default Constructor. |
|
TabbedView(int orientation)
Constructor that sets the orientation of the TabBar. |
|
TabbedView(int orientation,
int style)
Constructor that sets the orientation and the style of the TabBar. |
Method Summary | |
---|---|
void |
add(java.awt.Container newView,
java.lang.Object item,
java.lang.Integer grpIndex)
Add a View(container) and create an associated Tab, using the item, on the specified group(row) in the TabbedView. |
void |
add(java.awt.Container newView,
java.lang.Object item,
java.lang.Integer grpIndex,
int index)
Add a View(container) and create an associated Tab, using the item, on the specified group(row) and at the specified index in the TabbedView. |
void |
add(TabButtonInterface tab,
java.awt.Container newView,
java.lang.Integer grpIndex)
Add a View(container) to the TabbedView with an associated tab on the specified group(row) grpIndex and added at the end of the component list. |
void |
add(TabButtonInterface tab,
java.awt.Container newView,
java.lang.Integer grpIndex,
int index)
Add a View(container) to the TabbedView with an associated tab on the specified group(row) grpIndex and inserted at index. |
void |
addActionListener(java.awt.event.ActionListener listener)
Adds the specified action listener to receive action events from this TabbedView |
protected void |
addImpl(java.awt.Component comp,
java.lang.Object constraints,
int index)
Adds the specified component to this container at the specified index with the given constraints. |
protected void |
addInternal(java.awt.Component tab,
java.awt.Component view,
java.lang.Integer grpIndex,
int index)
Add the tab to the tabBar and the view to the view container. |
void |
addItem(java.lang.Object item)
Add a View to the TabbedView by constructing a View(container) using the view class name and an associated Tab using the item. |
void |
addItem(java.lang.Object item,
int index)
Add a View to the TabbedView by constructing a View(container) using the view class name and an associated Tab using the item. |
void |
addItemListener(java.awt.event.ItemListener listener)
Adds the specified item listener to receive item events from this TabbedView. |
void |
componentAdded(java.awt.event.ContainerEvent e)
|
void |
componentRemoved(java.awt.event.ContainerEvent e)
|
void |
contentsChanged(com.sas.collection.ContentsChangedEvent evt)
Called when the contents of the model have changed. |
void |
detachModel(com.sas.ModelInterface model)
Detach the specified model from the TabbedView. |
int |
dragOver(java.awt.Point point,
int representation,
int keyState,
java.util.Vector data)
Used to support Drag and Drop in webAF at design time. |
com.sas.DesignTimeDropResult |
drop(java.awt.Point point,
int representation,
int keyState,
java.util.Vector data)
Used to support Drag and Drop in webAF at design time. |
static int |
getDefaultHeight()
|
static int |
getDefaultWidth()
|
java.lang.Object |
getDesignTimeEventHandler(java.awt.AWTEvent event)
Get the event handler when the TabbedView is run at designTime. |
com.sas.util.transforms.TransformInterface |
getDisplayTransform()
Get the transform used by the TabButtonInterface to display the item object. |
static com.sas.beans.ExtendedBeanInfo |
getExtendedBeanInfo()
|
int |
getIndex(java.awt.Container view)
Get the index of the specified View(container). |
int |
getInitialSelectedIndex()
Get the initial selected tab based on its index. |
com.sas.util.transforms.TransformInterface |
getInputTransform()
Get the transform used by any methods that use the TabButtonInterface item property as an input parameter. |
java.lang.Object |
getItem(java.awt.Container view)
Get the Item object associated with the specified container |
java.lang.Object |
getItem(int index)
Get the item property of the tab at the specified index. |
int |
getModelType()
Deprecated. |
int |
getOrientation()
Get the orientation of the TabBar on the TabbedView. |
com.sas.util.transforms.TransformInterface |
getOutputTransform()
Get the transform used by any methods that use the TabButtonInterface item property as an return value. |
java.util.Vector |
getRequiredInterfaces()
Returns the required interfaces Vector for this component. |
int |
getSelectedIndex()
Get the index of the selected tab. |
java.lang.Object |
getSelectedItem()
Get the item property of the selected tab. |
java.lang.Object[] |
getSelectedObjects()
Get the selected item or null if no item is selected. |
SelectionGroupInterface |
getSelectionGroup()
|
int |
getStyle()
Get the style of the RowLayout. |
TabButtonInterface |
getTab(java.awt.Container view)
Get the TabButtonInterface object associated with the specified View(container). |
TabButtonInterface |
getTab(int index)
Get the TabButtonInterface object at the specified index. |
TabButtonInterface |
getTab(java.lang.Object item)
Get the TabButtonInterface object with the specified item property. |
TabBarInterface |
getTabBar()
Get the TabBarInterface object that the TabButtonInterface objects are added to. |
java.awt.LayoutManager |
getTabBarLayout()
Get the LayoutManager of the TabBarInterface object. |
java.lang.Class |
getTabButtonClass()
Get the class of the default tabs created when an addItem() method is called. |
int |
getTabCount()
Get the number of tabs on the TabbedView. |
java.awt.Container |
getView(int index)
Get the View(container) at the specified index. |
java.awt.Container |
getView(java.lang.Object item)
Get the View( container ) associated with the tab with the specified item property. |
java.awt.Container |
getView(TabButtonInterface tab)
Get the View(container) associated with the specified tab. |
BorderInterface |
getViewBorder()
Get the Border object drawn around the view containers. |
java.lang.Class |
getViewClass()
Get the view container class created by default when an addItem(item) or add(TabButton) is called. |
void |
initialize()
Initialize the defaultModel. |
boolean |
isDefaultModelAttached()
Returns if the component is using a default internal model. |
void |
itemStateChanged(java.awt.event.ItemEvent e)
Invoked when an item's state has been changed in the selectionGroup. |
void |
next()
Select the next tab and display the next view in the overall index from the currently displayed tab and view. |
void |
paint(java.awt.Graphics g)
Paint the TabbedView. |
void |
previous()
Select the previous tab and display the previous view in the overall index from the currently displayed tab and view. |
protected void |
processActionEvent(java.awt.event.ActionEvent e)
Processes action events occurring on the TabbedView. |
protected void |
processEvent(java.awt.AWTEvent e)
Processes events occurring on the TabbedView. |
protected void |
processItemEvent(java.awt.event.ItemEvent e)
Processes item events occurring on the TabbedView. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Invoked when a property change occurs. |
void |
refresh(com.sas.ModelInterface model)
Refresh the TabbedView with the specified model. |
void |
refreshOrderedCollection(com.sas.collection.StaticOrderedCollectionInterface orderedModel)
Refresh the TabbedView with the orderedCollectionModel. |
void |
remove(java.awt.Component comp)
Remove the specified component from this container. |
void |
remove(int index)
Remove the tab and view at the specified index. |
void |
removeActionListener(java.awt.event.ActionListener listener)
Remove the specified action listener so it no longer receives action events from this TabbedView. |
void |
removeAll()
Remove all tabs and views. |
void |
removeItem(java.lang.Object item)
Remove the View and TabButtonInterface object associated with the specified item. |
void |
removeItemListener(java.awt.event.ItemListener listener)
Remove the specified item listener so it no longer receives item events from this TabbedView. |
void |
select(java.awt.Component component)
Select the view to be displayed in the view area. |
void |
setBackground(java.awt.Color background)
Set the background color of the TabbedView. |
static void |
setDefaultHeight(int newHeight)
|
void |
setDefaultValues()
Set the Default values for all TabbedView attributes, called by initializeComponent() |
static void |
setDefaultWidth(int newWidth)
|
void |
setDisplayTransform(com.sas.util.transforms.TransformInterface transform)
Set the displayTransform for the TabBarInterface. |
void |
setEnabled(boolean enabled)
Set the enabled state of the TabbedView. |
void |
setForeground(java.awt.Color foreground)
Set the foreground color of the TabbedView. |
void |
setInitialSelectedIndex(int initIndex)
Set the initial selected tab based on its index. |
void |
setInputTransform(com.sas.util.transforms.TransformInterface transform)
Set the transform used by any methods that use the TabButtonInterface item property as an input parameter. |
void |
setOrientation(int orient)
Set the orientation of the TabBar on the TabbedView. |
void |
setOutputTransform(com.sas.util.transforms.TransformInterface transform)
Set the transform used by any methods that use the TabButtonInterface item property as an return value. |
void |
setSelectedIndex(int index)
Select a View(container) based on the specified index. |
void |
setSelectedItem(java.lang.Object item)
Select a View(container) based on the specified item property. |
void |
setStyle(int s)
Set the style of the RowLayout. |
void |
setTabBar(TabBarInterface newTabBar)
Set the TabBar, removes all panels and associated tabs in previous TabBar. |
void |
setTabButtonClass(java.lang.Class tClass)
Set the TabButtonInterface class to be created by default when an item add is done to the TabbedView. |
void |
setTabEnabled(boolean enabled,
int index)
Enable/Disable the tab at the specified index. |
void |
setTabEnabled(boolean enabled,
java.lang.Object item)
Enable/Disable the tab with the specified item object |
void |
setTabVisible(boolean visible,
int index)
Show/Hide the tab at the specified index. |
void |
setTabVisible(boolean visible,
java.lang.Object item)
Show/Hide the tab with the specified item object |
void |
setViewBorder(BorderInterface newBorder)
Set the Border object used for the view area and the rows of the TabBar. |
void |
setViewClass(java.lang.Class vClass)
Set the view container class created by default when an item add is done to the TabbedView. |
void |
validateObject()
|
void |
vetoableChange(java.beans.PropertyChangeEvent evt)
Forward the vetoableChangeEvent to allow the selection of another tab to be vetoed. |
Methods inherited from interface com.sas.awt.ContainerInterface |
---|
getComponents, getLayout, invalidate, setLayout, validate |
Field Detail |
---|
public static final java.lang.String RB_KEY
protected transient boolean internalAdd
protected transient boolean internalRemove
Constructor Detail |
---|
public TabbedView()
public TabbedView(int orientation)
public TabbedView(int orientation, int style)
Method Detail |
---|
public static com.sas.beans.ExtendedBeanInfo getExtendedBeanInfo()
public static int getDefaultHeight()
public static int getDefaultWidth()
public static void setDefaultHeight(int newHeight)
public static void setDefaultWidth(int newWidth)
public void add(TabButtonInterface tab, java.awt.Container newView, java.lang.Integer grpIndex)
tab
- the TabButtonInterface object associated with the added viewnewView
- the View(container) to be addedgrpIndex
- the index of the group(row) where the tab is addedpublic void add(TabButtonInterface tab, java.awt.Container newView, java.lang.Integer grpIndex, int index)
tab
- the TabButtonInterface object associated with the added viewnewView
- the View(container) to be addedgrpIndex
- the index of the group(row) where the tab is addedindex
- the position in the TabbedView's list at which to insert the component. -1 means insert at the end.public void add(java.awt.Container newView, java.lang.Object item, java.lang.Integer grpIndex)
newView
- the View(container) to be added to the TabbedViewitem
- the item to initialize the TabButtonInterface object associated with the added ViewgrpIndex
- the index of the group(row) in which to add the Tabpublic void add(java.awt.Container newView, java.lang.Object item, java.lang.Integer grpIndex, int index)
newView
- the View(container) to be added to the TabbedViewitem
- the item to initialize the TabButtonInterface object associated with the added ViewgrpIndex
- the index of the group(row) in which to add the Tabindex
- the position in the container's list at which to insert the component. -1 means insert at the end.public void addActionListener(java.awt.event.ActionListener listener)
listener
- the actionListenerprotected void addInternal(java.awt.Component tab, java.awt.Component view, java.lang.Integer grpIndex, int index)
tab
- the tab to add to the tabBarview
- the view to add the the view containergrpIndex
- the index of the group to add the tab toindex
- the index position to add the tab at, -1 adds the
tab at the end of the component listprotected void addImpl(java.awt.Component comp, java.lang.Object constraints, int index)
add( TabButtonInterface tab ) add( TabButtonInterface tab, java.awt.Container view ) add( TabButtonInterface tab, Integer groupIndex ) add( TabButtonInterface tab, java.awt.Container view, int index ) add( TabButtonInterface tab, Integer groupIndex, int index ) add( java.awt.Container view ) add( java.awt.Container view, Object tabItem ) add( java.awt.Container view, TabButtonInterface tab ) add( java.awt.Container view, Object tabItem, int index ) add( java.awt.Container view, TabButtonInterface tab, int index ) add( TabFolderInterface folder ) add( TabFolderInterface folder, Integer groupIndex ) add( TabFolderInterface folder, Integer groupIndex, int index )Where the tab is also an instance of java.awt.Component and the folder is also an instance of java.awt.Container. This is the method to override if you want to track every add request to a container. An overriding method should usually include a call to super.addImpl(comp, constraints, index).
addImpl
in class java.awt.Container
public void addItem(java.lang.Object item)
item
- the item to initialize the TabButtonInterface object associated with the added Viewpublic void addItem(java.lang.Object item, int index)
item
- the item to initialize the TabButtonInterface object associated with the added Viewindex
- the index position to add the tab at, -1 adds the
tab at the end of the component list.public void addItemListener(java.awt.event.ItemListener listener)
addItemListener
in interface java.awt.ItemSelectable
listener
- the ItemListenerpublic void contentsChanged(com.sas.collection.ContentsChangedEvent evt)
contentsChanged
in interface com.sas.collection.ContentsChangedListener
evt
- the ContentsChangedEvent from the model that changed.public void detachModel(com.sas.ModelInterface model)
detachModel
in interface com.sas.ViewInterface
detachModel
in class PanelVisualComponent
model
- Model to detachViewInterface.detachModel(com.sas.ModelInterface)
public int dragOver(java.awt.Point point, int representation, int keyState, java.util.Vector data)
dragOver
in interface ContainerInterface
dragOver
in interface com.sas.DesignTimeDropTargetInterface
dragOver
in class PanelContainerComponent
point
- The x/y coordinates of the mouse cursor inside the component.representation
- One of com.sas.DesignTimeDropResult.{representationComponent,representationModel,representationAttribute,representationViewer}keyState
- Unused.data
- A Vector containing information about the drag.
DesignTimeDropTargetInterface.dragOver(java.awt.Point, int, int, java.util.Vector)
public com.sas.DesignTimeDropResult drop(java.awt.Point point, int representation, int keyState, java.util.Vector data)
drop
in interface ContainerInterface
drop
in interface com.sas.DesignTimeDropTargetInterface
drop
in class PanelContainerComponent
point
- The x/y coordinates of the mouse cursor inside the component.representation
- One of com.sas.DesignTimeDropResult.{representationComponent,representationModel,representationAttribute,representationViewer}keyState
- Unused.data
- A Vector containing information about the drag.
DesignTimeDropTargetInterface.drop(java.awt.Point, int, int, java.util.Vector)
public java.lang.Object getDesignTimeEventHandler(java.awt.AWTEvent event)
getDesignTimeEventHandler
in interface com.sas.idesupport.DesignTimeEventInterface
event
- The event for the component to determine if is wishes to handle.
DesignTimeEventInterface
public com.sas.util.transforms.TransformInterface getDisplayTransform()
public int getIndex(java.awt.Container view)
the
- view to find the index of
public int getInitialSelectedIndex()
public com.sas.util.transforms.TransformInterface getInputTransform()
setInputTransform(com.sas.util.transforms.TransformInterface)
public java.lang.Object getItem(java.awt.Container view)
view
- the container associated with the item to get.
NoSuchElementException
- if the view is not added to the TabbedViewpublic java.lang.Object getItem(int index)
index
- the index of the tab to get the item property of.
public int getTabCount()
public int getModelType()
public int getOrientation()
Orientations
,
TabBarInterface
,
setOrientation(int)
public com.sas.util.transforms.TransformInterface getOutputTransform()
setOutputTransform(com.sas.util.transforms.TransformInterface)
public java.util.Vector getRequiredInterfaces()
getRequiredInterfaces
in interface com.sas.ViewInterface
getRequiredInterfaces
in class PanelVisualComponent
ViewInterface.getRequiredInterfaces()
public int getSelectedIndex()
setSelectedIndex(int)
public java.lang.Object getSelectedItem()
setSelectedItem(java.lang.Object)
public java.lang.Object[] getSelectedObjects()
getSelectedObjects
in interface java.awt.ItemSelectable
ItemSelectable
public SelectionGroupInterface getSelectionGroup()
public int getStyle()
setStyle(int)
public TabButtonInterface getTab(java.awt.Container view)
view
- the view to find the tab for
NoSuchElementException
- if the view is not added to the TabbedViewpublic TabButtonInterface getTab(int index)
index
- the index of the tab object to returnthe
- tab at the index positionpublic TabButtonInterface getTab(java.lang.Object item)
item
- the item property of the tab to find
public TabBarInterface getTabBar()
setTabBar(com.sas.visuals.TabBarInterface)
public java.awt.LayoutManager getTabBarLayout()
public java.lang.Class getTabButtonClass()
setTabButtonClass(java.lang.Class)
public java.awt.Container getView(java.lang.Object item)
item
- the item property of the tab associated with the container to return
public java.awt.Container getView(TabButtonInterface tab)
tab
- the tab associated with the container to return
public java.awt.Container getView(int index)
index
- the index of the container to return
public BorderInterface getViewBorder()
setViewBorder(com.sas.visuals.BorderInterface)
public java.lang.Class getViewClass()
setViewClass(java.lang.Class)
public void initialize()
initialize
in interface com.sas.ComponentInterface
initialize
in class PanelVisualComponent
ComponentInterface.initialize()
public boolean isDefaultModelAttached()
isDefaultModelAttached
in interface com.sas.ViewDefaultModelInterface
public void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged
in interface java.awt.event.ItemListener
public void next()
previous()
public void paint(java.awt.Graphics g)
paint
in class PanelVisualComponent
g
- the Graphics contextVisualInterfaceSupport.paint(com.sas.ComponentInterface, com.sas.awt.VisualInterface, java.awt.Component, java.awt.Graphics)
protected void processEvent(java.awt.AWTEvent e)
processEvent
in class java.awt.Container
protected void processActionEvent(java.awt.event.ActionEvent e)
protected void processItemEvent(java.awt.event.ItemEvent e)
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class PanelVisualComponent
PropertyChangeListener.propertyChange(java.beans.PropertyChangeEvent)
public void previous()
next()
public void validateObject()
validateObject
in interface java.io.ObjectInputValidation
validateObject
in class PanelVisualComponent
ComponentInterfaceSupport.validateObject(com.sas.ComponentInterface)
public void componentAdded(java.awt.event.ContainerEvent e)
componentAdded
in interface java.awt.event.ContainerListener
public void componentRemoved(java.awt.event.ContainerEvent e)
componentRemoved
in interface java.awt.event.ContainerListener
public void refresh(com.sas.ModelInterface model)
refresh
in interface com.sas.ViewInterface
refresh
in class PanelVisualComponent
model
- the model to refresh the TabbedView with.ViewInterface.refresh(com.sas.ModelInterface)
public void refreshOrderedCollection(com.sas.collection.StaticOrderedCollectionInterface orderedModel)
public void remove(java.awt.Component comp)
remove( TabButtonInterface tab ) remove( java.awt.Container view )These allow removes to occur if either a tab or a view is removed.
remove
in class Panel
comp
- the component to removepublic void remove(int index)
remove
in class Panel
index
- the index of the tab and view to remove from the TabbedViewpublic void removeActionListener(java.awt.event.ActionListener listener)
listener
- the action listenerpublic void removeAll()
removeAll
in class Panel
public void removeItem(java.lang.Object item)
item
- the item associatied with the view and tab to be removedpublic void removeItemListener(java.awt.event.ItemListener listener)
removeItemListener
in interface java.awt.ItemSelectable
listener
- the item listenerpublic void select(java.awt.Component component)
component
- The view component to be displayed or the tab
associated with the view to be displayed.public void setBackground(java.awt.Color background)
setBackground
in class java.awt.Component
background
- the background set on all
of the components.public void setForeground(java.awt.Color foreground)
setForeground
in class java.awt.Component
foreground
- the foreground set on all
of the components.public void setDefaultValues()
setDefaultValues
in interface ContainerInterface
setDefaultValues
in interface VisualInterface
setDefaultValues
in interface com.sas.ComponentInterface
setDefaultValues
in class CompositePanel
ContainerInterface.setDefaultValues()
public void setDisplayTransform(com.sas.util.transforms.TransformInterface transform)
transform
- the displayTransformgetDisplayTransform()
public void setInitialSelectedIndex(int initIndex)
initIndex
- the index of the initially selected tabpublic void setInputTransform(com.sas.util.transforms.TransformInterface transform)
transform
- the inputTransformgetInputTransform()
public void setOrientation(int orient)
orient
- an orientation value: TOP, BOTTOM, LEFT, or RIGHTgetOrientation()
public void setOutputTransform(com.sas.util.transforms.TransformInterface transform)
transform
- the outputTransformgetOutputTransform()
public void setSelectedIndex(int index)
index
- the index of the view to select and displaygetSelectedIndex()
public void setSelectedItem(java.lang.Object item)
item
- the item property of the tab to select and view to displaygetSelectedItem()
public void setStyle(int s)
s
- a style value: SCROLLABLE or MULTIGROUPgetStyle()
public void setTabBar(TabBarInterface newTabBar)
newTabBar
- the new TabBar to contain all tabsgetTabBar()
public void setTabButtonClass(java.lang.Class tClass)
tClass
- the class of the used to create default tabsgetTabButtonClass()
public void setEnabled(boolean enabled)
setEnabled
in interface VisualInterface
setEnabled
in class PanelVisualComponent
enabled
- the enabled state of the TabbedViewVisualInterface.setEnabled(boolean)
public void setTabEnabled(boolean enabled, java.lang.Object item)
enabled
- the new enabled state of the tabitem
- the item object of the tab to setEnabled on.public void setTabEnabled(boolean enabled, int index)
enabled
- the new enabled state of the tabindex
- the index of the tab to setEnabled on.public void setTabVisible(boolean visible, java.lang.Object item)
enabled
- the new visible state of the tabitem
- the item object of the tab to setVisible on.public void setTabVisible(boolean visible, int index)
enabled
- the new visible state of the tabindex
- the index of the tab to setVisible on.public void setViewBorder(BorderInterface newBorder)
newBorder
- the border drawn around the view area
and on the rows of tabs.public void setViewClass(java.lang.Class vClass)
vClass
- the class of the used to create default viewsgetViewClass()
public void vetoableChange(java.beans.PropertyChangeEvent evt) throws java.beans.PropertyVetoException
vetoableChange
in interface java.beans.VetoableChangeListener
evt
- the vetoableChangeEvent sent when the tab selection changes.
java.beans.PropertyVetoException
- when the property event is vetoed.SelectionGroup
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |