edu.washington.cs.supple.rep
Class TextTypeImpl

java.lang.Object
  extended byedu.washington.cs.supple.rep.SuppleBeanImpl
      extended byedu.washington.cs.supple.rep.BaseType
          extended byedu.washington.cs.supple.rep.SimpleValueTypeImpl
              extended byedu.washington.cs.supple.rep.TextTypeImpl
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable, SimpleValueType, SuppleBean, SuppleType, TextType, ValueListener

public class TextTypeImpl
extends SimpleValueTypeImpl
implements TextType

Author:
kgajos
See Also:
Serialized Form

Field Summary
protected  int typicalHeight
           
protected  int typicalWidth
           
 
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
TextTypeImpl(int tWidth, int tHeight)
           
TextTypeImpl(int tWidth, int tHeight, java.util.Collection likelyValues, java.util.Collection legalValues)
           
TextTypeImpl(int tWidth, int tHeight, java.lang.Object[] likelyValues, java.lang.Object[] legalValues)
           
TextTypeImpl(int tWidth, int tHeight, ValueBinding likelyVals, ValueBinding legalVals)
           
 
Method Summary
 int getTypicalHeight()
           
 int getTypicalWidth()
           
 boolean isEnumerable()
          This method tells you if possible values for this type can be (reasonably) enumerated
 boolean isLegalValueClass(java.lang.Class c)
          Check if a class is legal for this type.
 void setTypicalHeight(int h)
           
 void setTypicalWidth(int w)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.washington.cs.supple.rep.SimpleValueTypeImpl
getIndex, hasIndex, isPrimitiveType
 
Methods inherited from class edu.washington.cs.supple.rep.BaseType
accept, addLegalValue, addLegalValueHelper, addLegalValues, addLikelyValue, addLikelyValueHelper, bindLegalValues, bindLikelyValues, ensureLegalValues, equals, getIndex, getLegalValues, getLikelyValues, getLongestLegalIndex, getMaxNumLegalValues, getNumLegalValues, getNumLikelyValues, getTypicalIndexLength, getUniqueId, hashCode, hasOrdering, hasSetLegalValues, isFinalLegalValues, isLegalValue, orderValues, setFinalLegalValues, setLegalValues, setLikelyValues, setMaxNumLegalValues, setTypicalIndexLength, toPrettyString, valueChanged, verifyCurrentValue, visitBoundProperties
 
Methods inherited from class edu.washington.cs.supple.rep.SuppleBeanImpl
addPropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleType
accept, getIndex, getIndex, getLegalValues, getLikelyValues, getLongestLegalIndex, getMaxNumLegalValues, getNumLegalValues, getNumLikelyValues, getTypicalIndexLength, getUniqueId, hasIndex, hasOrdering, hasSetLegalValues, isFinalLegalValues, isLegalValue, isPrimitiveType, orderValues, toPrettyString, verifyCurrentValue
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleBean
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

typicalWidth

protected int typicalWidth

typicalHeight

protected int typicalHeight
Constructor Detail

TextTypeImpl

public TextTypeImpl(int tWidth,
                    int tHeight)
Parameters:
tWidth -
tHeight -

TextTypeImpl

public TextTypeImpl(int tWidth,
                    int tHeight,
                    java.util.Collection likelyValues,
                    java.util.Collection legalValues)
Parameters:
tWidth -
tHeight -
likelyValues -
legalValues -

TextTypeImpl

public TextTypeImpl(int tWidth,
                    int tHeight,
                    java.lang.Object[] likelyValues,
                    java.lang.Object[] legalValues)
Parameters:
tWidth -
tHeight -
likelyValues -
legalValues -

TextTypeImpl

public TextTypeImpl(int tWidth,
                    int tHeight,
                    ValueBinding likelyVals,
                    ValueBinding legalVals)
Parameters:
tWidth -
tHeight -
Method Detail

isEnumerable

public boolean isEnumerable()
Description copied from interface: SuppleType
This method tells you if possible values for this type can be (reasonably) enumerated

Specified by:
isEnumerable in interface SuppleType
Specified by:
isEnumerable in class BaseType

getTypicalWidth

public int getTypicalWidth()
Specified by:
getTypicalWidth in interface TextType
Returns:
the typical width (in columns) of typical texts represented by this type

setTypicalWidth

public void setTypicalWidth(int w)

getTypicalHeight

public int getTypicalHeight()
Specified by:
getTypicalHeight in interface TextType
Returns:
the typical height (in rows) of typical texts represented by this type

setTypicalHeight

public void setTypicalHeight(int h)

isLegalValueClass

public boolean isLegalValueClass(java.lang.Class c)
Description copied from interface: SuppleType
Check if a class is legal for this type.

Specified by:
isLegalValueClass in interface SuppleType
Parameters:
c -
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class BaseType