org.dmonix.gui
Class SimpleListObject

java.lang.Object
  extended byorg.dmonix.gui.SimpleListObject
All Implemented Interfaces:
java.lang.Comparable

public class SimpleListObject
extends java.lang.Object
implements java.lang.Comparable

Simple list object that holds both a text and a value.
The text is the text that will be displayed in the list when is used, the value is never shown to the user.

Copyright: Copyright (c) 2003

Company: dmonix.org

Version:
1.0
Author:
Peter Nerg

Constructor Summary
SimpleListObject(java.lang.String text, java.lang.Object value)
          Creats a list object.
 
Method Summary
 int compareTo(java.lang.Object o)
          Performs a toString comparison between this object and the supplied object.
 java.lang.String getText()
          Get the text of the object.
 java.lang.Object getValue()
          Get the value of the object.
 void setText(java.lang.String text)
          Set the text of the object.
 void setValue(java.lang.Object value)
          Set the value of the object.
 java.lang.String toString()
          Returns the text of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleListObject

public SimpleListObject(java.lang.String text,
                        java.lang.Object value)
Creats a list object.

Parameters:
text - The text of the object
value - The value of the object
Method Detail

getText

public java.lang.String getText()
Get the text of the object.

Returns:
the text

setText

public void setText(java.lang.String text)
Set the text of the object.

Parameters:
text - The text of the object

getValue

public java.lang.Object getValue()
Get the value of the object.

Returns:
the value

setValue

public void setValue(java.lang.Object value)
Set the value of the object.

Parameters:
value - The value of the object

toString

public java.lang.String toString()
Returns the text of the object.

Returns:
the text

compareTo

public int compareTo(java.lang.Object o)
Performs a toString comparison between this object and the supplied object.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - The object to compare to
Returns:
The result


Copyright © 1998-2005 dmonix.org Peter Nerg, All Rights Reserved.