com.retek.commons.gui.widget
Class RTabPane

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjavax.swing.JComponent
              extended byjavax.swing.JPanel
                  extended bycom.retek.commons.gui.widget.RPanel
                      extended bycom.retek.commons.gui.widget.RTabPane
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.KeyListener, java.awt.MenuContainer, REventListener, java.io.Serializable
Direct Known Subclasses:
RcomTabPane

public class RTabPane
extends RPanel
implements java.awt.event.ActionListener, java.awt.event.KeyListener

This class subclass JPanel and reproduces most of the functionality of the JTabbedPane, but using buttons and a card layout. It is used in conjunction with RTab and calls stop() and start() methods on the tab to initialize and clean up state management.

FUTURE: Both start() and stop() should not throw exception (already implemented), but should rather return true of false and not allow the switching of tabs on failures. This produces a successful stop(), but falty start() weird situation.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
RTabPane()
          Constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Implements the action listener method to handle the attempted selection of buttons.
 java.awt.Component add(java.lang.String title, java.awt.Component component)
          Adds a new RTab to the tab pane.
 void addChangeListener(javax.swing.event.ChangeListener listener)
          Adds a change listener.
 void addTab(java.lang.String title, javax.swing.Icon icon, RTab tab)
          Adds a new RTab to the tab pane with the given title.
 void addTab(java.lang.String title, javax.swing.Icon icon, RTab tab, java.lang.String tip)
          Adds a new RTab to the tab pane with the given title.
 void addTab(java.lang.String title, RTab tab)
          Adds a new RTab to the tab pane with the given title.
 java.awt.Color getActiveBackground()
          Returns the active background color of the tabbed pane.
 java.awt.Color getActiveBackgroundAt(int index)
          Returns the background color of the tab portion of a tab pane for the given index.
 java.awt.Color getActiveForeground()
          Returns the active foreground color of the tabbed pane.
 java.awt.Color getActiveForegroundAt(int index)
          Returns the foreground color of the tab portion of a tab pane for the given index.
 javax.swing.Icon getDisabledIconAt(int index)
          Returns the disabled icon at the given index.
 java.awt.Color getFocusBackground()
          Returns the focus background color of the tabbed pane.
 javax.swing.Icon getIconAt(int index)
          Returns the enabled icon at the given index.
 java.awt.Color getInactiveBackground()
          Returns the inactive background color of the tabbed pane.
 java.awt.Color getInactiveBackgroundAt(int index)
          Returns the background color of the tab portion of a tab pane for the given index.
 java.awt.Color getInactiveForeground()
          Returns the inactive foreground color of the tabbed pane.
 java.awt.Color getInactiveForegroundAt(int index)
          Returns the foreground color of the tab portion of a tab pane for the given index.
 int getIndex(javax.swing.Icon icon)
          Returns the tab index of the specified icon or -1 if the icon is not found
 int getIndex(RTab tab)
          Returns the tab index of the specified tab or -1 if no tab exists.
 int getIndex(java.lang.String title)
          Returns the tab index of the specified title or -1 if no title exists.
 int getSelectedIndex()
          Returns the currently selected index for the tab pane.
 RTab getSelectedTab()
          Returns the currently selected RTab for this tab pane.
 java.lang.String getSelectedTitle()
          Returns the currently selected title for the tab pane.
 RTab getTabAt(int index)
          Returns the tab at the given index.
 int getTabCount()
          Returns the number of tabs in the tab pane.
 java.lang.String getTitleAt(int index)
          Returns the title at the given index.
 java.lang.String getToolTipText(java.awt.event.MouseEvent event)
          Returns the tool tip text of the tab by mouse event.
 java.lang.String getToolTipTextAt(int index)
          Returns the tool tip text of the tab by index.
 void insertTab(java.lang.String title, javax.swing.Icon icon, RTab tab, java.lang.String tip, int index)
          Inserts a RTab with the given title at the given index.
 void insertTab(java.lang.String title, RTab tab, int index)
          Inserts a RTab with the given title at the given index.
 boolean isEnabledAt(int index)
          Returns whether or not the tab is enabled at the given index.
 boolean isEnabledAt(java.lang.String title)
          Returns whether or not the tab is enabled for the given tab (by title).
 boolean isUniformTitleSize()
          Returns whether or not the tab should display uniform title sizes.
 void keyPressed(java.awt.event.KeyEvent event)
          Implements the key listener method.
 void keyReleased(java.awt.event.KeyEvent event)
           
 void keyTyped(java.awt.event.KeyEvent event)
           
 void refreshSelectedTab()
          Refreshes selected tab.
 void removeAll()
          Removes all the tabs from the tabbed pane.
 void removeChangeListener(javax.swing.event.ChangeListener listener)
          Removes a change listener..
 void removeTab(RTab tab)
          Removes the tab from the tab panel.
 void removeTabAt(int index)
          Removes the tab from the tab panel.
 void requestFocus()
          Override request focus to transfer focus to the currently selected button.
 void setActiveBackground(java.awt.Color color)
          Assigns the active background color for the tabbed pane.
 void setActiveBackgroundAt(int index, java.awt.Color color)
          Assigns the active background color for the tab at the specific index.
 void setActiveForeground(java.awt.Color color)
          Assigns the active foreground color for the tabbed pane.
 void setActiveForegroundAt(int index, java.awt.Color color)
          Assigns the active foreground color for the tab at the specific index.
 void setDisabledIconAt(int index, javax.swing.Icon disabledIcon)
          Sets the disabled icon at the specified index.
 void setEnabledAt(int index, boolean enabled)
          Sets the enabled state of a tab.
 void setEnabledAt(java.lang.String title, boolean enabled)
          Sets the enabled state of a tab.
 void setFocusBackground(java.awt.Color color)
          Assigns the focus background color for the tabbed pane.
 void setIconAt(int index, javax.swing.Icon icon)
          Sets the enabled icon at the specified index.
 void setInactiveBackground(java.awt.Color color)
          Assigns the inactive background color for the tabbed pane.
 void setInactiveBackgroundAt(int index, java.awt.Color color)
          Assigns the inactive background color for the tab at the specific index.
 void setInactiveForeground(java.awt.Color color)
          Assigns the inactive foreground color for the tabbed pane.
 void setInactiveForegroundAt(int index, java.awt.Color color)
          Assigns the inactive foreground color for the tab at the specific index.
 void setSelectedIndex(int index)
          Assigns the selected tab for the component based on index.
 void setSelectedTab(RTab tab)
          Assigns the selected tab for the component.
 void setSelectedTab(java.lang.String title)
          Assigns the selected tab for the component based on the title.
 void setTitleAt(int index, java.lang.String title)
          Assigns the title to a tab at a particular index.
 void setToolTipTextAt(int index, java.lang.String toolTipText)
          Sets the tool tip text at the specified index.
 void setUniformTitleSize(boolean isUniform)
          Assigns whether or not the tab should display uniform title sizes.
