public class DasRow extends DasDevicePosition
Modifier and Type | Field and Description |
---|---|
static DasRow |
NULL
placeholder for unassigned value.
|
canvas, listenerList, parent, PROP_DMAXIMUM, PROP_DMINIMUM, PROP_EMMAXIMUM, PROP_EMMINIMUM, PROP_MAXIMUM, PROP_MAXLAYOUT, PROP_MINIMUM, PROP_MINLAYOUT, PROP_PARENT_DEVICE_POSITION_DAS_NAME, PROP_PTMAXIMUM, PROP_PTMINIMUM
Constructor and Description |
---|
DasRow(DasCanvas canvas,
DasRow parent,
double nMin,
double nMax,
double emMin,
double emMax,
int ptMin,
int ptMax)
create a DasRow
|
DasRow(DasCanvas parent,
double top,
double bottom)
create a DasRow with the normal position and no offsets.
|
Modifier and Type | Method and Description |
---|---|
int |
bottom()
return the device location of the bottom (non-inclusive) of the row.
|
static DasRow |
create(DasCanvas parent)
Deprecated.
use new DasRow(parent,0.1,0.9);
|
static DasRow |
create(DasCanvas canvas,
DasRow parent,
java.lang.String minStr,
java.lang.String maxStr)
makes a new DasRow by parsing a string like "100%-5em+3pt" to get the offsets.
|
static DasRow |
create(DasCanvas parent,
int iplot,
int nplot)
Deprecated.
a convenience method should be added.
|
DasRow |
createAttachedRow(double ptop,
double pbottom)
create a row that is positioned relative to this row.
|
DasRow |
createSubRow(double ptop,
double pbottom)
Deprecated.
This created a row that was not attached to anything, so
it was simply a convenience method that didn't save much effort.
|
int |
getHeight()
return the height in points (pixels) of the row.
|
java.lang.String |
getParentRowName()
return the name of the column this is attached to, or empty string.
|
void |
setParentRow(DasRow r)
reset the parent to be this new DasColumn, or null.
|
int |
top()
return the device location of the top of the row.
|
addPropertyChangeListener, addPropertyChangeListener, addUpdateListener, contains, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireUpdate, formatFormatStr, formatLayoutStr, formatLayoutStr, formatLayoutStr, getCanvas, getDasName, getDeviceSize, getDMaximum, getDMiddle, getDMinimum, getEmMaximum, getEmMinimum, getEmSize, getMaximum, getMaxLayout, getMinimum, getMinLayout, getParent, getParentDasName, getParentDevicePosition, getPtMaximum, getPtMinimum, isValueIsAdjusting, mutatorLock, parseFormatStr, parseLayoutStr, parseLayoutStr, parseLayoutStr, removeListeners, removePropertyChangeListener, removePropertyChangeListener, removeUpdateListener, revalidate, setDasName, setDMaximum, setDMinimum, setDPosition, setEmMaximum, setEmMinimum, setMax, setMaximum, setMaxLayout, setMin, setMinimum, setMinLayout, setParent, setParentDevicePosition, setPtMaximum, setPtMinimum, toRectangle, toString
public static final DasRow NULL
public DasRow(DasCanvas parent, double top, double bottom)
parent
- the canvas where this lives.top
- the top of the row in normal coordinates.bottom
- the bottom of the row in normal (0-1.) coordinatespublic DasRow(DasCanvas canvas, DasRow parent, double nMin, double nMax, double emMin, double emMax, int ptMin, int ptMax)
canvas
- the canvas where this lives.parent
- the parent row or null to which this is relative.nMin
- normal position of the top with respect to the canvas or parent if non-null.nMax
- normal position of the bottom with respect to the canvas or parent if non-null.emMin
- em offset of the top from the minimum position, in canvas font heights.emMax
- em offset of the bottom from the maximum position, in canvas font heights.ptMin
- point offset of the top from the minimum position, note points are the same as pixels.ptMax
- point offset of the bottom from the maximum position, note points are the same as pixels.public static DasRow create(DasCanvas canvas, DasRow parent, java.lang.String minStr, java.lang.String maxStr)
canvas
- the canvas for the layout, ignored when a parent DasRow is used.parent
- if non-null, this DasRow is specified with respect to parent.minStr
- a string like "0%+5em"maxStr
- a string like "100%-7em"java.lang.IllegalArgumentException
- if the strings cannot be parsedpublic DasRow createSubRow(double ptop, double pbottom)
public int getHeight()
public static DasRow create(DasCanvas parent, int iplot, int nplot)
parent
- iplot
- nplot
- public DasRow createAttachedRow(double ptop, double pbottom)
ptop
- the normal positionpbottom
- the normal positionpublic int top()
public int bottom()
public void setParentRow(DasRow r)
r
- the new parent row, or null.public java.lang.String getParentRowName()