## 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. TODO: Manual for using the DasAxis. The DasAxis will automatically pick tick locations and formatting for the ticks. This is done by looking at the units of the range and selecting an appropriate algorithm for locating and labelling ticks. TCAs are additional lines added to ticks. In Space Physics, this is often ephemeris data associated with each time. The controls for the DasAxis have grown over time. This outlines: format - manual control of formatting and tick locations including %f and "$Y-$j $H:$M" tickValues - manual control of tick locations, including +10/5 for repeating flipped - min will be at top or right, max will be at bottom or left. lineThickness - 3px will draw a 3-pixel wide line. "" is 1-pixel.

## DasAxis( Datum min, Datum max, int orientation )

Create an axis object, relating data and canvas pixel coordinates.

## DasAxis( DatumRange range, int orientation )

Create an axis object, relating data and canvas pixel coordinates.

## DasAxis( Datum min, Datum max, int orientation, boolean log )

Create an axis object, relating data and canvas pixel coordinates.

## PROP_LABEL

## PROP_LOG

## PROP_OPPOSITE_AXIS_VISIBLE

## PROP_BOUNDS

## PROP_SCAN_RANGE

## PROP_UNITS

## PROPERTY_TICKS

## MAX_TCA_LINES

## TOP

This value indicates that the axis should be located at the top of its cell

## BOTTOM

This value indicates that the axis should be located at the bottom of its cell

## LEFT

This value indicates that the axis should be located to the left of its cell

## RIGHT

This value indicates that the axis should be located to the right of its cell

## HORIZONTAL

This value indicates that the axis should be oriented horizontally

## VERTICAL

This value indicates that the axis should be oriented vertically

## PROPERTY_DATUMRANGE

## PROP_ENABLEHISTORY

true if the axis built-in history is enabled.

## PROP_REFERENCE

## PROP_TCAROWS

## PROP_TCALABELS

## PROP_TICKVALUES

## PROP_TICKLABELLER

## PROP_AXISOFFSET

## PROP_FONTSIZE

## PROP_LINETHICKNESS

## PROP_FLIPPED

## PROP_FORMAT

## PROP_FLIPLABEL

## PROP_DIVIDERDATUMFORMATTER

## PROP_MINORTICKSDOMAINDIVIDER

## PROP_MAJORTICKSDOMAINDIVIDER

## PROP_USEDOMAINDIVIDER

## PROP_LOCKDOMAINDIVIDER

## addMouseListener

addMouseListener( java.awt.event.MouseListener l ) → void

add mouse wheel listener.

### Parameters

l - the listener

### Returns:

void (returns nothing)

### See Also:

maybeInitializeInputPanels()
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addMouseMotionListener

addMouseMotionListener( java.awt.event.MouseMotionListener l ) → void

add mouse motion listener.

### Parameters

l - the listener

### Returns:

void (returns nothing)

### See Also:

maybeInitializeInputPanels()
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## 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 on old javadoc] [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 on old javadoc] [view source]

## addTimeRangeSelectionListener

addTimeRangeSelectionListener( org.das2.event.TimeRangeSelectionListener listener ) → void

Registers TimeRangeSelectionListener to receive events.

### Parameters

listener - The listener to register.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## addToFavorites

addToFavorites( DatumRange range ) → void

add the range to the favorites list, which is accessible from the popup-menu.

### Parameters

range - the range to add.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## 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 on old javadoc] [view source]

## clearHistory

clearHistory( ) → void

clear the internal history.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## clone

clone( ) → Object

### Returns:

a copy of the axis, also cloning the dataRange that backs the axis.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## createAttachedAxis

createAttachedAxis( ) → org.das2.graph.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 on old javadoc] [view source]

## createAttachedAxis

createAttachedAxis( int orientation ) → org.das2.graph.DasAxis

create another axis that follows this axis. It will have the same range.

### Parameters

orientation - the position relative to a plot, one of DasAxis.TOP, DasAxis.BOTTOM, DasAxis.LEFT, DasAxis.RIGHT

### Returns:

attached axis.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## dataRangeSelected

dataRangeSelected( org.das2.event.DataRangeSelectionEvent e ) → void

target event handlers to reset the axis bounds.

### Parameters

e - the event

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]

## findTick

Deprecated: Use getTickVDescriptor.findTick

## getActiveRegion

