Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ncsa.horizon.awt.Tab

java.lang.Object
  |
  +--ncsa.horizon.awt.Tab

public class Tab
extends java.lang.Object
a graphical gizmo that can draw a labelled folder tab.

See Also:
TabbedCardPanel, TabDisplay, TabConstraints

Constructor Summary
Tab(java.lang.String label)
          create an Tab
Tab(java.awt.Component c, java.lang.String label)
          create a Tab
Tab(TabConstraints params)
          create a Tab
 
Method Summary
void draw(java.awt.Graphics g, int x, int y)
          draw the tab
TabConstraints getConstraints()
          return a copy of the properties of this Tab in the form of a TabConstaints object
int getHeight()
          get expected height of the tab.
java.lang.String getLabel()
          return the text that appears in the Tab's label
int getWidth()
          get expected width of the tab.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

Tab

public Tab(java.lang.String label)
create an Tab

Tab

public Tab(java.awt.Component c,
           java.lang.String label)
create a Tab
Parameters:
c - the component to get default properties from--i.e. fore/background colors, font.
label - the text to display on the tab

Tab

public Tab(TabConstraints params)
create a Tab
Parameters:
params - the parameters for drawing the Tab
Method Detail

getConstraints

public TabConstraints getConstraints()
return a copy of the properties of this Tab in the form of a TabConstaints object

getLabel

public java.lang.String getLabel()
return the text that appears in the Tab's label

getHeight

public int getHeight()
get expected height of the tab. The value reflects the current Graphics context. If there is none, the value is 0.

getWidth

public int getWidth()
get expected width of the tab. The value reflects the current Graphics context. If there is none, the value is 0.

draw

public void draw(java.awt.Graphics g,
                 int x,
                 int y)
draw the tab
Parameters:
g - the graphics context to draw the Tab to
x - the x position in the context to draw the bottom left corner of the Tab
y - the y position in the context to draw the bottom left corner of the Tab

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD