Package com.dassault_systemes.catjdialog

   
Class CATTabPage

 
Class Hierarchy
java.lang.Object
  |
  +-com.dassault_systemes.catjdialog.CATCallbackSource
        |
        +-com.dassault_systemes.catjdialog.CATDialog
              |
              +-com.dassault_systemes.catjdialog.CATTabPage
Class Location

Framework : CATJDialog

Module : CATJDialog

Class Description

public class CATTabPage

The tab-page graphical component.

Description:

This container lets the user switch between pages by clicking on a tab with a title. Every tab page content is a child component.

To add a tab:

  1. Create the new child component to add as a tab if it doesn't exist yet,
  2. Call addTab().

To remove a tab:

  1. Call removeTab(),
  2. You may then destroy the child component.

The application can be notified when the selected tab changes.

CATTabPage Properties:

CATTabPage Notifications:

CATTabPage Message Catalog Implicit Mappings:

Field Summary

Constructor Summary
CATTabPage(CATDialog iDialog, String iName)

Method Summary
String getSelection()
void setSelection(String iName)
Enumeration getTabs()
void setTabs(Enumeration iNames)
void addTab(String iName)
void addTabAt(String iName, int index)
void removeTab(String iName)
void removeAndDestroyTab(String iName)
void removeTabAt(int index)
void removeAndDestroyTabAt(int index)
int getTabCount()
String getTabAt(int index)
void setTabTitle(String iName, String iTitle)
String getTabTitle(String iName)
void setTabVisibility(boolean iTabVisibility)
boolean getTabVisibility()
CATNotification getTabActivatedNotification()
boolean isChildDisplayed(CATDialog iChild)
boolean displayChild(CATDialog iChild)


Field Detail

Constructor Detail

CATTabPage

    CATTabPage(CATDialog iDialog, String iName)

Creates a tab page with the specified parent and name.

Parameters:
iParent
The parent component.
iName
This tab page name. Here are some rules for this name:
  • It is set in the constructor, and cannot be changed afterwards.
  • The name must be unique for the parent (2 children with the same name are not allowed).
  • The name may not contain any ot the following characters: '.' (dot), ' ' (blank), '_' (underscore)

Method Detail

getSelection

    String getSelection()

Returns the selected tab name.

Returns:
The selected tab name (null if the tab page has no tab).

setSelection

    void setSelection(String iName)

Sets the selected tab name.

Parameters:
iName
The tab name to select.

getTabs

    Enumeration getTabs()

Returns the ordered list of tab names (String enumeration).

Tab names correspond to children components names.

Returns:
The ordered list of tab names (enumeration of string values).

setTabs

    void setTabs(Enumeration iNames)

Sets the ordered list of tab names (String enumeration).

Note: Tab names must correspond to existing children components names.

Parameters:
iNames
The ordered list of tab names (enumeration of string values, each value corresponding to an existing child component name).

addTab

    void addTab(String iName)

Adds a Tab page.

The new tab is appended to the list of tabs.
Note: the name must correspond to an existing child component name, that is not yet registered as a tab.

Parameters:
iName
The name of the child component to add as a new tab.

addTabAt

    void addTabAt(String iName, int index)

Adds a Tab page at specified index.

The new tab is inserted into the list of tabs at given index.
Note: the name must correspond to an existing child component name, that is not yet registered as a tab.

Parameters:
iName
The name of the child component to add as a new tab.
index
The index where the new tab should be inserted.

removeTab

    void removeTab(String iName)

Removes a Tab page.

Note: the name should correspond to an existing child component name, that is registered as a tab.
Note: the related dialog isn't destroyed after this call. The application should do it if required (use tabpage.getChild(iName).requestDestruction()).

Parameters:
iName
The name of the tab to remove.

removeAndDestroyTab

    void removeAndDestroyTab(String iName)

Removes a Tab page and destroys the associated component.

Parameters:
iName
The name of the tab to remove.

removeTabAt

    void removeTabAt(int index)

Removes a Tab page at specified index Note: the related dialog isn't destroyed after this call. The application should do it if required (use tabpage.getChild(iName).requestDestruction()).

Parameters:
index
The index of the tab to remove.

removeAndDestroyTabAt

    void removeAndDestroyTabAt(int index)

Removes a Tab page at specified index and destroys the associated component.

Parameters:
index
The index of the tab to remove and destroy.

getTabCount

    int getTabCount()

Returns the number of tabs.

Returns:
The number of tabs.

getTabAt

    String getTabAt(int index)

Returns the tab name at specified index.

Parameters:
index
The index of the tab.
Returns:
The tab name (corresponds to a child component name).

setTabTitle

    void setTabTitle(String iName, String iTitle)

Sets the tab title.

Calling this method sets programmatically the title. This should be reserved for cases where the title can only be determined by dynamic means.
The standard way of defining components messages is using CATNls catalog files (supports NLS).

Parameters:
iName
A tab name.
iTitle
The title to set.

getTabTitle

    String getTabTitle(String iName)

Returns the tab title.

Returns the programmatic value if setTabTitle() has been called, or tries to retrieve its label from the associated message catalog file (<tabcomponent_path>.Title entry).

Parameters:
iName
A tab name.
Returns:
The tab title.

setTabVisibility

    void setTabVisibility(boolean iTabVisibility)

Shows/hides the tabs selector.

When hidden, the user does not see the tabs anymore. He has no way of changing tab, only the current selected tab page is displayed.

Parameters:
iTabVisibility
true to show the tabs selector; false to hide it.

getTabVisibility

    boolean getTabVisibility()

Determines whether tabs selector is displayed.

Returns:
true if the tabs selector is displayed; false if it is hidden.

getTabActivatedNotification

    CATNotification getTabActivatedNotification()

Returns the tab activated notification.

This notification is sent when the selected tab page changes.

Returns:
the tab activated notification.

isChildDisplayed

    boolean isChildDisplayed(CATDialog iChild)

Determines whether the child component is displayed by this component.

Parameters:
iChild
The child component to check.
Returns:
true if the specified child component is displayed by this component; false otherwise.

displayChild

    boolean displayChild(CATDialog iChild)

Tries to display the given child component.

Parameters:
iChild
The child component to display.
Returns:
the status of the attempt (true = succeeded / false = failed).


Copyright © 2000, Dassault Systèmes. All rights reserved