org.gswing.components.common
Class ResultList

java.lang.Object
  extended by org.gswing.components.common.ResultList
All Implemented Interfaces:
Serializable, ListModel

public class ResultList
extends Object
implements Serializable, ListModel

Purpose: Represents a list of constituencies or a list of regions.

See Also:
Serialized Form

Constructor Summary
ResultList(Vector list)
          Constructor.
 
Method Summary
 void addListDataListener(ListDataListener l)
           
 Object getElementAt(int index)
          Get the elemement at the given index.
 int getRequiredBoxSize()
          This method works out the size the string, in pixels, before it is inserted into a TextField.
 int getSize()
          Get the size of the vector.
 void removeListDataListener(ListDataListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultList

public ResultList(Vector list)
Constructor.

Parameters:
list - A list if strings.
Method Detail

getSize

public int getSize()
Get the size of the vector.

Specified by:
getSize in interface ListModel
Returns:
The vector size.

getElementAt

public Object getElementAt(int index)
Get the elemement at the given index.

Specified by:
getElementAt in interface ListModel
Parameters:
index - The Vector index.
Returns:
The string element.

addListDataListener

public void addListDataListener(ListDataListener l)
Specified by:
addListDataListener in interface ListModel

removeListDataListener

public void removeListDataListener(ListDataListener l)
Specified by:
removeListDataListener in interface ListModel

getRequiredBoxSize

public int getRequiredBoxSize()
This method works out the size the string, in pixels, before it is inserted into a TextField.

Returns:
The required length of the string in pixels.


Copyright © 2008. All Rights Reserved.