ucar.visad.display
Class LatLonLines

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.DisplayableData
          extended by ucar.visad.display.LineDrawing
              extended by ucar.visad.display.LatLonLines

public class LatLonLines
extends LineDrawing

Displayable to support Latitude and Longitude lines.

Version:
$Revision: 1.9 $
Author:
Don Murray, Unidata

Field Summary
 
Fields inherited from class ucar.visad.display.LineDrawing
COLOR, LINE_STYLE, LINE_WIDTH, POINT_SIZE
 
Fields inherited from class ucar.visad.display.DisplayableData
MANIPULABLE, VISIBLE
 
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
 
Constructor Summary
protected LatLonLines(LatLonLines that)
          Constructs from another instance.
  LatLonLines(RealType type)
          Construct a LatLonLine object with default min, max and spacing values.
  LatLonLines(RealType type, float minValue, float maxValue, float spacing)
          Construct a LatLonLine object of the given type.
  LatLonLines(RealType type, float minValue, float maxValue, float spacing, boolean setData)
          Construct a LatLonLine object of the given type.
 
Method Summary
 Displayable cloneForDisplay()
          Returns a clone of this instance suitable for another VisAD display.
 float getSpacing()
          Get the current line spacing.
 void setLimits(float minValue, float maxValue, float spacing)
          Set the limits and spacing of the lines.
 void setMaxMin(float minValue, float maxValue)
          Change the starting and ending lines
 void setSpacing(float spacing)
          Change the line spacing
 void setVisible(boolean visible)
          Sets the "visible" property.
 String toString()
          Provide a readable description of this LatLonLines
 
Methods inherited from class ucar.visad.display.LineDrawing
getColor, getLineStyle, getLineWidth, getPointSize, setColor, setHSV, setHSV, setLineStyle, setLineWidth, setPointSize, setRGB, setRGB, setRGBA, setRGBA
 
Methods inherited from class ucar.visad.display.DisplayableData
addAction, dataChange, destroy, getActive, getAnimationSet, getData, getDataRenderer, getName, hasData, hasDataObject, isManipulable, isPickable, myAddConstantMaps, myAddDataReferences, myRemoveDataReferences, removeAction, setActive, setData, setDataReference, setManipulable, setPickable, setPointMode, setUseFastRendering
 
Methods inherited from class ucar.visad.display.Displayable
addConstantMap, addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, isActive, isUnitCompatible, isVisible, logException, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setAdjustFlow, setColorPalette, setColorPalette, setColorUnit, setConstantPosition, setContourInfo, setDisplay, setDisplayActive, setDisplayInactive, setDisplayMaster, setDisplayUnit, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange, setSelectedRange, setUseTimesInAnimation, toFront
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LatLonLines

public LatLonLines(RealType type)
            throws VisADException,
                   RemoteException
Construct a LatLonLine object with default min, max and spacing values.

Parameters:
type - lat lines when type = RealType.Latitude, lon lines when type = RealType.Longitude
Throws:
VisADException - invalid type or can't create local VisAD object
RemoteException - couldn't create remote VisAD object

LatLonLines

public LatLonLines(RealType type,
                   float minValue,
                   float maxValue,
                   float spacing)
            throws VisADException,
                   RemoteException
Construct a LatLonLine object of the given type.

Parameters:
type - lat lines when type = RealType.Latitude, lon lines when type = RealType.Longitude
minValue - starting line (degrees)
maxValue - ending line (degrees)
spacing - spacing between lines (degrees)
Throws:
VisADException - invalid type or can't create local VisAD object
RemoteException - couldn't create remote VisAD object

LatLonLines

public LatLonLines(RealType type,
                   float minValue,
                   float maxValue,
                   float spacing,
                   boolean setData)
            throws VisADException,
                   RemoteException
Construct a LatLonLine object of the given type.

Parameters:
type - lat lines when type = RealType.Latitude, lon lines when type = RealType.Longitude
minValue - starting line (degrees)
maxValue - ending line (degrees)
spacing - spacing between lines (degrees)
setData - if true, the data will be set on construction
Throws:
VisADException - invalid type or can't create local VisAD object
RemoteException - couldn't create remote VisAD object

LatLonLines

protected LatLonLines(LatLonLines that)
               throws RemoteException,
                      VisADException
Constructs from another instance.

Parameters:
that - The other instance.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
Method Detail

setSpacing

public void setSpacing(float spacing)
                throws VisADException,
                       RemoteException
Change the line spacing

Parameters:
spacing - spacing between lines (degrees)
Throws:
VisADException - couldn't create local VisAD object
RemoteException - couldn't create remote VisAD object

getSpacing

public float getSpacing()
Get the current line spacing.

Returns:
spacing in degrees

setMaxMin

public void setMaxMin(float minValue,
                      float maxValue)
               throws VisADException,
                      RemoteException
Change the starting and ending lines

Parameters:
minValue - starting line (degrees)
maxValue - ending line (degrees)
Throws:
VisADException - couldn't create local VisAD object
RemoteException - couldn't create remote VisAD object

setLimits

public void setLimits(float minValue,
                      float maxValue,
                      float spacing)
               throws VisADException,
                      RemoteException
Set the limits and spacing of the lines.

Parameters:
minValue - starting line (degrees)
maxValue - ending line (degrees)
spacing - spacing between lines (degrees)
Throws:
VisADException - couldn't create local VisAD object
RemoteException - couldn't create remote VisAD object

cloneForDisplay

public Displayable cloneForDisplay()
                            throws RemoteException,
                                   VisADException
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.

Overrides:
cloneForDisplay in class DisplayableData
Returns:
A semi-deep clone of this instance.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setVisible

public void setVisible(boolean visible)
                throws RemoteException,
                       VisADException
Sets the "visible" property. This method fires a PropertyChangeEvent for VISIBLE.

Overrides:
setVisible in class DisplayableData
Parameters:
visible - Whether or not this instance should be visible.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

toString

public String toString()
Provide a readable description of this LatLonLines

Overrides:
toString in class DisplayableData
Returns:
readable description