protected  void switchTab(int index)
          Attempts to the switch the tab to a new tab.
 
Methods inherited from class com.retek.commons.gui.widget.RPanel
addREventListener, getFocusCycleComponents, notifyREventListeners, notifyREventListeners, performActionEvent, performErrorEvent, removeAllREventListeners, removeREventListener, repaintPanel, setEmptyBorder, setEmptyBorder, setFocusCycleComponents, setLineBorder, setLineBorder, setLoweredBevelBorder, setMinimumHeight, setRaisedBevelBorder, setTitleBorder, setTitleBorder, setTitleBorder, setTitleBorder
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RTabPane

public RTabPane()
Constructor

Method Detail

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener listener)
Adds a change listener. Change listeners receive events when the active tab is changed.

Parameters:
listener - The ChangeListener to add to the component.

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener listener)
Removes a change listener..

Parameters:
listener - The ChangeListener to remove from the component.

isUniformTitleSize

public boolean isUniformTitleSize()
Returns whether or not the tab should display uniform title sizes.

Returns:
True if the tab should display uniform title size, false otherwise.

setUniformTitleSize

public void setUniformTitleSize(boolean isUniform)
Assigns whether or not the tab should display uniform title sizes.

Parameters:
isUniform - True if the tab should display uniform title size, false otherwise.

