|
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.ColumnNodeLabelModel
public static final class TableGroupNodeRealizer.ColumnNodeLabelModel
NodeLabelModel
that positions a node label relative to a
column in a TableGroupNodeRealizer
's table model.
Constructor Summary | |
---|---|
TableGroupNodeRealizer.ColumnNodeLabelModel()
Creates a new ColumnNodeLabelModel using a default offset
of 3 . |
|
TableGroupNodeRealizer.ColumnNodeLabelModel(double offset)
Creates a new ColumnNodeLabelModel using the specified
offset. |
Method Summary | |
---|---|
static java.lang.Object |
createParameter(TableGroupNodeRealizer.Column column,
boolean inside,
double topBottomRatio)
Creates a new model parameter that represents the specified positioning in relation to the specified column. |
static java.util.Collection |
findLabels(TableGroupNodeRealizer.Column column)
Returns all labels associated to the specified column. |
static TableGroupNodeRealizer.Column |
getColumn(NodeLabel label)
Determines the column to which the specified label is associated or null if there is no associated column (e.g. if the specified
label's model is not a ColumnNodeLabelModel ). |
static TableGroupNodeRealizer.Column |
getColumn(TableGroupNodeRealizer realizer,
java.lang.Object modelParameter)
Determines the column in the specified realizer's table model that corresponds to the specified model parameter or null
if there is no corresponding column. |
java.lang.Object |
getDefaultParameter()
Returns a model parameter that is not bound to any column. |
static double |
getVerticalPosition(java.lang.Object modelParameter)
Returns the top-to-bottom ratio represented by the specified model parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TableGroupNodeRealizer.ColumnNodeLabelModel()
ColumnNodeLabelModel
using a default offset
of 3
.
TableGroupNodeRealizer.ColumnNodeLabelModel(double)
public TableGroupNodeRealizer.ColumnNodeLabelModel(double offset)
ColumnNodeLabelModel
using the specified
offset.
offset
- the minimum vertical distance between node label bounds
and column bounds.Method Detail |
---|
public java.lang.Object getDefaultParameter()
Client code should not use default parameters for column labels.
Labels should be bound to columns either using
TableNodeRealizer.configureColumnLabel
or by explicitly setting a parameter created by
ColumnNodeLabelModel.createParameter
.
getDefaultParameter
in interface NodeLabelModel
public static TableGroupNodeRealizer.Column getColumn(NodeLabel label)
null
if there is no associated column (e.g. if the specified
label's model is not a ColumnNodeLabelModel
).
label
- the label whose associated column is to be determined.
null
if there is no associated column.public static TableGroupNodeRealizer.Column getColumn(TableGroupNodeRealizer realizer, java.lang.Object modelParameter)
null
if there is no corresponding column.
realizer
- the TableGroupNodeRealizer
whose columns
are to be searched.modelParameter
- a model parameter associated to a column
in the specified TableGroupNodeRealizer
's table model.
null
if there is no corresponding column.public static java.util.Collection findLabels(TableGroupNodeRealizer.Column column)
column
- the Column
whose labels are to be retrieved.
public static double getVerticalPosition(java.lang.Object modelParameter)
modelParameter
- a model parameter associated to a
column of a TableGroupNodeRealizer
.
TableGroupNodeRealizer.configureColumnLabel(y.view.NodeLabel, y.view.tabular.TableGroupNodeRealizer.Column, boolean, double)
public static java.lang.Object createParameter(TableGroupNodeRealizer.Column column, boolean inside, double topBottomRatio)
column
- the associated Column
.inside
- if true
the label is positioned within the
bounds of the specified column; if false
the label is
positioned right above or right below the specified column according to
the specified top to bottom ratio.topBottomRatio
- a value in [0,1]
specifying the
vertical position of the label. If the label is placed within the column
bounds, 0
means at the top, 1
means at the
bottom. If the label is placed outside the column, values less than
0.5
result in a "right above" placement while values equal to
or greater than 0.5
result in a "right below" placement.
TableGroupNodeRealizer.configureColumnLabel(y.view.NodeLabel, y.view.tabular.TableGroupNodeRealizer.Column, 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 |