getActiveRegion( ) → java.awt.Shape

get the region containing the axis.

### Returns:

the region containing the axis.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getAffineTransform

getAffineTransform( org.das2.graph.DasAxis.Memento memento, java.awt.geom.AffineTransform at ) → java.awt.geom.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 on old javadoc] [view source]

## getAxisBounds

getAxisBounds( ) → java.awt.Rectangle

Calculate the rectangle that bounds the axis including its labels. When the axis is drawn on both sides of the plot, this rectangle will extend across the plot.

### Returns:

Rectangle containing the axes and its labels.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getAxisOffset

getAxisOffset( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]

## getDataMaximum

getDataMaximum( ) → Datum

return the maximum value

### Returns:

the maximum value
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDataMaximum

getDataMaximum( Units units ) → double

get the bigger extent of the range of this axis, in the given units.

### Parameters

units - the units which the result should be returned in.

### Returns:

the value in the units.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDataMinimum

getDataMinimum( ) → Datum

return the minimum value

### Returns:

the minimum value
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDataMinimum

getDataMinimum( Units units ) → double

get the smaller extent of the range of this axis, in the given units.

### Parameters

units - the units which the result should be returned in.

### Returns:

the value in the units.
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]

## getDataRange

getDataRange( ) → org.das2.graph.DataRange

return the mutable DataRange object. This is used to bind axes together by sharing an internal model.

### Returns:

the DataRange.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDatumFormatter

getDatumFormatter( ) → org.das2.datum.format.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 on old javadoc] [view source]

## getDatumRange

getDatumRange( ) → DatumRange

return the current range

### Returns:

the current range
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDevicePosition

Deprecated: this should not be used.

## getDividerDatumFormatter

getDividerDatumFormatter( ) → org.das2.datum.format.DatumFormatter

### Returns:

org.das2.datum.format.DatumFormatter
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getDrawTca

Deprecated: use isDrawTca()

## getFontSize

getFontSize( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getFormat

getFormat( ) → String

return the format string for each tick.

### Returns:

the format string for each tick.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLabel

getLabel( ) → String

get the label for the axis.

### Returns:

A String instance that contains the title displayed for this axis, or "" if the axis has no title.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getLabelFont

getLabelFont( ) → java.awt.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 on old javadoc] [view source]

## getLabelOffset

getLabelOffset( ) → String

### Returns:

the label offset.
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]

## getLineThickness

getLineThickness( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getMajorTicksDomainDivider

getMajorTicksDomainDivider( ) → org.das2.datum.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 on old javadoc] [view source]

## getMasterAxis

getMasterAxis( ) → org.das2.graph.DasAxis

return the axis this is attached to.

### Returns:

the axis this is attached to.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getMemento

getMemento( ) → org.das2.graph.DasAxis.Memento

get the memento object which identifies the state of the axis transformation.

### Returns:

the momento.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getMinorTicksDomainDivider

getMinorTicksDomainDivider( ) → org.das2.datum.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 on old javadoc] [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 on old javadoc] [view source]

## getRange

Deprecated: use getDatumRange instead.

## getReference

getReference( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]

## getTcaLabels

getTcaLabels( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getTcaRows

getTcaRows( ) → int

the explicit number of TCA rows used to allocate space (not including time location). If negative, this is ignored.

### Returns:

tcaRows
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]

## getTickLabelFont

getTickLabelFont( ) → java.awt.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 on old javadoc] [view source]

## getTickLabeller

getTickLabeller( ) → org.das2.graph.TickLabeller

### Returns:

org.das2.graph.TickLabeller
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]

## getTickLines

getTickLines( ) → int

return the number of lines that the ticks use, considering the ephemeris (TCAs) loaded.

### Returns:

the number of lines that the ticks use.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getTickV

getTickV( ) → org.das2.graph.TickVDescriptor

return the current set of ticks.

### Returns:

the current set of ticks.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getTickValues

getTickValues( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getUnits

getUnits( ) → Units

return the units of the axis.

### Returns:

the units of the axis.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getUserDatumFormatter

getUserDatumFormatter( ) → org.das2.datum.format.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 on old javadoc] [view source]

## invTransform

invTransform( double idata1, double idata2 ) → DatumRange

get the range covered by the two points. This allows clients to get a range without having to worry about the flipped property.

### Parameters

