org.das2.graph.DasDevicePosition
DasRows and DasColumns are both DasDevidePositions that lay out the
canvas. Any object on the DasCanvas have a row and column object to indicate
the position of the object.
DasDevicePosition( org.das2.graph.DasCanvas parent, double minimum, double maximum, boolean width )
PROP_DMAXIMUM
PROP_DMINIMUM
PROP_EMMAXIMUM
PROP_EMMINIMUM
PROP_MAXIMUM
PROP_MINIMUM
PROP_PTMAXIMUM
PROP_PTMINIMUM
PROP_MAXLAYOUT
PROP_MINLAYOUT
addPropertyChangeListener
addPropertyChangeListener( java.beans.PropertyChangeListener listener ) → void
Parameters
listener - a PropertyChangeListener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
addPropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void
addUpdateListener
addUpdateListener( org.das2.graph.event.DasUpdateListener l ) → void
add an update listener
Parameters
l - update listener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
contains
contains( int x ) → boolean
returns true if ( getDMinimum() <= x ) && ( x <= getDMaximum() );
Parameters
x - the pixel position
Returns:
true if ( getDMinimum() <= x ) && ( x <= getDMaximum() );
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
formatFormatStr
Deprecated: see formatLayoutStr( double[] arr )
formatLayoutStr
formatLayoutStr( double[] arr ) → String
formats the three position specifiers efficiently.
Parameters
arr - three-element array [ npos (0.0-1.0), emoffset, pt_offset ].
Returns:
String like "100%-5em+4pt"
See Also:
parseFormatStr(java.lang.String)
formatLayoutStr(org.das2.graph.DasDevicePosition, boolean) which contains repeated code.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
formatLayoutStr( org.das2.graph.DasDevicePosition pos ) → String
formatLayoutStr( org.das2.graph.DasDevicePosition pos, boolean min ) → String
getDMaximum
getDMaximum( ) → int
returns the pixel position of the maximum of the Row/Column. This is
the right side of a column and the bottom of a row.
Returns:
the pixel position (pixel=point for now)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getDMiddle
getDMiddle( ) → int
returns pixel position (device position) of the the middle of the row or column
Returns:
pixel position (device position) of the the middle of the row or column
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getDMinimum
getDMinimum( ) → int
returns the pixel position of the minimum of the Row/Column. This is
the left side of a column and the top of a row.
Returns:
the pixel position (pixel=point for now)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getDasName
getDasName( ) → String
get the name associated with this object.
Returns:
the name associated with this object.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getEmMaximum
getEmMaximum( ) → double
return the em offset that controls the position of the bottom/right boundary.
Returns:
the em offset that controls the position of the bottom/right boundary.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getEmMinimum
getEmMinimum( ) → double
return the em offset that controls the position of the top/left boundary.
Returns:
the em offset that controls the position of the top/left boundary.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getEmSize
getEmSize( ) → int
returns the em size for the canvas. We define the em size as the
height of the font.
Returns:
the em height in points.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getMaxLayout
getMaxLayout( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getMaximum
getMaximum( ) → double
return the normal position control of the bottom/right.
Returns:
the normal position control of the bottom/right.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getMinLayout
getMinLayout( ) → String
Returns:
java.lang.String
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getMinimum
getMinimum( ) → double
return the normal position control of the top/left.
Returns:
the normal position control of the top/left.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getParent
getParent( ) → org.das2.graph.DasCanvas
return the parent canvas.
Returns:
the parent canvas.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getParentDevicePosition
getParentDevicePosition( ) → org.das2.graph.DasDevicePosition
return the parent, or null. If parent is non-null, then position is
relative to the parent.
Returns:
the parent, or null.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getPtMaximum
getPtMaximum( ) → int
return the points offset that controls the position of the bottom/right boundary.
Returns:
the points offset that controls the position of the bottom/right boundary.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
getPtMinimum
getPtMinimum( ) → int
return the points offset that controls the position of the top/left boundary.
Returns:
the points offset
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
isValueIsAdjusting
isValueIsAdjusting( ) → boolean
return true if the value is currently adjusting because a
mutator lock is out.
Returns:
true if the value is currently adjusting.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
parseFormatStr
Deprecated: use parseLayoutStr.
parseLayoutStr
parseLayoutStr( String s, double em, int widthHeight, double fail ) → double
parse the format string into a pixel count. Convenience method.
parseFormatStr(s) will throw a parse exception and should be used to
verify strings.
Parameters
s - The string, like "5em+3pt"
em - the em height of the font,
widthHeight - the width or height of the dimension.
fail - the value to return if the parsing fails.
Returns:
the length in pixels (or points).
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
parseLayoutStr( String s ) → double[]
parseLayoutStr( org.das2.graph.DasDevicePosition pos, String spec ) → void
removeListeners
removeListeners( ) → void
remove the listeners so that the DasRow or DasColumn can be garbage collected.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removePropertyChangeListener
removePropertyChangeListener( String propertyName, java.beans.PropertyChangeListener listener ) → void
Parameters
propertyName - a String
listener - a PropertyChangeListener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removePropertyChangeListener( java.beans.PropertyChangeListener listener ) → void
removeUpdateListener
removeUpdateListener( org.das2.graph.event.DasUpdateListener l ) → void
remove an update listener
Parameters
l - update listener
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setDMaximum
setDMaximum( int maximum ) → void
set the new pixel position of the bottom/right boundary.
em and pt offsets are not modified, and the normal position
is recalculated.
Parameters
maximum - new pixel maximum
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setDMinimum
setDMinimum( int minimum ) → void
set the new pixel position of the top/left boundary. em and pt offsets
are not modified, and the normal position is recalculated.
Parameters
minimum - new pixel minimum
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setDPosition
setDPosition( int minimum, int maximum ) → void
set the new pixel location of both the min and max in one operation.
Parameters
minimum - the top or left
maximum - the bottom or right
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setDasName
setDasName( String name ) → void
set the name associated with this object.
Parameters
name - the name associated with this object
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setEmMaximum
setEmMaximum( double emMaximum ) → void
set the em offset that controls the position of the bottom/right boundary.
Parameters
emMaximum - the em offset.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setEmMinimum
setEmMinimum( double emMinimum ) → void
set the em offset that controls the position of the top/left boundary.
Parameters
emMinimum - the em offset.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setMax
setMax( double norm, double em, int pt ) → void
set all three as one atomic operation
Parameters
norm - normal position from 0 to 1.
em - em offset from the normal position.
pt - points offset from the normal position.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setMaxLayout
setMaxLayout( String maxLayout ) → void
Parameters
maxLayout - a String
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setMaximum
setMaximum( double maximum ) → void
set the normal position of the minimum of the row or column.
For a row, this is the bottom. For a column, this is the right side.
Parameters
maximum - normal (0-1) position
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setMin
setMin( double norm, double em, int pt ) → void
set all three as one atomic operation
Parameters
norm - normal position from 0 to 1.
em - em offset from the normal position.
pt - points offset from the normal position.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setMinLayout
setMinLayout( String minLayout ) → void
Parameters
minLayout - a String
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setMinimum
setMinimum( double minimum ) → void
set the normal position of the minimum of the row or column.
For a row, this is the top. For a column, this is the left side.
Parameters
minimum - normal (0-1) position
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setParent
setParent( org.das2.graph.DasCanvas parent ) → void
set the parent canvas.
Parameters
parent - canvas.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setPtMaximum
setPtMaximum( int ptMaximum ) → void
set the pt offset that controls the position of the bottom/right boundary.
Parameters
ptMaximum - the em offset.
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
setPtMinimum
setPtMinimum( int ptMinimum ) → void
set the points offset that controls the position of the top/left boundary.
Parameters
ptMinimum - the points offset
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
toRectangle
toRectangle( org.das2.graph.DasRow row, org.das2.graph.DasColumn column ) → java.awt.Rectangle
convenience method for creating a rectangle from a row and column.
The rectangle will be in canvas pixel coordinates.
Parameters
row - row describing the top and bottom of the box.
column - column describing the left and right sides of the box.
Returns:
rectangle in canvas pixel coordinates.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
toString
toString( ) → String
return a human-readable string representing the object for debugging.
Returns:
a human-readable string representing the object for debugging.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]