|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.washington.cs.supple.rep.SuppleBeanImpl
edu.washington.cs.supple.rep.BaseType
edu.washington.cs.supple.rep.ContainerTypeImpl
edu.washington.cs.supple.rep.VectorTypeImpl
| Field Summary | |
protected SuppleType |
elementType
|
| Fields inherited from class edu.washington.cs.supple.rep.ContainerTypeImpl |
children, childTable, derivedFrom, dynamicChildren, hiddenChildren, numChildrenAdded, object |
| Fields inherited from class edu.washington.cs.supple.rep.BaseType |
finalLegalValues, hasOrdering, lastUid, legalValues, legalValuesBinding, likelyValues, likelyValuesBinding, maxNumLegalValues, nullLegal, typicalIndexLength, uid |
| Fields inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl |
pcs |
| Constructor Summary | |
VectorTypeImpl(SuppleType elementType)
|
|
| Method Summary | |
void |
accept(UiVisitor visitor)
Visitor pattern. |
void |
addValue(StateVar uiObject,
java.lang.Object v)
Adds an element to the vector held by the uiObject |
protected void |
addValue(java.util.Vector vector,
java.lang.Object v)
|
boolean |
containsValue(StateVar uiObject,
java.lang.Object v)
Checks if the vector held by the uiObjects contains a particular value |
SuppleType |
getElementType()
Returns the type of the elements in this vector |
int |
getNumValues(StateVar uiObject)
|
java.lang.Object |
getValue(StateVar uiObject,
int i)
|
java.util.Vector |
getValues(StateVar uiObject)
Returns the value of the uiObject cast as a vector; if the object has no value, an empty vector is returned (never null) |
boolean |
hasIndex()
Index is a short unique summary of the value (which can be used for choosing present values, etc. |
protected void |
init()
Initialize the container type. |
boolean |
isEnumerable()
By default we assume that a vector value type is enumerable (i.e. |
boolean |
isLegalValue(java.lang.Object value)
Check if a value is legal for this type. |
boolean |
isLegalValueClass(java.lang.Class c)
Check if a class is legal for this type. |
boolean |
isPrimitiveType()
Test if this is a primitive type. |
void |
rebindChildren(java.lang.Object value)
|
boolean |
removeValue(StateVar uiObject,
java.lang.Object v)
Removes a value from the vector held by the uiObject |
void |
setValue(StateVar uiObject,
java.lang.Object value)
Erases whaver elements that might have been held by the uiObject and sets the value as the only element of the vector |
void |
setValues(StateVar uiObject,
java.util.Collection c)
Erases whaver elements that might have been held by the uiObject and sets the collection of values as the contents of the vector |
java.lang.String |
toString()
|
java.lang.Object |
verifyCurrentValue(java.lang.Object value)
This method gets called by UiObjects when they are notified that the legal values of their type have changed; this method looks at the current value of the object and verifies that the value is still legal. |
| Methods inherited from class edu.washington.cs.supple.rep.ContainerTypeImpl |
addChild, addDynamicChild, childrenHaveLabels, clone, getChild, getChildren, getIndex, getNumChildren, getNumChildrenAdded, getUiObject, hasModifiableChild, rebindChildrenToValue, removeChild, size, swapChild, toPrettyString |
| Methods inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl |
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.washington.cs.supple.rep.ContainerType |
childrenHaveLabels, getChild, getChildren, getNumChildren, getNumChildrenAdded, getUiObject, hasModifiableChild, removeChild, size, swapChild |
| Methods inherited from interface edu.washington.cs.supple.rep.SuppleType |
getIndex, getIndex, getLegalValues, getLikelyValues, getLongestLegalIndex, getMaxNumLegalValues, getNumLegalValues, getNumLikelyValues, getTypicalIndexLength, getUniqueId, hasOrdering, hasSetLegalValues, isFinalLegalValues, orderValues, toPrettyString |
| Methods inherited from interface edu.washington.cs.supple.rep.SuppleBean |
addPropertyChangeListener, removePropertyChangeListener |
| Field Detail |
protected SuppleType elementType
| Constructor Detail |
public VectorTypeImpl(SuppleType elementType)
| Method Detail |
protected void init()
ContainerTypeImpl
init in class ContainerTypeImplpublic boolean isEnumerable()
isEnumerable in interface SuppleTypeisEnumerable in class ContainerTypeImplpublic java.lang.Object verifyCurrentValue(java.lang.Object value)
SuppleType
verifyCurrentValue in interface SuppleTypeverifyCurrentValue in class BaseTypevalue - value to be verified
public void addValue(StateVar uiObject,
java.lang.Object v)
VectorType
addValue in interface VectorTypeuiObject - a ui Element of type VectorTypev - a value to be added to the vector
protected void addValue(java.util.Vector vector,
java.lang.Object v)
public boolean containsValue(StateVar uiObject,
java.lang.Object v)
VectorType
containsValue in interface VectorTypeuiObject - a ui Element of type VectorTypev - value to be checked
public java.util.Vector getValues(StateVar uiObject)
VectorType
getValues in interface VectorTypeuiObject - a ui Element of type VectorType
public java.lang.Object getValue(StateVar uiObject,
int i)
getValue in interface VectorTypepublic int getNumValues(StateVar uiObject)
getNumValues in interface VectorType
public boolean removeValue(StateVar uiObject,
java.lang.Object v)
VectorType
removeValue in interface VectorTypeuiObject - a ui Element of type VectorTypev - a value to be added to the vector
public void setValue(StateVar uiObject,
java.lang.Object value)
VectorType
setValue in interface VectorTypeuiObject - a ui Element of type VectorTypevalue - the value to be set
public void setValues(StateVar uiObject,
java.util.Collection c)
VectorType
setValues in interface VectorTypeuiObject - a ui Element of type VectorTypec - the collection of valuespublic boolean hasIndex()
SuppleType
hasIndex in interface SuppleTypehasIndex in class ContainerTypeImplpublic void rebindChildren(java.lang.Object value)
public SuppleType getElementType()
VectorType
getElementType in interface VectorTypepublic boolean isLegalValueClass(java.lang.Class c)
SuppleType
isLegalValueClass in interface SuppleTypeisLegalValueClass in class ContainerTypeImplpublic boolean isLegalValue(java.lang.Object value)
SuppleType
isLegalValue in interface SuppleTypeisLegalValue in class BaseTypepublic void accept(UiVisitor visitor)
SuppleType
accept in interface SuppleTypeaccept in class ContainerTypeImplpublic boolean isPrimitiveType()
SuppleType
isPrimitiveType in interface SuppleTypeisPrimitiveType in class ContainerTypeImplpublic java.lang.String toString()
toString in class ContainerTypeImpl
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||