idata1 - pixel position on the axis, in the canvas frame.
idata2 - pixel position on the axis, in the canvas frame.

### Returns:

DatumRange implied by the two pixel positions.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## invTransform

invTransform( double idata ) → Datum

return the data location for the given pixel position. Plot coordinates have 0,0 at the upper-left hand corner of the screen.

### Parameters

idata - the pixel location on the axis, in the canvas frame.

### Returns:

the data location.
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## isLockDomainDivider

isLockDomainDivider( ) → boolean

### Returns:

boolean
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## isLog

isLog( ) → boolean

return true if the axis is log.

### Returns:

true if the axis is log.
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## mutatorLock

mutatorLock( ) → org.das2.graph.DasAxis.Lock

get an object to lock the axis for multiple operations.

### Returns:

an org.das2.graph.DasAxis.Lock
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## removeFromFavorites

removeFromFavorites( DatumRange range ) → void

remove the range from the favorites list, which is accessible from the popup-menu.

### Parameters

range - the range to add.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## removeTimeRangeSelectionListener

removeTimeRangeSelectionListener( org.das2.event.TimeRangeSelectionListener listener ) → void

Removes TimeRangeSelectionListener from the list of listeners.

### Parameters

listener - The listener to remove.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## repaint

repaint( ) → void

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## resetRange

resetRange( DatumRange range ) → void

set the axis to the new range, allowing the units to change.

### Parameters

range - the new range

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## resize

resize( ) → void

reset bounds (and unused transform), invalidate the tickV, etc.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## setAxisOffset

setAxisOffset( String axisOffset ) → void

set the offset of the axis from the plot.

### Parameters

