TelnetD at SF

net.wimpi.telnetd.io.toolkit
Class Titlebar

java.lang.Object
  extended bynet.wimpi.telnetd.io.toolkit.Component
      extended bynet.wimpi.telnetd.io.toolkit.InertComponent
          extended bynet.wimpi.telnetd.io.toolkit.Titlebar

public class Titlebar
extends InertComponent

Class that implements a titlebar, for the top of the * Terminal Window. * * @author Dieter Wimberger * @version 2.0 (13/03/2005)


Field Summary
static int ALIGN_CENTER
           
static int ALIGN_LEFT
           
static int ALIGN_RIGHT
           
 
Fields inherited from class net.wimpi.telnetd.io.toolkit.Component
m_Dim, m_IO, m_Name, m_Position
 
Constructor Summary
Titlebar(BasicTerminalIO io, java.lang.String name)
          Constructor for a simple titlebar instance.
 
Method Summary
 void draw()
          Method that draws the titlebar on the screen.
 java.lang.String getTitleText()
          Accessor method for the titletext property of the titlebar component
 void setAlignment(int alignment)
          Mutator method for the alignment property
 void setBackgroundColor(java.lang.String color)
          Mutator method for the BackgroundColor property
 void setForegroundColor(java.lang.String color)
          Mutator method for the SoregroundColor property
 void setTitleText(java.lang.String text)
          Mutator method for the titletext property of the titlebar component
 
Methods inherited from class net.wimpi.telnetd.io.toolkit.Component
getDimension, getLocation, getName, setDimension, setLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIGN_RIGHT

public static final int ALIGN_RIGHT
See Also:
Constant Field Values

ALIGN_LEFT

public static final int ALIGN_LEFT
See Also:
Constant Field Values

ALIGN_CENTER

public static final int ALIGN_CENTER
See Also:
Constant Field Values
Constructor Detail

Titlebar

public Titlebar(BasicTerminalIO io,
                java.lang.String name)
Constructor for a simple titlebar instance.

Method Detail

setTitleText

public void setTitleText(java.lang.String text)
Mutator method for the titletext property of the titlebar component. * * @param text title String displayed in the titlebar.


getTitleText

public java.lang.String getTitleText()
Accessor method for the titletext property of the titlebar component. * * @return String that is displayed when the bar is drawn.


setAlignment

public void setAlignment(int alignment)
Mutator method for the alignment property. * * @param alignment integer, valid if one of the ALIGN_* constants.


setForegroundColor

public void setForegroundColor(java.lang.String color)
Mutator method for the SoregroundColor property. * * @param color String, valid if it is a ColorHelper color constant.


setBackgroundColor

public void setBackgroundColor(java.lang.String color)
Mutator method for the BackgroundColor property. * * @param color String, valid if it is a ColorHelper color constant.


draw

public void draw()
          throws java.io.IOException
Method that draws the titlebar on the screen.

Specified by:
draw in class Component
Throws:
java.io.IOException

TelnetD at SF

Copyright © 2000-2005 Dieter Wimberger.