amber.type.server
Class ComplexLine

java.lang.Object
  |
  +--amber.type.server.ComplexLine

public class ComplexLine
extends java.lang.Object

This class contains information about a single line in a complex list. It is used by the complex list to maintain an internal copy of information sent to the remote component.

Version:
1.0.0
Author:
Dr. David J. Knowles
See Also:
ComplexItem, ComplexListHandler

Field Summary
protected  java.util.Vector data
          This is the column information for the line.
protected  java.lang.Object lineObject
          This is an object which is associated with this line.
protected  ComplexListHandler parentHandler
          The ComplexList the node is inserted into.
protected  int type
          This integer defines the nesting of each line.
 
Constructor Summary
ComplexLine()
          Default Constructor.
ComplexLine(int type)
          Initialising Constructor.
ComplexLine(java.util.Vector data, int type)
          Initialising Constructor.
ComplexLine(java.util.Vector data, int type, java.lang.Object lineObject)
          Initialising Constructor.
 
Method Summary
 void addColumn(ComplexItem item)
          Sets the data in the following variable: This is a column in the line.
protected  boolean compareEnumerations(java.util.Enumeration internal, java.util.Enumeration other)
          This function compares the data in the two enumerations returning the state of that comparison.
 boolean equals(java.lang.Object other)
          This function checks to see if this object matches the input object.
 ComplexItem getColumn(int index)
          Gets the data in the following variable: This is a column in the line.
 java.util.Vector getData()
          Gets the data in the following variable: This is the column information for the line.
 java.lang.Object getLineObject()
          Gets the data in the following variable: This is an object which is associated with this line.
 ComplexListHandler getParentHandler()
          Gets the data in the following variable: The parent ComplexList for this ComplexLine object.
 int getType()
          Gets the data in the following variable: This integer defines the nesting of each line.
 void insertColumn(ComplexItem item, int index)
          Inserts a column into the line.
 void removeColumn(int index)
          Removes a column from the line.
 void replaceColumn(ComplexItem item, int index)
          Replaces a column in the line.
 void setData(java.util.Vector data)
          Sets the data in the following variable: This is the column information for the line.
 void setLineObject(java.lang.Object object)
          Sets the data in the following variable: This is an object which is associated with this line.
 void setParentHandler(ComplexListHandler data)
          Sets the data in the following variable: The parent ComplexList for this ComplexLine object.
 void setType(int data)
          Sets the data in the following variable: This integer defines the nesting of each line.
 java.lang.String toString()
          This function returns the String form of the data.
protected  void updateHandler()
          If this node is attached to a ComplexList it forces an update of the visual contents at the remote client.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parentHandler

protected ComplexListHandler parentHandler
The ComplexList the node is inserted into.

data

protected java.util.Vector data
This is the column information for the line. It is a Vector of ComplexItem's.

type

protected int type
This integer defines the nesting of each line. Lines with higher types are considered children of lower type numbers.

lineObject

protected java.lang.Object lineObject
This is an object which is associated with this line. It can be used to hold information related to a line which is not supposed to be visible.
Constructor Detail

ComplexLine

public ComplexLine()
Default Constructor.

ComplexLine

public ComplexLine(int type)
Initialising Constructor.
Parameters:
type - This integer defines the nesting of each line. Lines with higher types are considered children of lower type numbers.

ComplexLine

public ComplexLine(java.util.Vector data,
                   int type)
Initialising Constructor.
Parameters:
data - This is the column information for the line. It is a Vector of ComplexItem's.
type - This integer defines the nesting of each line. Lines with higher types are considered children of lower type numbers.

ComplexLine

public ComplexLine(java.util.Vector data,
                   int type,
                   java.lang.Object lineObject)
Initialising Constructor.
Parameters:
data - This is the column information for the line. It is a Vector of ComplexItem's.
type - This integer defines the nesting of each line. Lines with higher types are considered children of lower type numbers.
lineObject - The non-displaying object which is associated with this line.
Method Detail

updateHandler

protected void updateHandler()
                      throws ComponentHandlerException
