org.das2.graph.DasAxis
One dimensional axis component that transforms data to device space and back,
and provides controls for navigating the 1-D data space.
PROP_LABEL
PROP_LOG
PROP_OPPOSITE_AXIS_VISIBLE
PROP_BOUNDS
PROP_SCAN_RANGE
PROP_UNITS
PROPERTY_TICKS
PROP_ENABLEHISTORY
true if the axis built-in history is enabled.
PROP_REFERENCE
PROP_TICKVALUES
PROP_FLIPPED
PROP_FORMATSTRING
PROP_FLIPLABEL
PROP_DIVIDERDATUMFORMATTER
PROP_MINORTICKSDOMAINDIVIDER
PROP_MAJORTICKSDOMAINDIVIDER
PROP_USEDOMAINDIVIDER
PROP_LOCKDOMAINDIVIDER
addMouseWheelListener
addMouseWheelListener( java.awt.event.MouseWheelListener l ) → void
Adds a MouseWheelListener to the DasAxis. Special care must be taken
with the DasAxis, because it is composed of two sub panels, and their
parent panel (this), must not recieve the events. (This is because
the DasPlot between them should get the events, and the DasPlot does
not have a simple rectangular boundary.
Parameters
l - the listener
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
addTickV
addTickV( Datum majorTick ) → void
add the tick to the current set of major ticks. If the ticks were
automatic, they will now be manual. Note this copies the ticks into
a new array, presuming this is done at most a few tens of times.
Parameters
majorTick - tick in the same units as the axis.
Returns:
void (returns nothing)
See Also:
setTickV(double[], double[])
search for examples
view on GitHub
view source
areTickLabelsVisible
Deprecated: use isTickLabelsVisible
attachTo
attachTo( org.das2.graph.DasAxis axis ) → void
attach the axis to another axis, so they will both show the same range,
as with a stack of time axes or with a slice.
Parameters
axis - the axis.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
clearHistory
clearHistory( ) → void
clear the internal history.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
createAttachedAxis
createAttachedAxis( ) → DasAxis
create another axis that follows this axis. It will have the same
range and orientation.
Returns:
attached axis.
search for examples
view on GitHub
view source
detach
detach( ) → void
disconnect this from the common DataRange object that ties this to other
axes, and create a new DataRange.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
getAffineTransform
getAffineTransform( org.das2.graph.DasAxis.Memento memento, java.awt.geom.AffineTransform at ) → AffineTransform
return the AffineTransform, or null. The transform will be applied after the input
transform is applied. So to just get the transform, pass in identity.
Parameters
memento - memento from another axis state.
at - initial transform
Returns:
the transform from that state to this state, or null if no transform can be created.
search for examples
view on GitHub
view source
getDLength
getDLength( ) → int
return the length of the axis in pixels.
Returns:
returns the length of the axis in pixels.
search for examples
view on GitHub
view source
getDataPath
getDataPath( ) → String
return the path for the TCA dataset. This will be a das2server data set
address, such as http://www-pw.physics.uiowa.edu/das/das2Server?voyager/tca/earth
Returns:
the path of the TCA dataset, or "".
search for examples
view on GitHub
view source
getDatumFormatter
getDatumFormatter( ) → DatumFormatter
return the formatter which converts Datum tick positions to a string.
Returns:
the formatter which converts Datum tick positions to a string.
search for examples
view on GitHub
view source
getDividerDatumFormatter
getDividerDatumFormatter( ) → DatumFormatter
Returns:
org.das2.datum.format.DatumFormatter
search for examples
view on GitHub
view source
getDrawTca
Deprecated: use isDrawTca()
getLabelFont
getLabelFont( ) → Font
get the font for labels. If the component currently has null for the
font, then Font.decode("sans-12") is used.
Returns:
the font to use for labels.
search for examples
view on GitHub
view source
getLineSpacing
getLineSpacing( ) → int
calculate the spacing (whitespace) between the TCA items.
Returns:
the spacing between lines.
search for examples
view on GitHub
view source
getMajorTicksDomainDivider
getMajorTicksDomainDivider( ) → DomainDivider
return the domain divider for major ticks, or null.
Returns:
the domain divider for major ticks, or null.
search for examples
view on GitHub
view source
getMasterAxis
getMasterAxis( ) → DasAxis
return the axis this is attached to.
Returns:
the axis this is attached to.
search for examples
view on GitHub
view source
getMemento
getMemento( ) → Memento
get the memento object which identifies the state of the axis transformation.
Returns:
the momento.
search for examples
view on GitHub
view source
getMinorTicksDomainDivider
getMinorTicksDomainDivider( ) → DomainDivider
return the domain divider for minor ticks, or null.
Returns:
the domain divider for minor ticks, or null.
search for examples
view on GitHub
view source
getOrientation
getOrientation( ) → int
returns the orientation of the axis, which is one of BOTTOM,TOP,LEFT or RIGHT.
Returns:
BOTTOM,TOP,LEFT or RIGHT.
search for examples
view on GitHub
view source
getScanRange
getScanRange( ) → DatumRange
get the limit the scan buttons, which may be null.
Returns:
the limit the scan buttons, which may be null.
search for examples
view on GitHub
view source
getTickDirection
getTickDirection( ) → int
return the tick direction, 1=down or left, -1=up or right
Returns:
1=down or left, -1=up or right
search for examples
view on GitHub
view source
getTickLabelFont
getTickLabelFont( ) → Font
get the font for tick labels. If the component currently has null for the
font, then Font.decode("sans-12") is used and a warning logged.
Returns:
the font to use for ticks.
search for examples
view on GitHub
view source
getTickLength
getTickLength( ) → String
get the tick length string, for example "0.66em"
Returns:
the tick length string
search for examples
view on GitHub
view source
getTickLines
getTickLines( ) → int
return the number of lines that the ticks use.
Returns:
int
search for examples
view on GitHub
view source
getTickV
getTickV( ) → TickVDescriptor
return the current set of ticks.
Returns:
the current set of ticks.
search for examples
view on GitHub
view source
getTickValues
getTickValues( ) → String
Returns:
java.lang.String
search for examples
view on GitHub
view source
getUserDatumFormatter
getUserDatumFormatter( ) → DatumFormatter
get the userDatumFormatter, which converts Datums into Strings. This
can be null if none should be used.
Returns:
the userDatumFormatter.
search for examples
view on GitHub
view source
isAnimated
isAnimated( ) → boolean
true if the axis is animated. Transitions in axis position are drawn
rapidly to animate the transition.
Returns:
true if the axis is animated.
search for examples
view on GitHub
view source
isAttached
isAttached( ) → boolean
return true if this is attached to another axis.
Returns:
true if this is attached to another axis.
search for examples
view on GitHub
view source
isDrawTca
isDrawTca( ) → boolean
true if additional tick labels are drawn using the TCA function.
Returns:
true if additional ticks will be drawn.
See Also:
setTcaFunction(org.das2.qds.QFunction)
search for examples
view on GitHub
view source
isEnableHistory
isEnableHistory( ) → boolean
true if the axis built-in history is enabled.
Returns:
true if the axis built-in history is enabled.
search for examples
view on GitHub
view source
isFlipLabel
isFlipLabel( ) → boolean
true if the right vertical label should be flipped.
Returns:
true if the right vertical label should be flipped.
search for examples
view on GitHub
view source
isFlipped
isFlipped( ) → boolean
return true if the axis is flipped.
Returns:
true if the axis is flipped.
search for examples
view on GitHub
view source
isHorizontal
isHorizontal( ) → boolean
test if the axis is horizontal.
Returns:
true if the orientation is BOTTOM or TOP.
search for examples
view on GitHub
view source
isLockDomainDivider
isLockDomainDivider( ) → boolean
Returns:
boolean
search for examples
view on GitHub
view source
isOppositeAxisVisible
isOppositeAxisVisible( ) → boolean
return true if the opposite side is also drawn.
Returns:
true if the opposite side is also drawn.
search for examples
view on GitHub
view source
isTcaLoaded
isTcaLoaded( ) → boolean
true if the TCA data has been loaded and the axis bounds reflect TCA data present.
Returns:
true if the TCA data has been loaded and the axis bounds reflect TCA data present.
search for examples
view on GitHub
view source
isTickLabelsVisible
isTickLabelsVisible( ) → boolean
true if the tick labels should be drawn.
Returns:
true if the tick labels should be drawn.
search for examples
view on GitHub
view source
isUseDomainDivider
isUseDomainDivider( ) → boolean
true if the domain divider should be used. This is a new object that
locates ticks.
Returns:
true if the domain divider should be used.
search for examples
view on GitHub
view source
removeMouseListener
removeMouseListener( java.awt.event.MouseListener l ) → void
remove mouse motion listener.
Parameters
l - the listener
Returns:
void (returns nothing)
See Also:
maybeInitializeInputPanels()
search for examples
view on GitHub
view source
removeMouseMotionListener
removeMouseMotionListener( java.awt.event.MouseMotionListener l ) → void
remove mouse motion listener.
Parameters
l - the listener
Returns:
void (returns nothing)
See Also:
maybeInitializeInputPanels()
search for examples
view on GitHub
view source
removeMouseWheelListener
removeMouseWheelListener( java.awt.event.MouseWheelListener l ) → void
remove mouse wheel listener.
Parameters
l - the listener
Returns:
void (returns nothing)
See Also:
maybeInitializeInputPanels()
search for examples
view on GitHub
view source
scanNext
scanNext( ) → void
scan to the next interval. If we were looking at a day with fuzz, then
scan to the next day.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
scanPrevious
scanPrevious( ) → void
scan to the previous interval. If we were looking at a day with fuzz, then
scan to the previous day.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setAnimated
setAnimated( boolean animated ) → void
if true then the axis will be animated.
Parameters
animated - if true then the axis will be animated.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setDataMaximum
setDataMaximum( Datum max ) → void
set the bigger extent of the range of this axis.
Parameters
max - the new value
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setDataMinimum
setDataMinimum( Datum min ) → void
set the smaller extent of the range of this axis.
Parameters
min - the new value
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setDataPath
setDataPath( String dataset ) → void
Parameters
dataset - The URL identifier string of a TCA data set, or "" for no TCAs.
Returns:
void (returns nothing)
See Also:
setDrawTca which turns on additional ticks. which turns on additional ticks.
search for examples
view on GitHub
view source
setDataRangeForward
setDataRangeForward( ) → void
set the range to the next interval.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setDataRangePrev
setDataRangePrev( ) → void
set the range to the previous interval.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setDataRangeZoomOut
setDataRangeZoomOut( ) → void
set the range to min-width to max+width.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setDividerDatumFormatter
setDividerDatumFormatter( org.das2.datum.format.DatumFormatter dividerDatumFormatter ) → void
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setDrawTca
setDrawTca( boolean b ) → void
if true then turn on additional tick labels using the TCA function.
Parameters
b - if true then additional ticks will be drawn.
Returns:
void (returns nothing)
See Also:
setTcaFunction(org.das2.qds.QFunction)
search for examples
view on GitHub
view source
setEnableHistory
setEnableHistory( boolean enableHistory ) → void
true if the axis built-in history is enabled.
Parameters
enableHistory - true if the axis built-in history is enabled.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setFlipLabel
setFlipLabel( boolean flipLabel ) → void
true if the right vertical label should be flipped.
Parameters
flipLabel - true if the right vertical label should be flipped.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setFlipped
setFlipped( boolean b ) → void
flip over the axis.
Parameters
b -
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setLabelOffset
setLabelOffset( String spec ) → void
explicitly set the position of the label from the axis.
For example, "4em" will position the y-axis label 4ems away from the
axis.
Parameters
spec - offset string like "5em+5px"
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setLeftXLabelOverride
Deprecated: use setLabelOffset instead.
setLockDomainDivider
setLockDomainDivider( boolean lockDomainDivider ) → void
don't allow the domain divider to adjust.
Parameters
lockDomainDivider -
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setMajorTicksDomainDivider
setMajorTicksDomainDivider( org.das2.datum.DomainDivider majorTicksDomainDivider ) → void
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setMinorTicksDomainDivider
setMinorTicksDomainDivider( org.das2.datum.DomainDivider minorTicksDomainDivider ) → void
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setNextAction
setNextAction( String label, javax.swing.AbstractAction abstractAction ) → void
set the action for the next button
Parameters
label - the label (step or scan)
abstractAction - the action to invoke.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setNextActionLabel
setNextActionLabel( String label, String tooltip ) → void
set the label for the popup button
Parameters
label - concise label
tooltip - text for popup tooltip
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setOppositeAxisVisible
setOppositeAxisVisible( boolean visible ) → void
if true, then the axis and its ticks on the opposite side will also be drawn.
Parameters
visible - if true, then the axis and its ticks on the opposite side will also be drawn.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setOrientation
setOrientation( int orientation ) → void
Set the axis orientation. One of: DasAxis.TOP, DasAxis.BOTTOM,
DasAxis.LEFT, DasAxis.RIGHT
Parameters
orientation - the orientation, one of TOP,BOTTOM,LEFT,RIGHT.
Returns:
void (returns nothing)
See Also:
TOP
BOTTOM
LEFT
RIGHT
search for examples
view on GitHub
view source
setPreviousAction
setPreviousAction( String label, javax.swing.AbstractAction abstractAction ) → void
set the action for the prev button
Parameters
label - the label (step or scan)
abstractAction - the action to invoke.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setPreviousActionLabel
setPreviousActionLabel( String label, String tooltip ) → void
set the label for the popup button
Parameters
label - concise label
tooltip - text for popup tooltip
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setScanRange
setScanRange( DatumRange range ) → void
limit the scan buttons to operate within this range.
http://sourceforge.net/p/autoplot/bugs/473/
Parameters
range - the range to limit the scanning
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setTcaFunction
setTcaFunction( org.das2.qds.QFunction f ) → void
Add auxiliary data to an axis (usually OrbitAttitude data for a time axis).
This function does the same thing as setDataPath, but with a different interface.
The QFunction must have one input parameter which will be positions on this axis
(e.g. times from a time axis).
Parameters
f - will be called upon to generate auxiliary data sets, or null to disable.
Returns:
void (returns nothing)
See Also:
setDrawTca which turns on additional ticks. which turns on additional ticks.
search for examples
view on GitHub
view source
setTickLabelsVisible
setTickLabelsVisible( boolean b ) → void
set true if the tick labels should be drawn.
Parameters
b - true if the tick labels should be drawn.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setTickLength
setTickLength( String tickLengthStr ) → void
set the tick length string, for example
"0.33em" "5px" "-0.33em"
Parameters
tickLengthStr - the tick length string.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setTickV
setTickV( double[] minorTicks, double[] majorTicks ) → void
convenience method for manually setting the ticks so the user
needn't understand TickVDescriptor. setTickV(null) can be
used to reset the ticks as well as setTickV(null,null).
Parameters
minorTicks - the minor ticks, or null (None) for the current minor ticks
majorTicks - the major ticks, or null (None) to automatic.
Returns:
void (returns nothing)
See Also:
setTickV(org.das2.graph.TickVDescriptor)
search for examples
view on GitHub
view source
setTickValues
setTickValues( String ticks ) → void
manually set the tick positions or spacing. The following are
examples of accepted settings:
| empty string is automatic behavior |
| 0,45,90,135,180 | explicit tick positions, in axis units |
| +45 | spacing between ticks, parsed with the axis offset units. |
| +30s | 30 seconds spacing between ticks |
Parameters
ticks -
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setUseDomainDivider
setUseDomainDivider( boolean useDomainDivider ) → void
true if the domain divider should be used. This is a new object that
locates ticks.
Parameters
useDomainDivider - true if the domain divider should be used.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source
setUserDatumFormatter
setUserDatumFormatter( org.das2.datum.format.DatumFormatter userDatumFormatter ) → void
set the userDatumFormatter, which converts Datums into Strings. This
can be null if none should be used.
Parameters
userDatumFormatter - the userDatumFormatter.
Returns:
void (returns nothing)
search for examples
view on GitHub
view source