axisOffset - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [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.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDataRange

setDataRange( Datum minimum, Datum maximum ) → void

Set the data range. minimum must be less than maximum, but for nominal data they can be equal.

### Parameters

minimum - the minimum value
maximum - the maximum value

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDataRangeForward

setDataRangeForward( ) → void

set the range to the next interval.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDataRangePrev

setDataRangePrev( ) → void

set the range to the previous interval.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [view source]

## setDatumRange

setDatumRange( DatumRange dr ) → void

Set the range for the axis. Note this is allowed to change the units as well.

### Parameters

dr - the new range. The range must be interval or ratio measurements.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setDividerDatumFormatter

setDividerDatumFormatter( org.das2.datum.format.DatumFormatter dividerDatumFormatter ) → void

### Parameters

dividerDatumFormatter - a DatumFormatter

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## setFlipped

setFlipped( boolean b ) → void

flip over the axis.

### Parameters

b - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setFontSize

setFontSize( String fontSize ) → void

### Parameters

fontSize - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setFormat

setFormat( String formatString ) → void

set a hint at the format string. Examples include:

- 0.000
- $H:$M!c$Y-$j
- 0
- %f

### Parameters

formatString - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLabel

setLabel( String t ) → void

set the label for the axis. The label for this axis is displayed below the ticks for horizontal axes or to left of the ticks for vertical axes.

### Parameters

t - The new label for this axis

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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. Empty string is default automatic behavior.

### Parameters

spec - offset string like "5em+5px"

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLeftXLabelOverride

Deprecated: use setLabelOffset instead.

## setLineThickness

setLineThickness( String lineThickness ) → void

set the thickness of the lines drawn.

### Parameters

lineThickness - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLockDomainDivider

setLockDomainDivider( boolean lockDomainDivider ) → void

don't allow the domain divider to adjust.

### Parameters

lockDomainDivider - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setLog

setLog( boolean log ) → void

Set the axis to be log or linear. If necessary, axis range will be adjusted to make the range valid.

### Parameters

log - true if the axis should be log.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setMajorTicksDomainDivider

setMajorTicksDomainDivider( org.das2.datum.DomainDivider majorTicksDomainDivider ) → void

### Parameters

majorTicksDomainDivider - a DomainDivider

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setMinorTicksDomainDivider

setMinorTicksDomainDivider( org.das2.datum.DomainDivider minorTicksDomainDivider ) → void

### Parameters

minorTicksDomainDivider - a DomainDivider

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## setPlot

setPlot( org.das2.graph.DasPlot p ) → void

set the plot that will get updates

### Parameters

p - plot object.

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## setReference

setReference( String reference ) → void

draw an optional reference line at the location. Valid entries can be parsed into a Datum, using the units of the axis.

### Parameters

reference - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setScanRange

setScanRange( DatumRange range ) → void

limit the scan buttons to operate within this range. Setting this to null will remove the limit. http://sourceforge.net/p/autoplot/bugs/473/

### Parameters

range - null or the range to limit the scanning

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setTcaLabels

setTcaLabels( String tcaLabels ) → void

set the TCA data labels explicitly, using a semi-colon delimited list of labels.

### Parameters

tcaLabels - a String

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setTcaRows

setTcaRows( int tcaRows ) → void

the explicit number of additional TCA rows used to allocate space (not including time location). If negative, this is ignored.

### Parameters

tcaRows - an int

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setTickLabeller

setTickLabeller( org.das2.graph.TickLabeller tickLabeller ) → void

### Parameters

tickLabeller - a TickLabeller

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## setTickV

setTickV( org.das2.graph.TickVDescriptor tickV ) → void

Sets the TickVDescriptor for this axis. If null is passed in, the axis will put into autoTickV mode, where the axis will attempt to determine ticks using an appropriate algorithm.

### Parameters

tickV - the new ticks for this axis, or null for automatic

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [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.
+20s/4 | every 20 seconds, with four minor divisions.
+30s | 30 seconds spacing between ticks
*10/2,3,4,5,6,7,8,9 | normal log axis.
*1e2/5,10,50 | log major ticks should be every two cycles
*5/2,3,4 | log major ticks at 1,5,25/
none | no ticks

### Parameters

ticks - a String

### Returns:

void (returns nothing)

### See Also:

https://cdn.graphpad.com/faq/1910/file/1487logaxes.pdf about log axes.
GraphUtil#calculateManualTicks(java.lang.String, org.das2.datum.DatumRange, boolean)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## setUnits

setUnits( Units newUnits ) → void

set the units of the axis, which must be convertible from the old units.

### Parameters

newUnits - the units of the axis.

### Returns:

void (returns nothing)

### See Also:

resetRange(org.das2.datum.DatumRange)
[search for examples] [view on GitHub] [view on old javadoc] [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 on old javadoc] [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 on old javadoc] [view source]

## setVisible

setVisible( boolean aFlag ) → void

set the component visible or invisible. The axis bounds are updated. So in addition to the JComponent visibility, this also makes a useful property to completely hide the axis. drawTickLabels hides the labels but still draws the ticks, this completely hides the axis. Note too that even though it is not visible, tick positions are still updated to support drawing a grid on the plot.

### Parameters

aFlag - a boolean

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## timeRangeSelected

timeRangeSelected( org.das2.event.TimeRangeSelectionEvent e ) → void

call back for time range selection event.

### Parameters

e - the event

### Returns:

void (returns nothing)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## toString

toString( ) → String

### Returns:

java.lang.String
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## transform

transform( Datum datum ) → double

Transforms a Datum in data coordinates to a horizontal or vertical position on the parent canvas.

### Parameters

datum - a data value

### Returns:

Horizontal or vertical position on the canvas.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## transform

transform( double data, Units units ) → double

Transforms a double in the given units in data coordinates to a horizontal or vertical position on the parent canvas.

### Parameters

data - a data value
units - the units of the given data value.

### Returns:

Horizontal or vertical position on the canvas.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## transform

transform( QDataSet data, Units units ) → double

Transforms the rank 0 dataset a horizontal or vertical position on the parent canvas. This was introduced to support when the rank 1 iterator would return QDataSets instead of doubles.

### Parameters

data - a data value
units - the units of the given data value.

### Returns:

Horizontal or vertical position on the canvas.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## transform

transform( QDataSet data ) → double

Transforms the rank 0 dataset a horizontal or vertical position on the parent canvas.

### Parameters

data - a data value

### Returns:

Horizontal or vertical position on the canvas.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## valueIsAdjusting

valueIsAdjusting( ) → boolean

true if a lock is out and an object is rapidly mutating the object. clients listening for property changes can safely ignore property changes while valueIsAdjusting is true, as they should receive a final propertyChangeEvent after the lock is released. (note it's not clear who is responsible for this. See http://das2.org/wiki/index.php/Das2.valueIsAdjusting)

### Returns:

true if valueIsAdjusting
[search for examples] [view on GitHub] [view on old javadoc] [view source]