If this node is attached to a ComplexList it forces an update of the visual contents at the remote client.
Throws:
ComponentHandlerException - containing messaging errors.

getParentHandler

public ComplexListHandler getParentHandler()
Gets the data in the following variable: The parent ComplexList for this ComplexLine object. This is the list the node is inserted into.
Returns:
ComplexListHandler containing the required information.

getData

public java.util.Vector getData()
Gets the data in the following variable: This is the column information for the line. It is a Vector of ComplexItem's.
Returns:
Vector containing the required information.

getLineObject

public java.lang.Object getLineObject()
Gets the data in the following variable: This is an object which is associated with this line. It can be used to hold information related to a line which is not supposed to be visible.
Returns:
Object containing the required information.

getType

public int getType()
Gets the data in the following variable: This integer defines the nesting of each line. Lines with higher types are considered children of lower type numbers.
Returns:
int containing the required information.

getColumn

public ComplexItem getColumn(int index)
Gets the data in the following variable: This is a column in the line.
Parameters:
index - int location of the column to get.

addColumn

public void addColumn(ComplexItem item)
               throws ComponentHandlerException
Sets the data in the following variable: This is a column in the line. It is added onto the end of the line.
Parameters:
item - ComplexItem containing the data to add.
Throws:
ComponentHandlerException - should there be an error updating the remote control.

insertColumn

public void insertColumn(ComplexItem item,
                         int index)
                  throws ComponentHandlerException
Inserts a column into the line. This information is inserted into the columns at the specified location.
Parameters:
item - ComplexItem containing the data to set the variable to.
Throws:
ComponentHandlerException - should there be an error updating the remote control.

replaceColumn

public void replaceColumn(ComplexItem item,
                          int index)
                   throws ComponentHandlerException
Replaces a column in the line. The index specifies which column to replace.
Parameters:
item - ComplexItem containing the data to set the variable to.
index - int index location of the column to replace.
Throws:
ComponentHandlerException - should there be an error updating the remote control.

removeColumn

public void removeColumn(int index)
                  throws ComponentHandlerException
Removes a column from the line. The index specifies which column to remove.
Parameters:
index - int index location of the column to remove.
Throws:
ComponentHandlerException - should there be an error updating the remote control.

setParentHandler

public void setParentHandler(ComplexListHandler data)
Sets the data in the following variable: The parent ComplexList for this ComplexLine object. This is the list the node is inserted into.
Parameters:
data - ComplexListHandler containing the data to set the variable to.

setLineObject

public void setLineObject(java.lang.Object object)
Sets the data in the following variable: This is an object which is associated with this line. It can be used to hold information related to a line which is not supposed to be visible.
Parameters:
object - Object containing the data to set the variable to.

setData

public void setData(java.util.Vector data)
             throws ComponentHandlerException
Sets the data in the following variable: This is the column information for the line. It is a Vector of ComplexItem's.
Parameters:
data - Vector containing the data to set the variable to.
Throws:
ComponentHandlerException - should there be an error updating the remote control.

setType

public void setType(int data)
             throws ComponentHandlerException
Sets the data in the following variable: This integer defines the nesting of each line. Lines with higher types are considered children of lower type numbers.
Parameters:
data - int containing the data to set the variable to.
Throws:
ComponentHandlerException - should there be an error updating the remote control.

equals

public boolean equals(java.lang.Object other)
This function checks to see if this object matches the input object.
Overrides:
equals in class java.lang.Object
Parameters:
other - Object to compare with.
Returns:
the state of the comparison. true if the values match.

compareEnumerations

protected boolean compareEnumerations(java.util.Enumeration internal,
                                      java.util.Enumeration other)
This function compares the data in the two enumerations returning the state of that comparison.
Parameters:
internal - This is the Enumeration of the internal data and is assumed to be an Enumeration of ComplexItems.
other - This is an Enumeration of the data to compare it may be ComplexItems or Strings.
Returns:
boolean which is the state of the comparison.

toString

public java.lang.String toString()
This function returns the String form of the data.
Overrides:
toString in class java.lang.Object
Returns:
String containing the string version of this class.


Copyright © 2002 Clearfield Research Ltd. All Rights Reserved.