cds.gui
Class Tab

java.lang.Object
  extended bycds.gui.Tab
All Implemented Interfaces:
java.lang.Runnable

class Tab
extends java.lang.Object
implements java.lang.Runnable

Class defining the information associated with a particular tab in the CTabbedPane

Version:
1.0 July 2003
Author:
Marc Wenger/CDS

Field Summary
protected  int blink
           
protected  javax.swing.JFrame frame
           
protected  CIcon icon
           
protected  java.lang.String name
           
protected  int pos
           
protected  CTabbedPane tabbedPane
           
protected  java.awt.Component tabComponent
           
protected  java.lang.Thread tBlink
           
protected  java.lang.String tip
           
 
Constructor Summary
Tab(CTabbedPane tp, java.awt.Component p, java.lang.String name, CIcon ic, java.lang.String tip, int pos)
          Constructor. creates a tab object, when a new tab is created in the TabbedPane
 
Method Summary
 int getPosition()
          Return the current position of this tab if it is in the tabbedPane
 void run()
           
 void startBlink(int iconum)
           
 void stopBlink(int iconum)
           
 java.lang.String toString()
          Display the tab info for debugging purposes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

tabbedPane

protected CTabbedPane tabbedPane

tabComponent

protected java.awt.Component tabComponent

icon

protected CIcon icon

tip

protected java.lang.String tip

pos

protected int pos

frame

protected javax.swing.JFrame frame

blink

protected int blink

tBlink

protected java.lang.Thread tBlink
Constructor Detail

Tab

public Tab(CTabbedPane tp,
           java.awt.Component p,
           java.lang.String name,
           CIcon ic,
           java.lang.String tip,
           int pos)
Constructor. creates a tab object, when a new tab is created in the TabbedPane

Parameters:
tp - tabbedPane in which the component is added
p - Component contained in this tab
name - name of the tab
ic - Icon added to the tab title
tip - tooltiptext of null
pos - position of the tab in the TabbedPane
Method Detail

getPosition

public int getPosition()
Return the current position of this tab if it is in the tabbedPane

Returns:
the actual position of the tab, or -1 if the tab is currently detached in a frame

toString

public java.lang.String toString()
Display the tab info for debugging purposes

Returns:
a string containing the Tab info

startBlink

public void startBlink(int iconum)

stopBlink

public void stopBlink(int iconum)

run

public void run()
Specified by:
run in interface java.lang.Runnable