class ZeroColumnLayout.RegularModeVariables
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
deltaWidth
Extra width caused by widget placement quirk.
|
(package private) double |
distanceY
Adjustment for the labels in non-SIDE-LABELS mode.
|
(package private) boolean |
doFixup
Perform fixup.
|
private boolean |
doPlacement
Flag which controls widget placement.
|
(package private) double |
extraSpaces
Number of spaces to insert between widgets.
|
(package private) boolean |
fixupNextRow
Perform fixup of next row.
|
(package private) double |
hdrWidth
Header width.
|
(package private) int |
leadingSkips
Index of last leading SKIP widget.
|
(package private) double |
maxHeight
Maximal height.
|
(package private) double |
maxRowHeight
Maximal height of widget in current row of widgets.
|
private int |
maxRowHeightAdjustedByIndex
Index of widget which caused adjustment of currentHeight variable.
|
(package private) double |
nextColumn
Next free column.
|
(package private) double |
nextRow
Next free row.
|
(package private) Dimension |
res
Resulting dimensions.
|
(package private) double |
startColumn
Initial column for new row.
|
(package private) boolean |
wAttrSpace
Local widget ATTR-SPACE.
|
private Point |
widgetLocation
The location of a widget being currently processed.
|
private double |
width
Maximal layout width.
|
(package private) boolean |
xSet
X-coordinate set flag.
|
(package private) boolean |
ySet
Y-coordinate set flag.
|
Constructor and Description |
---|
RegularModeVariables(double width,
boolean doPlacement)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
adjustDimensions()
Adjust resulting dimensions according to collected information.
|
private void |
calcQuirksOffset(int i)
Calculate 'quirks' offset for labels.
|
void |
calculateHeaderHeight()
Calculate headers height.
|
(package private) void |
checkForFixup(int i)
Widgets which are placed outside terminal width in redirected mode
need some adjustments.
|
(package private) Dimension |
finalAdjustments()
Do final adjustments and calculations.
|
(package private) void |
handleInitColumn(int i)
Handle widgets with explicitly set column.
|
(package private) void |
handleInitRow(int i)
Handle widget with explicitly set initial row.
|
(package private) void |
handleLabeledWidget(int i,
Container<O> container)
Handle labeled widget.
|
(package private) void |
handleNoLabelWidget(int i)
Process widget which has no label for some reason.
|
(package private) void |
handleSkip(int i)
Handle SKIP widget.
|
(package private) void |
handleSpace(int i)
Handle SPACE widget.
|
(package private) void |
handleTO(int i)
Handle widget TO option.
|
(package private) void |
incrementNextRow(double delta)
Increment next row for widget placement by specified delta.
|
(package private) void |
initWidgetLocation(int i)
Initializes the instance variable holding the location of a widget
being currently processed.
|
(package private) boolean |
isFrameUnderline(int frameId)
Check if the frame needs underlining.
|
boolean |
isSpaceHandled(int i)
Check and if necessary handle SKIP and SPACE widgets.
|
(package private) void |
nextRow()
Go to thew next row.
|
(package private) void |
nextRow(double height)
Go to thew next row.
|
(package private) void |
nextRow(double height,
double newCol)
Go to the next row and set start column to specified value.
|
private void |
setLabelLocation(Label<O> label,
double col,
double row)
Sets label location.
|
(package private) void |
setNextColumn(double nextColumn)
Set the next column position for widget placement.
|
(package private) void |
setNextRow(double nextRow)
Set next row for widget placement.
|
(package private) void |
setStartColumn(int i)
Initialize start column.
|
(package private) void |
setWidgetLocation(int i)
Sets widget position from the calculated location or location set
by server.
|
(package private) void |
setWidgetLocation(Widget<O> w)
Sets widget position from the calculated location or location set
by server.
|
double startColumn
double nextColumn
double hdrWidth
double nextRow
double maxRowHeight
double maxHeight
double distanceY
int leadingSkips
double extraSpaces
private double width
boolean wAttrSpace
boolean ySet
boolean xSet
boolean doFixup
boolean fixupNextRow
private boolean doPlacement
private double deltaWidth
private int maxRowHeightAdjustedByIndex
private Point widgetLocation
Dimension res
public RegularModeVariables(double width, boolean doPlacement)
width
- Maximal layout width.doPlacement
- Widget placement mode.public boolean isSpaceHandled(int i)
i
- Widget index.true
if widget is handled.public void calculateHeaderHeight()
boolean isFrameUnderline(int frameId)
frameId
- The frame ID.true
if the frame needs underlining, false
if the
frame was defined with the NO-UNDERLINE option.void adjustDimensions()
void nextRow()
void nextRow(double height)
height
- Vertical step.void nextRow(double height, double newCol)
height
- Vertical step.newCol
- New start column.void setStartColumn(int i)
i
- Widget index.void checkForFixup(int i)
i
- Widget index.Dimension finalAdjustments()
void handleNoLabelWidget(int i)
i
- Widget index.private void calcQuirksOffset(int i)
Under some circumstances label may be shifted right from its correct placement.
i
- Widget index.void handleLabeledWidget(int i, Container<O> container)
i
- Widget index.container
- Container where widget and label are stored.void handleSpace(int i)
i
- Widget index.void handleSkip(int i)
i
- Widget index.void handleTO(int i)
i
- Widget index.void handleInitColumn(int i)
i
- Widget index.void handleInitRow(int i)
i
- widget index.void setNextRow(double nextRow)
nextRow
- New value for the nextRowvoid incrementNextRow(double delta)
delta
- Next row increment.void setNextColumn(double nextColumn)
nextColumn
- The nextColumn to set.void initWidgetLocation(int i)
i
- Widget index.void setWidgetLocation(int i)
i
- Widget index.void setWidgetLocation(Widget<O> w)
w
- Widget.