|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.tabular.TableGroupNodeRealizer.RowNodeLabelModel
public static final class TableGroupNodeRealizer.RowNodeLabelModel
NodeLabelModel
that positions a node label relative to a row
in a TableGroupNodeRealizer
's table model.
Constructor Summary | |
---|---|
TableGroupNodeRealizer.RowNodeLabelModel()
Creates a new RowNodeLabelModel using a default offset
of 3 . |
|
TableGroupNodeRealizer.RowNodeLabelModel(double offset)
Creates a new RowNodeLabelModel using the specified
offset. |
Method Summary | |
---|---|
static java.lang.Object |
createParameter(TableGroupNodeRealizer.Row row,
boolean inside,
double leftRightRatio)
Creates a new model parameter that represents the specified positioning in relation to the specified row. |
static java.util.Collection |
findLabels(TableGroupNodeRealizer.Row row)
Returns all labels associated to the specified row. |
java.lang.Object |
getDefaultParameter()
Returns a model parameter that is not bound to any row. |
static double |
getHorizontalPosition(java.lang.Object modelParameter)
Returns the left-to-right ratio represented by the specified model parameter. |
static TableGroupNodeRealizer.Row |
getRow(NodeLabel label)
Determines the row to which the specified label is associated or null if there is no associated row (e.g. if the specified
label's model is not a RowNodeLabelModel ). |
static TableGroupNodeRealizer.Row |
getRow(TableGroupNodeRealizer realizer,
java.lang.Object modelParameter)
Determines the row in the specified realizer's table model that corresponds to the specified model parameter or null
if there is no corresponding row. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableGroupNodeRealizer.RowNodeLabelModel()
RowNodeLabelModel
using a default offset
of 3
.
TableGroupNodeRealizer.RowNodeLabelModel(double)
public TableGroupNodeRealizer.RowNodeLabelModel(double offset)
RowNodeLabelModel
using the specified
offset.
offset
- the minimum horizontal distance between node label bounds
and row bounds.Method Detail |
---|
public java.lang.Object getDefaultParameter()
Client code should not use default parameters for row labels.
Labels should be bound to rows either using
TableNodeRealizer.configureRowLabel
or by explicitly setting a parameter created by
RowNodeLabelModel.createParameter
.
getDefaultParameter
in interface NodeLabelModel
public static TableGroupNodeRealizer.Row getRow(NodeLabel label)
null
if there is no associated row (e.g. if the specified
label's model is not a RowNodeLabelModel
).
label
- the label whose associated row is to be determined.
null
if there is no associated row.public static TableGroupNodeRealizer.Row getRow(TableGroupNodeRealizer realizer, java.lang.Object modelParameter)
null
if there is no corresponding row.
realizer
- the TableGroupNodeRealizer
whose rows
are to be searched.modelParameter
- a model parameter associated to a row
in the specified TableGroupNodeRealizer
's table model.
null
if there is no corresponding row.public static java.util.Collection findLabels(TableGroupNodeRealizer.Row row)
row
- the Row
whose labels are to be retrieved.
public static double getHorizontalPosition(java.lang.Object modelParameter)
modelParameter
- a model parameter associated to a
row of a TableGroupNodeRealizer
.
TableGroupNodeRealizer.configureRowLabel(y.view.NodeLabel, y.view.tabular.TableGroupNodeRealizer.Row, boolean, double)
public static java.lang.Object createParameter(TableGroupNodeRealizer.Row row, boolean inside, double leftRightRatio)
row
- the associated Row
.inside
- if true
the label is positioned within the
bounds of the specified row; if false
the label is
positioned to the left or to the right of the specified row according to
the specified left to right ratio.leftRightRatio
- a value in [0,1]
specifying the
horizontal position of the label. If the label is placed within the row
bounds, 0
means to the left, 1
means to the
right. If the label is placed outside the row, values less than
0.5
result in a "to the left" placement while values equal
to or greater than 0.5
result in a "to the right" placement.
TableGroupNodeRealizer.configureRowLabel(y.view.NodeLabel, y.view.tabular.TableGroupNodeRealizer.Row, boolean, double)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |