Class LineDrawing

Direct Known Subclasses:
Box, CenterPole, CompassLabels, ContourLines, CurveDrawer, DisplayableMeanWind, IndicatorPoint, LatLonLines, MapLines, MeanWindTrace, PickableLineDrawing, PolarLineDrawing, Profile, ProfileLine, RubberBandBox, ScaleLabels, ScaleLabels, SelectorPoint, ShapeDisplayable, SoundingProfile, TextDisplayable, Trajectory, WindArrow, WindProfileDisplayable, WindTrace.DisplayableWindTrace

public class LineDrawing extends DisplayableData
Provides support for line drawings. The color and width of the lines can be controlled using the methods of this class.

Instances of this class have the following bound properties:

Name Type Access Default Description
color java.awt.Color set/get Color.white The color of rendered lines or points.
lineWidth float set/get 1.0f The width of rendered lines.
lineStyle int set/get 0 The style of rendered lines.
pointSize float set/get 1.0f The size of rendered points.
Version:
$Revision: 1.21 $
Author:
Steven R. Emmerson, Don Murray
  • Field Details

    • COLOR

      public static String COLOR
      The name of the color property.
    • LINE_WIDTH

      public static String LINE_WIDTH
      The name of the line-width property.
    • LINE_STYLE

      public static String LINE_STYLE
      The name of the line-style property.
    • POINT_SIZE

      public static String POINT_SIZE
      The name of the point-size property.
  • Constructor Details

    • LineDrawing

      public LineDrawing(String name) throws VisADException, RemoteException
      Constructs an instance with the specified name
      Parameters:
      name - name for the instance
      Throws:
      VisADException - Can't create the necessary VisAD object
      RemoteException - Can't create the necessary remote object
    • LineDrawing

      public LineDrawing(LineDrawing that) throws VisADException, RemoteException
      Constructs from another instance. The following attributes are copied from the other instance: color, line width, and point size.
      Parameters:
      that - The other instance.
      Throws:
      VisADException - Can't create the necessary VisAD object
      RemoteException - Can't create the necessary remote object
  • Method Details

    • setRGB

      public void setRGB(double red, double green, double blue) throws VisADException, RemoteException
      Sets the RGB values to control the color of this Displayable.
      Parameters:
      red - red value (0 - 1)
      green - green value (0 - 1)
      blue - blue value (0 - 1)
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setRGBA

      public void setRGBA(double red, double green, double blue, double alpha) throws VisADException, RemoteException
      Sets the RGBA values to control the color of this Displayable.
      Parameters:
      red - red value (0 - 1)
      green - green value (0 - 1)
      blue - blue value (0 - 1)
      alpha - alpha value (0 - 1)
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setRGB

      public void setRGB(float[] rgb) throws VisADException, RemoteException
      Sets the RGB values to control the color of this Displayable.
      Parameters:
      rgb - array of red, green, blue intesities (all 0 - 1).
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setRGBA

      public void setRGBA(float[] rgba) throws VisADException, RemoteException
      Sets the RGBA values to control the color of this Displayable.
      Parameters:
      rgba - array of red, green, blue, alpha intesities (all 0 - 1).
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setHSV

      public void setHSV(double hue, double saturation, double value) throws VisADException, RemoteException
      Sets the HSV values to control the color of this Displayable.
      Parameters:
      hue - hue value (red=0, green=120, blue=240).
      saturation - saturation value (0 - 1).
      value - brightness value (0 - 1).
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setHSV

      public void setHSV(float[] hsv) throws VisADException, RemoteException
      Sets the HSV values to control the color of this Displayable.
      Parameters:
      hsv - array of hue (red=0, green=120, blue=240), saturation (0-1), and brightness (0-1) values.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setColor

      public void setColor(Color color) throws VisADException, RemoteException
      Sets the color of the lines for this Displayable.
      Overrides:
      setColor in class Displayable
      Parameters:
      color - color for the line.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setLineWidth

      public void setLineWidth(float lineWidth) throws VisADException, RemoteException
      Sets the width of lines in this Displayable.
      Overrides:
      setLineWidth in class DisplayableData
      Parameters:
      lineWidth - Width of lines (1 = normal)
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setLineStyle

      public void setLineStyle(int lineStyle) throws VisADException, RemoteException
      Sets the style of lines in this Displayable.
      Parameters:
      lineStyle - style of line
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
      See Also:
    • setPointSize

      public void setPointSize(float pointSize) throws VisADException, RemoteException
      Sets the size of points in this Displayable.
      Overrides:
      setPointSize in class DisplayableData
      Parameters:
      pointSize - Size of points (2 = normal)
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getColor

      public Color getColor()
      Gets the current java.awt.Color associated with this LineDrawing
      Returns:
      color value
    • getLineWidth

      public float getLineWidth()
      Gets the current line width associated with this LineDrawing
      Overrides:
      getLineWidth in class DisplayableData
      Returns:
      line width
    • getLineStyle

      public int getLineStyle()
      Gets the current line style associated with this LineDrawing
      Returns:
      line style
      See Also:
    • getPointSize

      public float getPointSize()
      Gets the point size associated with this LineDrawing
      Overrides:
      getPointSize in class DisplayableData
      Returns:
      point size