getTabCount

public int getTabCount()
Returns the number of tabs in the tab pane.

Returns:
The number of tabs in the tab pane.

getTabAt

public RTab getTabAt(int index)
Returns the tab at the given index.

Parameters:
index - The index of the tab.
Returns:
The tab.

getTitleAt

public java.lang.String getTitleAt(int index)
Returns the title at the given index.

Parameters:
index - The index of the tab.
Returns:
The title of the tab at that index.

setTitleAt

public void setTitleAt(int index,
                       java.lang.String title)
Assigns the title to a tab at a particular index.

Parameters:
index - The index of the tab.

getActiveBackground

public java.awt.Color getActiveBackground()
Returns the active background color of the tabbed pane.

Returns:
The active background color of the tabbed pane.

setActiveBackground

public void setActiveBackground(java.awt.Color color)
Assigns the active background color for the tabbed pane. This will not affect any already created tabs.

Parameters:
color - The color to assign.

getActiveForeground

public java.awt.Color getActiveForeground()
Returns the active foreground color of the tabbed pane.

Returns:
The active foreground color of the tabbed pane.

setActiveForeground

public void setActiveForeground(java.awt.Color color)
Assigns the active foreground color for the tabbed pane. This will not affect any already created tabs.

Parameters:
color - The color to assign.

getInactiveBackground

public java.awt.Color getInactiveBackground()
Returns the inactive background color of the tabbed pane.

Returns:
The inactive background color of the tabbed pane.

setInactiveBackground

public void setInactiveBackground(java.awt.Color color)
Assigns the inactive background color for the tabbed pane. This will not affect any already created tabs.

Parameters:
color - The color to assign.

getInactiveForeground

public java.awt.Color getInactiveForeground()
Returns the inactive foreground color of the tabbed pane.

Returns:
The inactive foreground color of the tabbed pane.

setInactiveForeground

public void setInactiveForeground(java.awt.Color color)
Assigns the inactive foreground color for the tabbed pane. This will not affect any already created tabs.

Parameters:
color - The color to assign.

getFocusBackground

public java.awt.Color getFocusBackground()
Returns the focus background color of the tabbed pane.

Returns:
The focus background color of the tabbed pane.

setFocusBackground

public void setFocusBackground(java.awt.Color color)
Assigns the focus background color for the tabbed pane. This will not affect any already created tabs.

Parameters:
color - The color to assign.

getActiveBackgroundAt

public java.awt.Color getActiveBackgroundAt(int index)
Returns the background color of the tab portion of a tab pane for the given index.

Parameters:
index - The index of the tab to retrieve the background color from.
Returns:
The background color.

setActiveBackgroundAt

public void setActiveBackgroundAt(int index,
                                  java.awt.Color color)
Assigns the active background color for the tab at the specific index. If the color is null, the tab will be reset to the tab pane's active background color.

Parameters:
index - The tab index.
color - The color to assign.

getActiveForegroundAt

public java.awt.Color getActiveForegroundAt(int index)
Returns the foreground color of the tab portion of a tab pane for the given index.

Parameters:
index - The index of the tab to retrieve the foreground color from.
Returns:
The foreground color.

setActiveForegroundAt

public void setActiveForegroundAt(int index,
                                  java.awt.Color color)
Assigns the active foreground color for the tab at the specific index. If the color is null, the tab will be reset to the tab pane's active foreground color.

Parameters:
index - The tab index.
color - The color to assign.

getInactiveBackgroundAt

public java.awt.Color getInactiveBackgroundAt(int index)
Returns the background color of the tab portion of a tab pane for the given index.

