edu.washington.cs.supple.rep
Class MapLocationTypeImpl

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.MapLocationTypeImpl
All Implemented Interfaces:
java.lang.Cloneable, MapLocationType, java.io.Serializable, SimpleValueType, SuppleBean, SuppleType, ValueListener

public final class MapLocationTypeImpl
extends SimpleValueTypeImpl
implements MapLocationType

Author:
kgajos
See Also:
Serialized Form

Field Summary
protected  int desiredMapHeight
           
protected  int desiredMapWidth
           
protected  javax.swing.ImageIcon mapImage
           
protected  ValueBinding mapImageBinding
           
 
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
MapLocationTypeImpl(int desiredMapWidth, int desiredMapHeight, javax.swing.ImageIcon image)
           
MapLocationTypeImpl(int desiredMapWidth, int desiredMapHeight, ValueBinding image)
           
 
Method Summary
 void bindMapImage(ValueBinding binding)
           
 int getDesiredMapHeight()
           
 int getDesiredMapWidth()
           
 javax.swing.ImageIcon getMapImage()
          Returns the image currently used for the map
 boolean hasIndex()
          Index is a short unique summary of the value (which can be used for choosing present values, etc.
 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 setMapImage(java.awt.Image image)
           
 void setMapImage(javax.swing.ImageIcon image)
           
 java.lang.String toString()
           
 void valueChanged(ValueBinding binding, java.lang.Object value)
          Signals variable change.
protected  void visitBoundProperties(UiVisitor visitor)
          Helper for accept() - allows subclasses to extend the bindings to be visited without overriding accept().
 
Methods inherited from class edu.washington.cs.supple.rep.SimpleValueTypeImpl
getIndex, 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, verifyCurrentValue
 
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, hasOrdering, hasSetLegalValues, isFinalLegalValues, isLegalValue, isPrimitiveType, orderValues, toPrettyString, verifyCurrentValue
 
Methods inherited from interface edu.washington.cs.supple.rep.SuppleBean
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

desiredMapWidth

protected int desiredMapWidth

desiredMapHeight

protected int desiredMapHeight

mapImage

protected javax.swing.ImageIcon mapImage

mapImageBinding

protected transient ValueBinding mapImageBinding
Constructor Detail

MapLocationTypeImpl

public MapLocationTypeImpl(int desiredMapWidth,
                           int desiredMapHeight,
                           javax.swing.ImageIcon image)

MapLocationTypeImpl

public MapLocationTypeImpl(int desiredMapWidth,
                           int desiredMapHeight,
                           ValueBinding image)
Method Detail

getDesiredMapWidth

public int getDesiredMapWidth()
Specified by:
getDesiredMapWidth in interface MapLocationType
Returns:
the desired width (in pixels) for the rendering of the map

getDesiredMapHeight

public int getDesiredMapHeight()
Specified by:
getDesiredMapHeight in interface MapLocationType
Returns:
the desired height (in pixels) for the rendering of the map

getMapImage

public javax.swing.ImageIcon getMapImage()
Description copied from interface: MapLocationType
Returns the image currently used for the map

Specified by:
getMapImage in interface MapLocationType
Returns:

setMapImage

public void setMapImage(javax.swing.ImageIcon image)

setMapImage

public void setMapImage(java.awt.Image image)

bindMapImage

public void bindMapImage(ValueBinding binding)

valueChanged

public void valueChanged(ValueBinding binding,
                         java.lang.Object value)
Description copied from interface: ValueListener
Signals variable change.

Specified by:
valueChanged in interface ValueListener
Overrides:
valueChanged in class BaseType

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

hasIndex

public boolean hasIndex()
Description copied from interface: SuppleType
Index is a short unique summary of the value (which can be used for choosing present values, etc.

Specified by:
hasIndex in interface SuppleType
Overrides:
hasIndex in class SimpleValueTypeImpl

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:

visitBoundProperties

protected void visitBoundProperties(UiVisitor visitor)
Description copied from class: BaseType
Helper for accept() - allows subclasses to extend the bindings to be visited without overriding accept().

Overrides:
visitBoundProperties in class BaseType

toString

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