TelnetD at SF

net.wimpi.telnetd.io.toolkit
Class Checkbox

java.lang.Object
  extended bynet.wimpi.telnetd.io.toolkit.Component
      extended bynet.wimpi.telnetd.io.toolkit.ActiveComponent
          extended bynet.wimpi.telnetd.io.toolkit.Checkbox

public class Checkbox
extends ActiveComponent

Class that implements a Checkbox component. * * @author Dieter Wimberger * @version 2.0 (13/03/2005)


Field Summary
static int EDGED_BOXSTYLE
           
static int LARGE_CHECKMARK
           
static int ROUND_BOXSTYLE
           
static int SMALL_CHECKMARK
           
static int SQUARED_BOXSTYLE
           
 
Fields inherited from class net.wimpi.telnetd.io.toolkit.Component
m_Dim, m_IO, m_Name, m_Position
 
Constructor Summary
Checkbox(BasicTerminalIO io, java.lang.String name)
          Constructs a checkbox instance.
 
Method Summary
 void draw()
          Method that draws the component.
 boolean isSelected()
          Accessor method for the state of the checkbox instance
 void run()
          Method that will make the checkbox active, reading and processing input.
 void setBoxStyle(int style)
          Mutator method for the boxstyle property of the checkbox
 void setMarkStyle(int style)
          Mutator method for the markstyle property of the checkbox
 void setSelected(boolean b)
          Method to set the checkbox`s state
 void setText(java.lang.String str)
          Mutator method for the text property of the checkbox item
 
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

SMALL_CHECKMARK

public static final int SMALL_CHECKMARK
See Also:
Constant Field Values

LARGE_CHECKMARK

public static final int LARGE_CHECKMARK
See Also:
Constant Field Values

SQUARED_BOXSTYLE

public static final int SQUARED_BOXSTYLE
See Also:
Constant Field Values

ROUND_BOXSTYLE

public static final int ROUND_BOXSTYLE
See Also:
Constant Field Values

EDGED_BOXSTYLE

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

Checkbox

public Checkbox(BasicTerminalIO io,
                java.lang.String name)
Constructs a checkbox instance.

Method Detail

setSelected

public void setSelected(boolean b)
                 throws java.io.IOException
Method to set the checkbox`s state. * * @param b boolean that represents the state (true equals selected, false equals not selected).

Throws:
java.io.IOException

isSelected

public boolean isSelected()
Accessor method for the state of the checkbox instance. * * @return boolean that represents the state (true equals selected, false equals not selected).


setText

public void setText(java.lang.String str)
Mutator method for the text property of the checkbox item. * This text will be placed like a label, naturally you can * leave this text empty and place a label if used in a form. * * @param str String that represents the text that will be displayed right * of the checkbox.


setBoxStyle

public void setBoxStyle(int style)
Mutator method for the boxstyle property of the checkbox. * The *_BOXSTYLE constants should be passed as parameter. * * @param style int that represents one of the defined constants for boxstyles.


setMarkStyle

public void setMarkStyle(int style)
Mutator method for the markstyle property of the checkbox. * The *_CHECKMARK constants should be passed as parameter. * * @param style int that represents one of the defined constants for checkmarks.


run

public void run()
         throws java.io.IOException
Method that will make the checkbox active, reading and processing input.

Specified by:
run in class ActiveComponent
Throws:
java.io.IOException

draw

public void draw()
          throws java.io.IOException
Method that draws the component.

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

TelnetD at SF

Copyright 2000-2005 Dieter Wimberger.