Parameters:
index - The index of the tab to retrieve the background color from.
Returns:
The background color.

setInactiveBackgroundAt

public void setInactiveBackgroundAt(int index,
                                    java.awt.Color color)
Assigns the inactive background color for the tab at the specific index. If the color is null, the tab will be reset to the tab pane's inactive background color.

Parameters:
index - The tab index.
color - The color to assign.

getInactiveForegroundAt

public java.awt.Color getInactiveForegroundAt(int index)
Returns the foreground color of the tab portion of a tab pane for the given index.

Parameters:
index - The index of the tab to retrieve the foreground color from.
Returns:
The foreground color.

setInactiveForegroundAt

public void setInactiveForegroundAt(int index,
                                    java.awt.Color color)
Assigns the inactive foreground color for the tab at the specific index. If the color is null, the tab will be reset to the tab pane's inactive foreground color.

Parameters:
index - The tab index.
color - The color to assign.

getDisabledIconAt

public javax.swing.Icon getDisabledIconAt(int index)
Returns the disabled icon at the given index. This method is not implemented.

Parameters:
index - The index of the tab.
Returns:
The disabled icon at the given index.

setDisabledIconAt

public void setDisabledIconAt(int index,
                              javax.swing.Icon disabledIcon)
Sets the disabled icon at the specified index. This method is not yet implemented.

Parameters:
index - The tab index.

getIconAt

public javax.swing.Icon getIconAt(int index)
Returns the enabled icon at the given index. This method is not implemented.

Parameters:
index - The index of the tab.
Returns:
The enabled icon at the given index.

setIconAt

public void setIconAt(int index,
                      javax.swing.Icon icon)
Sets the enabled icon at the specified index. This method is not yet implemented.

Parameters:
index - The tab index.
icon - The icon to display in enabled mode.

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
Returns the tool tip text of the tab by mouse event. This method is not implemented.

Parameters:
event - The MouseEvent to return a tool tip for.
Returns:
The tool tip text.

getToolTipTextAt

public java.lang.String getToolTipTextAt(int index)
Returns the tool tip text of the tab by index. This method is not implemented.

Parameters:
index - The tab index.
Returns:
The tool tip text.

setToolTipTextAt

public void setToolTipTextAt(int index,
                             java.lang.String toolTipText)
Sets the tool tip text at the specified index. This method is not yet implemented.

Parameters:
index - The tab index.

isEnabledAt

public boolean isEnabledAt(java.lang.String title)
Returns whether or not the tab is enabled for the given tab (by title).

Parameters:
title - The title of the tab.
Returns:
True if the tab is enabled, false otherwise.

isEnabledAt

public boolean isEnabledAt(int index)
Returns whether or not the tab is enabled at the given index.

Parameters:
index - The tab index.
Returns:
True if the tab is enabled, false otherwise.

setEnabledAt

public void setEnabledAt(java.lang.String title,
                         boolean enabled)
Sets the enabled state of a tab. If the selected tab is disabled, it will attempt to switch activation to the first tab in the pane. The tab will not disable if the switch cannot be made.

Parameters:
title - The title of the tab.
enabled - True if the tab should be enabled, false if not.

setEnabledAt

public void setEnabledAt(int index,
                         boolean enabled)
Sets the enabled state of a tab. If the selected tab is disabled, it will attempt to switch activation to the first tab in the pane. The tab will not disable if the switch cannot be made.

Parameters:
index - The tab index.
enabled - True if the tab should be enabled, false if not.

getSelectedIndex

public int getSelectedIndex()
Returns the currently selected index for the tab pane.

Returns:
The currently selected index for the tab pane.

setSelectedIndex

public void setSelectedIndex(int index)
Assigns the selected tab for the component based on index. This method will produce no results if attempt to switch tabs fails.

Parameters:
index - The index of the tab to select.

getSelectedTitle

public java.lang.String getSelectedTitle()
Returns the currently selected title for the tab pane.

