Class MappedShapeSymbol

All Implemented Interfaces:
Cloneable

public class MappedShapeSymbol extends ShapeSymbol
This is a symbol that holds a list of ShapeMap-s. It allows us to map a string pattern to a particular shape type. For example, if a point obs has a filed: aircraft_type which can contain the values:
 military
 glider
 civilian
 ...
 
This symbol could hold the shape maps:
 military -> triangle
 glider -> circle
 civilian->square
 ...
 
Version:
$Revision: 1.8 $
Author:
Metapps development team
  • Constructor Details

    • MappedShapeSymbol

      public MappedShapeSymbol()
      Default constructor.
    • MappedShapeSymbol

      public MappedShapeSymbol(int x, int y)
      Construct a ShapeSymbol without a canvas at the position specified. Use the parameter names and long names specified.
      Parameters:
      x - x position
      y - y position
    • MappedShapeSymbol

      public MappedShapeSymbol(DisplayCanvas canvas, int x, int y)
      Construct a ShapeSymbol to use on the canvas specified at the position specified. Use the parameter names and long names specified.
      Parameters:
      canvas - canvas to draw on.
      x - x position on the canvas
      y - y position on the canvas
  • Method Details

    • getLabel

      public String getLabel()
      Get the label
      Overrides:
      getLabel in class ShapeSymbol
      Returns:
      Label for gui
    • initPropertyComponents

      protected void initPropertyComponents(List comps)
      Add any components to the list of widgets for the main property dialog tab.
      Overrides:
      initPropertyComponents in class ShapeSymbol
      Parameters:
      comps - List of components.
    • applyProperties

      protected void applyProperties()
      Apply properties from the properties dialog.
      Overrides:
      applyProperties in class ShapeSymbol
    • doAllObs

      public boolean doAllObs()
      Should this symbol do all of the observations. Used by the StationModelDisplayable to determine if makeShapes should be called.
      Overrides:
      doAllObs in class ShapeSymbol
      Returns:
      Do all obs - true.
    • makeShapes

      public VisADGeometryArray[] makeShapes(Data[] dataArray, PointOb ob) throws Exception
      If this symbol is not one of the 'known' symbols then this method is called to create the shapes.
      Overrides:
      makeShapes in class MetSymbol
      Parameters:
      dataArray - The array of data objects. May have 0 or more data depending on the paramids.
      ob - The observation
      Returns:
      The shapes
      Throws:
      Exception - On badness
    • showDisplayUnitInProperties

      protected boolean showDisplayUnitInProperties()
      Should we show the display unit widget in the properties dialog
      Overrides:
      showDisplayUnitInProperties in class MetSymbol
      Returns:
      true
    • setShapeMappings

      public void setShapeMappings(List value)
      Set the ShapeMappings property.
      Parameters:
      value - The new value for ShapeMappings
    • getShapeMappings

      public List getShapeMappings()
      Get the ShapeMappings property.
      Returns:
      The ShapeMappings