Package ucar.visad.display
Class CrossSectionSelector
java.lang.Object
ucar.visad.display.Displayable
ucar.visad.display.CompositeDisplayable
ucar.visad.display.SelectorDisplayable
ucar.visad.display.CrossSectionSelector
CrossSectionSelector is a composite of two endpoints that can be
moved independently, a line connecting the two points, and
a middle point that can be used to move orthoganally to the line.
- Version:
- $Revision: 1.28 $
- Author:
- Don Murray
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intend point idstatic final intmid point idstatic final intstart point idstatic final Stringposition propertystatic final Stringposition propertystatic final Stringposition propertyFields inherited from class ucar.visad.display.SelectorDisplayable
PROPERTY_POSITIONFields inherited from class ucar.visad.display.CompositeDisplayable
cnt, labelFields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a CrossSectionSelector with default.Construct a CrossSectionSelector from another instanceCrossSectionSelector(RealTuple startPoint, RealTuple endPoint) Construct a CrossSectionSelector along the points specified.CrossSectionSelector(RealTuple startPoint, RealTuple endPoint, Color color) Construct a CrossSectionSelector along the points specified in the Color specified. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a listener for data changes.voidAdds a listener for data changes.voidAdds a listener for data changes.Returns a clone of this instance suitable for another VisAD display.voidRemove the end pointvoidRemove the mid pointvoidRemove the start pointGet the position of the ending point of the line.get the selector pointget the selector pointGet the position of the middle point of the line.Get the position of the ending point of the line.Get the position of the starting point of the lineget the selector pointprotected voidCalled when the position has changedvoidRemoves a listener for data changes.voidRemoves a listener for data changes.voidRemoves a listener for data changes.voidsetAutoSize(boolean yesorno) Set whether the marker should automatically resize as the display is zoomed.voidSet the color of the selector points.voidsetConstantPosition(double value, DisplayRealType type) Override base class methodvoidsetEndPoint(RealTuple point) Set the position of the ending point of the line.voidsetEndPointFixed(boolean value) set whether the end point can be moved or not by user; true=yesvoidsetEndPointVisible(boolean value) Set whether the end point is visible; true=yesvoidsetInterpolateLinePoints(boolean value) SHould we interpolate the line pointsvoidsetMidPoint(RealTuple point) Set the position of the ending point of the line; using current start and end points (ie "does nothing" -for persistence)voidsetMidPointVisible(boolean value) Set whether the mid point is visible; true=yesvoidSet the position of one end point of the line.voidsetPointSize(float size) Set the size of the selector points.voidsetPosition(RealTuple[] position) Set the position of the ending point of the line.voidsetPosition(RealTuple startPosition, RealTuple endPosition) Set the position of the ending point of the line.voidsetStartPoint(RealTuple point) Set the position of the starting point of the line.voidsetStartPointFixed(boolean value) set whether the start point can be moved or not by user; true=yesvoidsetStartPointVisible(boolean value) Set whether the start point is visible; true=yesvoidsetStartPtFixed(boolean value) set whether the start point can be moved or not by user; true=yes deprecated Should use setStartPointFixedvoidsetZValue(double zValue) Set the location along the Z Axis that you want to have the line and points displayedMethods inherited from class ucar.visad.display.SelectorDisplayable
addPropertyChangeListener, getAutoSize, getFiringEvent, getOkToFireEvents, getPointSize, notifyListenersOfMove, removePropertyChangeListener, setOkToFireEventsMethods inherited from class ucar.visad.display.CompositeDisplayable
addConstantMap, addDisplayable, addListDataListener, clearDisplayables, debug, destroy, destroyAll, displayableCount, fireListDataContentsChanged, fireListDataIntervalAdded, fireListDataIntervalRemoved, getAnimationSet, getDisplayable, indexOf, iterator, lastDisplayable, myAddDataReferences, myRemoveDataReferences, removeDisplayable, removeDisplayable, removeListDataListener, setAdjustFlow, setColorPalette, setColorUnit, setDisplay, setDisplayable, setDisplayMaster, setDisplayUnit, setLineWidth, setManipulable, setPointMode, setSelectedRange, setUseFastRendering, setUseTimesInAnimation, setVisible, setVisible, setVisible, toFront, toStringMethods inherited from class ucar.visad.display.Displayable
addConstantMaps, addDataReferences, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getData, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, hasDataObject, isActive, isUnitCompatible, isVisible, logException, myAddConstantMaps, removeConstantMap, removeDataReferences, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setColorPalette, setContourInfo, setDisplayActive, setDisplayInactive, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange
-
Field Details
-
PROPERTY_STARTPOINT
position property- See Also:
-
PROPERTY_ENDPOINT
position property- See Also:
-
PROPERTY_MIDPOINT
position property- See Also:
-
POINT_START
public static final int POINT_STARTstart point id- See Also:
-
POINT_END
public static final int POINT_ENDend point id- See Also:
-
POINT_MID
public static final int POINT_MIDmid point id- See Also:
-
-
Constructor Details
-
CrossSectionSelector
Construct a CrossSectionSelector with default. Line will run from (-1, 0) to (1,0) in (X,Y) space.- Throws:
VisADException- VisAD errorRemoteException- remote error
-
CrossSectionSelector
public CrossSectionSelector(RealTuple startPoint, RealTuple endPoint) throws VisADException, RemoteException Construct a CrossSectionSelector along the points specified.- Parameters:
startPoint- XY position of starting pointendPoint- XY position of ending point- Throws:
VisADException- VisAD errorRemoteException- remote error
-
CrossSectionSelector
public CrossSectionSelector(RealTuple startPoint, RealTuple endPoint, Color color) throws VisADException, RemoteException Construct a CrossSectionSelector along the points specified in the Color specified.- Parameters:
startPoint- XY position of starting pointendPoint- XY position of ending pointcolor- color for all components of this composite- Throws:
VisADException- VisAD errorRemoteException- remote error
-
CrossSectionSelector
Construct a CrossSectionSelector from another instance- Parameters:
that- other instance- Throws:
VisADException- VisAD errorRemoteException- remote error
-
-
Method Details
-
getStartSelectorPoint
get the selector point- Returns:
- the selector point
-
getEndSelectorPoint
get the selector point- Returns:
- the selector point
-
getMiddleSelectorPoint
get the selector point- Returns:
- the selector point
-
dontShowStartPoint
Remove the start point- Throws:
RemoteException- On badnessVisADException- On badness
-
dontShowMiddlePoint
Remove the mid point- Throws:
RemoteException- On badnessVisADException- On badness
-
dontShowEndPoint
Remove the end point- Throws:
RemoteException- On badnessVisADException- On badness
-
setPointSize
Set the size of the selector points. The middle point is always just a little bigger than the end points- Overrides:
setPointSizein classSelectorDisplayable- Parameters:
size- point size in pixels- Throws:
VisADException- VisAD errorRemoteException- remote error
-
setColor
Set the color of the selector points. The middle point is always just a little darker than the end points- Overrides:
setColorin classCompositeDisplayable- Parameters:
newColor- color for components- Throws:
VisADException- VisAD errorRemoteException- remote error
-
setAutoSize
Set whether the marker should automatically resize as the display is zoomed.- Overrides:
setAutoSizein classSelectorDisplayable- Parameters:
yesorno- true to automatically resize the marker.- Throws:
RemoteExceptionVisADException
-
setZValue
Set the location along the Z Axis that you want to have the line and points displayed- Parameters:
zValue- position along Z axis where components should be located- Throws:
VisADException- VisAD errorRemoteException- remote error
-
setConstantPosition
public void setConstantPosition(double value, DisplayRealType type) throws VisADException, RemoteException Override base class method- Overrides:
setConstantPositionin classCompositeDisplayable- Parameters:
value- Valuetype- Type- Throws:
RemoteException- On badnessVisADException- On badness
-
setStartPtFixed
set whether the start point can be moved or not by user; true=yes deprecated Should use setStartPointFixed- Parameters:
value- true to be fixed- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setStartPointFixed
set whether the start point can be moved or not by user; true=yes- Parameters:
value- true to be fixed- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setEndPointFixed
set whether the end point can be moved or not by user; true=yes- Parameters:
value- true to be fixed- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setStartPointVisible
Set whether the start point is visible; true=yes- Parameters:
value- true to be fixed- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setEndPointVisible
Set whether the end point is visible; true=yes- Parameters:
value- true for visible- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setMidPointVisible
Set whether the mid point is visible; true=yes- Parameters:
value- true for visible- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
setStartPoint
Set the position of the starting point of the line.- Parameters:
point- XY position as a RealTuple- Throws:
VisADException- bad pointRemoteException- Java RMI error
-
getStartPoint
Get the position of the starting point of the line- Returns:
- XY position as a RealTuple
-
setMidPoint
Set the position of the ending point of the line; using current start and end points (ie "does nothing" -for persistence)- Parameters:
point- XY position as a RealTuple- Throws:
VisADException- bad pointRemoteException- Java RMI error
-
getMidPoint
Get the position of the middle point of the line.- Returns:
- XY position as a RealTuple
-
setEndPoint
Set the position of the ending point of the line.- Parameters:
point- XY position as a RealTuple- Throws:
VisADException- bad pointRemoteException- Java RMI error
-
getEndPoint
Get the position of the ending point of the line.- Returns:
- XY position as a RealTuple
-
setPoint
Set the position of one end point of the line. The mid point is automatically fit between them.- Parameters:
which- either CrossSectionSelector.POINT_START or POINT_ENDpoint- point position- Throws:
RemoteException- Java RMI errorVisADException- bad point
-
setPosition
Set the position of the ending point of the line.- Parameters:
position- an array of size 2 that holds the start and end points- Throws:
RemoteException- Java RMI errorVisADException- bad point
-
getPosition
Get the position of the ending point of the line.- Returns:
- an array of size 2 that holds the start and end points
- Throws:
RemoteException- Java RMI errorVisADException- bad point
-
setPosition
public void setPosition(RealTuple startPosition, RealTuple endPosition) throws VisADException, RemoteException Set the position of the ending point of the line.- Parameters:
startPosition- starting position for the selector lineendPosition- ending position for the selector line- Throws:
RemoteException- Java RMI errorVisADException- bad point
-
positionHasChanged
Called when the position has changed- Throws:
RemoteException- Java RMI errorVisADException- problem creating VisAD object
-
cloneForDisplay
Returns a clone of this instance suitable for another VisAD display. Underlying data objects are not cloned.- Overrides:
cloneForDisplayin classCompositeDisplayable- Returns:
- A semi-deep clone of this instance.
- Throws:
VisADException- VisAD failure.RemoteException- Java RMI failure.
-
addStartPropertyChangeListener
Adds a listener for data changes.- Parameters:
action- The listener for changes to the underlying data.
-
removeStartPropertyChangeListener
Removes a listener for data changes.- Parameters:
action- The listener for changes to the underlying data.
-
addEndPropertyChangeListener
Adds a listener for data changes.- Parameters:
action- The listener for changes to the underlying data.
-
removeEndPropertyChangeListener
Removes a listener for data changes.- Parameters:
action- The listener for changes to the underlying data.
-
addMidPropertyChangeListener
Adds a listener for data changes.- Parameters:
action- The listener for changes to the underlying data.
-
removeMidPropertyChangeListener
Removes a listener for data changes.- Parameters:
action- The listener for changes to the underlying data.
-
setInterpolateLinePoints
SHould we interpolate the line points- Parameters:
value- interpolate- Throws:
RemoteException- on badnessVisADException- on badness
-