org.commonreality.modalities.visual
Class DefaultVisualPropertyHandler

java.lang.Object
  extended by org.commonreality.modalities.DefaultPropertyHandler
      extended by org.commonreality.modalities.visual.DefaultVisualPropertyHandler
All Implemented Interfaces:
IModalityPropertyHandler, IVisualPropertyHandler, IPropertyHandler

public class DefaultVisualPropertyHandler
extends DefaultPropertyHandler
implements IVisualPropertyHandler


Field Summary
static org.apache.commons.logging.Log LOGGER
          logger definition
 
Fields inherited from interface org.commonreality.modalities.visual.IVisualPropertyHandler
COLOR, IS_VISUAL, RETINAL_DISTANCE, RETINAL_LOCATION, RETINAL_SIZE, SLOPE, TEXT, TOKEN, TYPE, VISIBLE
 
Constructor Summary
DefaultVisualPropertyHandler()
           
 
Method Summary
 java.awt.Color[] asColors(java.lang.Object object)
           
 java.awt.geom.Dimension2D asDimension(java.lang.Object object)
           
 java.awt.geom.Point2D asPoint(java.lang.Object object)
          transforms an array of doubles into a point2d
 java.awt.Color[] getColors(ISimulationObject realObject)
           
 double getRetinalDistance(ISimulationObject realObject)
           
 java.awt.geom.Point2D getRetinalLocation(ISimulationObject realObject)
           
 java.awt.geom.Dimension2D getRetinalSize(ISimulationObject realObject)
           
 double getSlope(ISimulationObject realObject)
           
 java.lang.String getText(ISimulationObject realObject)
           
 java.lang.String getToken(ISimulationObject realObject)
           
 java.lang.String[] getTypes(ISimulationObject realObject)
           
 boolean hasModality(ISensoryObject sensoryObject)
           
 boolean isVisible(ISimulationObject realObject)
           
 
Methods inherited from class org.commonreality.modalities.DefaultPropertyHandler
getBoolean, getDouble, getDoubles, getInt, getInts, getString, getStrings, hasProperty
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.commonreality.object.IPropertyHandler
getBoolean, getDouble, getDoubles, getInt, getInts, getString, getStrings, hasProperty
 

Field Detail

LOGGER

public static final org.apache.commons.logging.Log LOGGER
logger definition

Constructor Detail

DefaultVisualPropertyHandler

public DefaultVisualPropertyHandler()
Method Detail

isVisible

public boolean isVisible(ISimulationObject realObject)
                  throws UnknownPropertyNameException
Specified by:
isVisible in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

getRetinalLocation

public java.awt.geom.Point2D getRetinalLocation(ISimulationObject realObject)
                                         throws UnknownPropertyNameException
Specified by:
getRetinalLocation in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

getRetinalDistance

public double getRetinalDistance(ISimulationObject realObject)
                          throws UnknownPropertyNameException
Specified by:
getRetinalDistance in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

getRetinalSize

public java.awt.geom.Dimension2D getRetinalSize(ISimulationObject realObject)
                                         throws UnknownPropertyNameException
Specified by:
getRetinalSize in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

getColors

public java.awt.Color[] getColors(ISimulationObject realObject)
                           throws UnknownPropertyNameException
Specified by:
getColors in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

getTypes

public java.lang.String[] getTypes(ISimulationObject realObject)
                            throws UnknownPropertyNameException
Specified by:
getTypes in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

getToken

public java.lang.String getToken(ISimulationObject realObject)
                          throws UnknownPropertyNameException
Specified by:
getToken in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

getText

public java.lang.String getText(ISimulationObject realObject)
                         throws UnknownPropertyNameException
Specified by:
getText in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

asPoint

public java.awt.geom.Point2D asPoint(java.lang.Object object)
                              throws java.lang.IllegalArgumentException
Description copied from interface: IVisualPropertyHandler
transforms an array of doubles into a point2d

Specified by:
asPoint in interface IVisualPropertyHandler
Returns:
Throws:
java.lang.IllegalArgumentException

asDimension

public java.awt.geom.Dimension2D asDimension(java.lang.Object object)
                                      throws java.lang.IllegalArgumentException
Specified by:
asDimension in interface IVisualPropertyHandler
Throws:
java.lang.IllegalArgumentException

asColors

public java.awt.Color[] asColors(java.lang.Object object)
                          throws java.lang.IllegalArgumentException
Specified by:
asColors in interface IVisualPropertyHandler
Throws:
java.lang.IllegalArgumentException

getSlope

public double getSlope(ISimulationObject realObject)
                throws UnknownPropertyNameException
Specified by:
getSlope in interface IVisualPropertyHandler
Throws:
UnknownPropertyNameException

hasModality

public boolean hasModality(ISensoryObject sensoryObject)
Specified by:
hasModality in interface IModalityPropertyHandler
See Also:
org.commonreality.modalities.IModalityPropertyHandler#hasModality(java.lang.String, org.commonreality.object.ISensoryObject)