net.quartzware
Class Entry

java.lang.Object
  |
  +--net.quartzware.Entry
All Implemented Interfaces:
java.lang.Cloneable

public class Entry
extends java.lang.Object
implements java.lang.Cloneable

Entry Encapsulates the data and function of an entry in the JTable in an EditorWindow This is equivalent to one row in an EditorWindow.


Constructor Summary
Entry(ResBundle owner, java.lang.String key, Value val, java.lang.String comment, boolean unique)
          Constructs an Entry from the components of an entry
 
Method Summary
 boolean editValue()
          This function will allow the user to edit the value in this entry.
 java.lang.Object elementAt(ResBundle ref, int ndx)
          This function will retrieve the proper item at index ndx
 java.lang.String getComment()
          Returns the comment for this Entry
 java.lang.String getKey()
          Returns the unique key name in this entry.
 ResBundle getOwner()
          Returns a reference to the ResBundle which owns this Entry.
 Value getParentValue()
          Returns the value of the parent of this bundle
 Value getValue()
          Returns the value of this Entry.
 boolean isUnique()
          Returns whether this entry is inherited from the parent
 void setComment(java.lang.String com)
          Sets the comment for this Entry
 void setKey(java.lang.String keyName)
          Sets the unique key name in this entry.
 void setOwner(ResBundle rb)
          Sets a reference to the ResBundle which owns this Entry.
 void setUnique(boolean uniq)
          Sets whether this entry is inherited from the parent
 void setValue(java.lang.String val)
          Sets the value for this Entry
 void setValue(Value val)
          Sets the value for this Entry
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Entry

public Entry(ResBundle owner,
             java.lang.String key,
             Value val,
             java.lang.String comment,
             boolean unique)
Constructs an Entry from the components of an entry
Parameters:
key - the unique key used to identify this entry
val - the value that this entry will hold
comment - a comment about the value PRE: owner, key, val, and comment are not null POST: This class is created
Method Detail

elementAt

public java.lang.Object elementAt(ResBundle ref,
                                  int ndx)
This function will retrieve the proper item at index ndx
Returns:
the item at index ndx PRE: 0 <= ndx <= 3 POST: The value is returned

editValue

public boolean editValue()
This function will allow the user to edit the value in this entry. It returns true if in-label editing is required, but false if a dialog will handle the editing.
Returns:
Whether to do in label editing of this value PRE: This entry is selected in the editor window. POST: The value that this entry contains may be modified.

getKey

public java.lang.String getKey()
Returns the unique key name in this entry.
Returns:
the key owned by this Entry

setKey

public void setKey(java.lang.String keyName)
Sets the unique key name in this entry.
Parameters:
the - key owned by this Entry

getValue

public Value getValue()
Returns the value of this Entry.
Returns:
the value of this Entry

setValue

public void setValue(java.lang.String val)
Sets the value for this Entry
Parameters:
the - new val for this Entry

setValue

public void setValue(Value val)
Sets the value for this Entry
Parameters:
the - new val for this Entry

getComment

public java.lang.String getComment()
Returns the comment for this Entry
Returns:
the comment for this Entry

setComment

public void setComment(java.lang.String com)
Sets the comment for this Entry
Parameters:
com - the new comment.

isUnique

public boolean isUnique()
Returns whether this entry is inherited from the parent
Returns:
false is we are inheriting the parent's value

setUnique

public void setUnique(boolean uniq)
Sets whether this entry is inherited from the parent
Parameters:
uniq - true if this entry is inherited from the parent

getOwner

public ResBundle getOwner()
Returns a reference to the ResBundle which owns this Entry.
Returns:
a ResBundle

setOwner

public void setOwner(ResBundle rb)
Sets a reference to the ResBundle which owns this Entry.
Parameters:
a - ResBundle

getParentValue

public Value getParentValue()
Returns the value of the parent of this bundle
Returns:
the value of the parent