Class JDPTabSelectPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----JDPTabSelectPanel
- public class JDPTabSelectPanel
- extends Panel
Class JDPTabSelectPanel represents a tab panel class.
-
activated
-
-
iconNames
-
-
JDPTabSelectPanel(JDPUser, JDPMenuStruct, String)
- Creates a Tab class that provides the features of the Menu tab class.
-
JDPTabSelectPanel(JDPUser, String[], Panel[], String)
- Creates a Tab class.
-
add(Component, String)
- Add a component creating a new tab for it.
-
getFont()
-
-
getSelectedIndex()
- Get the tab number of the currently selected tab.
-
getSelectedItem()
- Get the tab name of the currently selected tab.
-
getTabcount()
- Get the number of tabs.
-
getTabIcon(int)
- Get the tab icon of a specific tab.
-
getTabIconList()
- Get a list of all the tab icon names.
-
getTabIcons()
- Get a list of the icon numbers of the current tabs.
-
getTabnames()
- Get the tab names.
-
handleEvent(Event)
-
-
isSelected(int)
- Check whether a specific tab is selected.
-
loadNewTabs(String[], Panel[], String)
- Load a new set of tabs
-
loadNextTab()
- Load the next tab to the right.
-
loadObject(String)
- Load the panel on a tab that has the requested menu object but leave
the menu displaying the current tab.
-
loadPrevTab()
- Load the next tab to the left.
-
reloadTab()
- Redraw the tab panel.
-
removeAllTabs()
- Remove all of the tabs from this tab panel
-
removeTab(Component)
- Remove a specific tab
-
select(int)
- Select a tab
-
select(String)
- Select a tab
-
selectObject(String)
- Select a tab that has the requested menu object
-
setFont(Font)
-
-
setIconImagePath(String)
- Set the path for the image that conatins the button icons.
-
setTabcolor(int, Color, Color)
- Set the tab color of a specific tab.
-
setTabIcon(int, int)
- Set the tab icon of a specific tab.
-
setTabIcon(int, String)
- Set the tab icon of a specific tab.
-
setTabname(int, String)
- Set the tab name of a specific tab.
-
setTitle(String)
- Set the right hand panel title.
activated
public static boolean activated
iconNames
public static final String iconNames[]
JDPTabSelectPanel
public JDPTabSelectPanel(JDPUser user,
String titles[],
Panel tabpanels[],
String tabOrientation)
- Creates a Tab class.
- Parameters:
- JDPUser - the global user parameter used to pass handles in JDP.
- titles - the titles of the tabs.
- tabpanels - handles to the panels to be displayed in the tabs.
- tabOrientation - the orientation of the tabs (North, South, East, West).
JDPTabSelectPanel
public JDPTabSelectPanel(JDPUser user,
JDPMenuStruct menu,
String tabOrientation)
- Creates a Tab class that provides the features of the Menu tab class.
- Parameters:
- JDPUser - the global user parameter used to pass handles in JDP.
- menu - the menu structure that contains the menu options.
- tabOrientation - the orientation of the tabs (North, South, East, West).
removeAllTabs
public void removeAllTabs()
- Remove all of the tabs from this tab panel
removeTab
public void removeTab(Component thisComponent)
- Remove a specific tab
- Parameters:
- comp - the handle to the panel that should be removed
loadNewTabs
public void loadNewTabs(String titles[],
Panel tabpanels[],
String tabOrientation)
- Load a new set of tabs
- Parameters:
- titles - the titles of the tabs.
- tabpanels - handles to the panels to be displayed in the tabs.
- tabOrientation - the orientation of the tabs (North, South, East, West).
select
public void select(int tab)
- Select a tab
- Parameters:
- tabNumber - the number of the tab to select.
select
public void select(String tab)
- Select a tab
- Parameters:
- tabName - the name of the tab to select.
loadObject
public boolean loadObject(String objectName)
- Load the panel on a tab that has the requested menu object but leave
the menu displaying the current tab.
- Parameters:
- objectName - the name of object residing on the tab to select.
- Returns:
- whether a menu option with this object name was found.
selectObject
public boolean selectObject(String objectName)
- Select a tab that has the requested menu object
- Parameters:
- objectName - the name of object residing on the tab to select.
- Returns:
- whether a menu option with this object name was found.
isSelected
public boolean isSelected(int ix)
- Check whether a specific tab is selected.
- Parameters:
- tabNumber - the number of the tab to check.
- Returns:
- whether the tab is selected or not.
getSelectedIndex
public int getSelectedIndex()
- Get the tab number of the currently selected tab.
- Returns:
- the currently selected tab number.
getSelectedItem
public String getSelectedItem()
- Get the tab name of the currently selected tab.
- Returns:
- the currently selected tab number.
getTabnames
public String[] getTabnames()
- Get the tab names.
- Returns:
- the array of tab names.
setTitle
public void setTitle(String title)
- Set the right hand panel title.
- Parameters:
- title - the right hand panel title.
setTabname
public void setTabname(int tabNum,
String tabName)
- Set the tab name of a specific tab.
- Parameters:
- tabNumber - the tab number.
- tabName - the new name of the tab.
setTabcolor
public void setTabcolor(int tabNum,
Color tabFGColor,
Color tabBGColor)
- Set the tab color of a specific tab.
- Parameters:
- tabNumber - the tab number.
- tabFGColor - the foreground color of the tab.
- tabBGColor - the background color of the tab.
getTabIconList
public static String[] getTabIconList()
- Get a list of all the tab icon names.
- Returns:
- the list of all the tab icon names.
setTabIcon
public void setTabIcon(int tabNum,
int icon)
- Set the tab icon of a specific tab.
- Parameters:
- tabNumber - the tab number.
- iconNumber - the icon number of the tab.
getTabIcon
public int getTabIcon(int tabNum)
- Get the tab icon of a specific tab.
- Parameters:
- tabNumber - the tab number.
- Returns:
- the icon number of the tab.
setTabIcon
public void setTabIcon(int tabNum,
String icon)
- Set the tab icon of a specific tab.
- Parameters:
- tabNumber - the tab number.
- iconName - the icon name of the tab.
getTabIcons
public int[] getTabIcons()
- Get a list of the icon numbers of the current tabs.
- Returns:
- the list of all the tab icons.
setIconImagePath
public void setIconImagePath(String thisImageLoc)
- Set the path for the image that conatins the button icons.
This class has a default image call JDPBUTNS.gif that may be overidden. To create
your own icon image use the JDPBUTNS.gif as a template.
- Parameters:
- thisImageLoc - the full or partial path to the new image.
getTabcount
public int getTabcount()
- Get the number of tabs.
- Parameters:
- tabCount - the number of tabs.
reloadTab
public void reloadTab()
- Redraw the tab panel.
loadNextTab
public void loadNextTab()
- Load the next tab to the right.
loadPrevTab
public void loadPrevTab()
- Load the next tab to the left.
setFont
public void setFont(Font thisFont)
- Overrides:
- setFont in class Component
getFont
public Font getFont()
- Overrides:
- getFont in class Component
add
public Component add(Component thisComponent,
String title)
- Add a component creating a new tab for it.
- Parameters:
- comp - the component to add.
- title - the title of the new tab.
handleEvent
public boolean handleEvent(Event e)
- Overrides:
- handleEvent in class Component