TelnetD at SF

net.wimpi.telnetd.io.toolkit
Class Component

java.lang.Object
  extended bynet.wimpi.telnetd.io.toolkit.Component
Direct Known Subclasses:
ActiveComponent, InertComponent

public abstract class Component
extends java.lang.Object

Class that represents an abstract toolkit component. * * @author Dieter Wimberger * @version 2.0 (13/03/2005)


Field Summary
protected  Dimension m_Dim
           
protected  BasicTerminalIO m_IO
           
protected  java.lang.String m_Name
           
protected  Point m_Position
           
 
Constructor Summary
Component(BasicTerminalIO io, java.lang.String name)
          Constructor for an abstract toolkit component
 
Method Summary
abstract  void draw()
          Method that draws the component.
 Dimension getDimension()
          Accessor method for a components dimension
 Point getLocation()
          Accessor method for a components location
 java.lang.String getName()
          Accessor method for the name property of a component
protected  void setDimension(Dimension dim)
          Mutator method for a components dimension
 void setLocation(int col, int row)
          Convenience mutator method for a components location
 void setLocation(Point pos)
          Mutator method for a components location
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_Name

protected java.lang.String m_Name

m_IO

protected BasicTerminalIO m_IO

m_Position

protected Point m_Position

m_Dim

protected Dimension m_Dim
Constructor Detail

Component

public Component(BasicTerminalIO io,
                 java.lang.String name)
Constructor for an abstract toolkit component. * * @param io Instance of a class implementing the BasicTerminalIO. * @param name String that represents the components name.

Method Detail

draw

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

Throws:
java.io.IOException

getName

public java.lang.String getName()
Accessor method for the name property of a component. * * @return String that represents the components name.


getLocation

public Point getLocation()
Accessor method for a components location. * * @return Point that encapsulates the location.


setLocation

public void setLocation(Point pos)
Mutator method for a components location. * * @param pos Point that encapsulates the (new) Location.


setLocation

public void setLocation(int col,
                        int row)
Convenience mutator method for a components location. * * @param col int that represents a column coordinate. * @param row int that represents a row coordinate.


getDimension

public Dimension getDimension()
Accessor method for a components dimension. * * @return Dimension that encapsulates the dimension in cols and rows.


setDimension

protected void setDimension(Dimension dim)
Mutator method for a components dimension. * * @param dim Dimension that encapsulates the dimension in cols and rows.


TelnetD at SF

Copyright 2000-2005 Dieter Wimberger.