motris.gui
Class ColorizedLayer

java.lang.Object
  extended bymotris.data.Description
      extended byparameter.ParameterizedObjectAdaptor
          extended bymotris.gui.ColorizedLayer
All Implemented Interfaces:
Layer, ParameterizedObject
Direct Known Subclasses:
LayerViewer.BackgroundColorLayer, ModelSegmentPointList.MeasurePointLayer, ModelSegmentPointList.ModelSegmentPointLayer, ModelSegmentPointList.nuHatPointLayer, ModelSegmentPointList.partialMuPartialStateLayer, ModelView.ActorNameLayer, ModelView.ModelViewEdgeLayer, ModelView.ModelViewShadowLayer, ModelView.PolygonLayer, ModelView.TrajectoryLayer, StreetSurfaceLayer, VectorFieldLayer

public abstract class ColorizedLayer
extends ParameterizedObjectAdaptor
implements Layer

Display Layer with a default color

Author:
dahlkamp

Nested Class Summary
 
Nested classes inherited from class parameter.ParameterizedObject
ParameterizedObject.ParameterChangedListener, ParameterizedObject.ParameterizedObjectManager
 
Field Summary
protected  java.awt.Color color
           
(package private)  float strokeWidth
           
 
Fields inherited from class parameter.ParameterizedObjectAdaptor
parameterChangedNotifyList
 
Fields inherited from class motris.data.Description
 
Constructor Summary
ColorizedLayer(java.awt.Color defaultColor)
           
ColorizedLayer(java.awt.Color defaultColor, float _strokeWidth)
           
 
Method Summary
abstract  void colorizedDraw(java.awt.Graphics g, javax.swing.JPanel _c, double zoomFactor)
           
 void draw(java.awt.Graphics g, javax.swing.JPanel _c, double zoomFactor)
           
 java.lang.String getIdentification()
          Default Identification = DisplayedName (may be overridden)
 ParameterSet getParameters()
          Get a Vector of Strings with a description of each Parameter
 ParameterSet getPixelDetails(Double2Vector position)
          Get Detailed information (read-only) for pixel
 boolean setParameters(ParameterSet _params)
          Set Parameters of this class
 
Methods inherited from class parameter.ParameterizedObjectAdaptor
addParameterChangedListener, finalize, fireParameterChanged, parameterEdited, removeParameterChangedListener
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface motris.gui.Layer
getDisplayedName, getPreferedDimension
 
Methods inherited from interface parameter.ParameterizedObject
addParameterChangedListener, parameterEdited, removeParameterChangedListener
 

Field Detail

color

protected java.awt.Color color

strokeWidth

float strokeWidth
Constructor Detail

ColorizedLayer

public ColorizedLayer(java.awt.Color defaultColor)

ColorizedLayer

public ColorizedLayer(java.awt.Color defaultColor,
                      float _strokeWidth)
Method Detail

draw

public void draw(java.awt.Graphics g,
                 javax.swing.JPanel _c,
                 double zoomFactor)
Specified by:
draw in interface Layer

colorizedDraw

public abstract void colorizedDraw(java.awt.Graphics g,
                                   javax.swing.JPanel _c,
                                   double zoomFactor)

getIdentification

public java.lang.String getIdentification()
Default Identification = DisplayedName (may be overridden)

Specified by:
getIdentification in interface Layer

getParameters

public ParameterSet getParameters()
Description copied from interface: ParameterizedObject
Get a Vector of Strings with a description of each Parameter

Specified by:
getParameters in interface ParameterizedObject
Overrides:
getParameters in class ParameterizedObjectAdaptor

setParameters

public boolean setParameters(ParameterSet _params)
Description copied from interface: ParameterizedObject
Set Parameters of this class

Specified by:
setParameters in interface ParameterizedObject
Overrides:
setParameters in class ParameterizedObjectAdaptor

getPixelDetails

public ParameterSet getPixelDetails(Double2Vector position)
Description copied from interface: Layer
Get Detailed information (read-only) for pixel

Specified by:
getPixelDetails in interface Layer
Parameters:
position - in image coordinates
Returns:
ParameterSet to be displayed