Returns:
The currently selected title for the tab pane.

getSelectedTab

public RTab getSelectedTab()
Returns the currently selected RTab for this tab pane.

Returns:
The currently selected RTab for the tab pane.

setSelectedTab

public void setSelectedTab(java.lang.String title)
Assigns the selected tab for the component based on the title. This method will produce no results if attempt to switch tabs fails.


setSelectedTab

public void setSelectedTab(RTab tab)
Assigns the selected tab for the component. This method will produce no results if attempt to switch tabs fails.

Parameters:
tab - The tab to select.

refreshSelectedTab

public void refreshSelectedTab()
Refreshes selected tab. This does nothing if no selected tab exists.


getIndex

public int getIndex(RTab tab)
Returns the tab index of the specified tab or -1 if no tab exists.

Parameters:
tab - The tab to search for.
Returns:
The index of the tab within the tab pane.

getIndex

public int getIndex(java.lang.String title)
Returns the tab index of the specified title or -1 if no title exists.

Parameters:
title - The title to search for.
Returns:
The index of the tab within the tab pane.

getIndex

public int getIndex(javax.swing.Icon icon)
Returns the tab index of the specified icon or -1 if the icon is not found

Parameters:
icon - The icon to search for.
Returns:
The index of the first tab with the icon.

add

public java.awt.Component add(java.lang.String title,
                              java.awt.Component component)
Adds a new RTab to the tab pane. It requires an RTab object and will through an exception otherwise.

Parameters:
title - The title to assign to the RTab component.
component - The RTab component to add to the tabbed pane.

addTab

public void addTab(java.lang.String title,
                   RTab tab)
Adds a new RTab to the tab pane with the given title.

Parameters:
title - The title to assign to the RTab component.
tab - The RTab component to add to the tabbed pane.

addTab

public void addTab(java.lang.String title,
                   javax.swing.Icon icon,
                   RTab tab)
Adds a new RTab to the tab pane with the given title.

Parameters:
title - The title to assign to the RTab component.
icon - The icon to assign to the RTab component.
tab - The RTab component to add to the tabbed pane.

addTab

public void addTab(java.lang.String title,
                   javax.swing.Icon icon,
                   RTab tab,
                   java.lang.String tip)
Adds a new RTab to the tab pane with the given title.

Parameters:
title - The title to assign to the RTab component.
icon - The icon to assign to the RTab component.
tab - The RTab component to add to the tabbed pane.
tip - The tool tip to display with the tab.

insertTab

public void insertTab(java.lang.String title,
                      RTab tab,
                      int index)
Inserts a RTab with the given title at the given index.

Parameters:
title - The title to assign to the tab.
tab - The tab to insert.
index - The index to insert the tab at.

insertTab

public void insertTab(java.lang.String title,
                      javax.swing.Icon icon,
                      RTab tab,
                      java.lang.String tip,
                      int index)
Inserts a RTab with the given title at the given index.

Parameters:
title - The title to assign to the tab.
tab - The tab to insert.
index - The index to insert the tab at.

removeAll

public void removeAll()
Removes all the tabs from the tabbed pane.


removeTab

public void removeTab(RTab tab)
Removes the tab from the tab panel.

Parameters:
tab - The tab to remove from the tab panel.

removeTabAt

public void removeTabAt(int index)
Removes the tab from the tab panel.

Parameters:
index - The index of the tab to remove from the panel.

switchTab

protected void switchTab(int index)
Attempts to the switch the tab to a new tab.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Implements the action listener method to handle the attempted selection of buttons.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent event)
Implements the key listener method. When the right and left arrow keys are pressed, ONLY the focus should move to the next or previous tab.

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent event)
Specified by:
keyTyped in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent event)
Specified by:
keyReleased in interface java.awt.event.KeyListener

requestFocus

public void requestFocus()
Override request focus to transfer focus to the currently selected button.



Copyright © 2004 Retek Inc. All Rights Reserved. - Generated at Fri, 10/22/2004 07:28