|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.yworks.yfiles.server.graphml.flexio.data.Table
Defines a table structure.
The table serves as blueprint to set up a PartitionGrid
for the use with IncrementalHierarchicLayouter
.
To set up a PartitionGrid
a
TableLayoutConfigurator
has to prepare the graph
before the layout and restore it afterwards:
// graph is of type StyledLayoutGraph IncrementalHierarchicLayouter ihl = new IncrementalHierarchicLayouter(); TableLayoutConfigurator tlc = new TableLayoutConfigurator(); tlc.prepareAll(graph); graph.doLayout(ihl); tlc.restoreAll(graph);
Nested Class Summary | |
static class |
Table.StripeDefaults
The default settings for a newly created Column
or Row . |
Constructor Summary | |
Table()
Creates a new instance. |
Method Summary | |
void |
addColumn(Column column)
Adds the given column to the root column. |
void |
addRow(Row row)
Adds the given row to the root row. |
Column |
createColumn()
Creates a new column at root level. |
Column |
createColumn(Column parent)
Creates a new column as child of the given column. |
Column |
createColumn(Column parent,
int index)
Creates a new column as child of the given column at the given index. |
Column |
createColumn(Column parent,
int i,
double width,
double minimumSize,
Insets insets,
INodeStyle style)
Creates a new column as child of the given parent. |
Column |
createColumn(int index)
Creates a new column at root level at the given index. |
protected Table.StripeDefaults |
createColumnDefaults()
|
MarkupExtension |
createMarkupExtension(Lookup lookup)
Creates a markup extension that can be used instead of the original class. |
protected Column |
createNewColumn()
Creates a new column using the default settings .
|
protected Row |
createNewRow()
Creates a new row using the default settings .
|
Row |
createRow()
Creates a new Row at root level. |
Row |
createRow(int index)
Creates a new Row at root level at the given index. |
Row |
createRow(Row parent)
Creates a new Row at as child of the given parent row. |
Row |
createRow(Row parent,
int index)
Creates a new Row at as child of the given parent row at the given index. |
Row |
createRow(Row parent,
int i,
double height,
double minimumSize,
Insets insets,
INodeStyle style)
Creates a new row as child of the given parent. |
protected Table.StripeDefaults |
createRowDefaults()
|
Insets |
getAccumulatedInsets()
Calculates the accumulated insets for the table. |
Table.StripeDefaults |
getColumnDefaults()
Default settings for newly created columns. |
java.util.ArrayList |
getColumns()
A list with the root level columns. |
Insets |
getInsets()
Gets the table's insets. |
java.awt.geom.Rectangle2D.Double |
getLayout()
Gets the bounding box of the table. |
YPoint |
getRelativeLocation()
Gets the relative location of the upper left corner of the table. |
Column |
getRootColumn()
|
Row |
getRootRow()
The root row. |
Table.StripeDefaults |
getRowDefaults()
Default settings for newly created rows. |
java.util.ArrayList |
getRows()
A list with the root level rows. |
static boolean |
isRoot(Column column)
Whether the given column is the root column of a table. |
static boolean |
isRoot(Row row)
Whether the given row is the root row of a table. |
void |
placeInCell(Node tableNode,
Node node,
Column column,
Row row)
Convenience method which places a node such that the layouter sees it in the table cell which is specified by the given row and column. |
boolean |
removeColumn(Column column)
Removes the given column from the root column. |
boolean |
removeRow(Row row)
Removes the given row from the children of the root row. |
void |
setColumnDefaults(Table.StripeDefaults columnDefaults)
Default settings for newly created columns. |
void |
setInsets(Insets insets)
Sets the table's insets. |
void |
setRelativeLocation(YPoint relativeLocation)
Sets the relative location of the upper left corner of the table. |
void |
setRowDefaults(Table.StripeDefaults rowDefaults)
Sets the default settings for newly created rows. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Table()
Method Detail |
public Insets getInsets()
public void setInsets(Insets insets)
insets
- The table's insets.public YPoint getRelativeLocation()
The actual interpretation of this value depends on the context. If the table is bound to a node, this location is usually interpreted relative to the upper left corner of the node layout.
public void setRelativeLocation(YPoint relativeLocation)
The actual interpretation of this value depends on the context. If the table is bound to a node, this location is usually interpreted relative to the upper left corner of the node layout.
relativeLocation
- The relative location of the upper left corner of the table.public Table.StripeDefaults getRowDefaults()
protected Table.StripeDefaults createRowDefaults()
public void setRowDefaults(Table.StripeDefaults rowDefaults)
rowDefaults
- The row defaults.public Table.StripeDefaults getColumnDefaults()
protected Table.StripeDefaults createColumnDefaults()
public void setColumnDefaults(Table.StripeDefaults columnDefaults)
columnDefaults
- The column defaults.public java.util.ArrayList getRows()
Developers should not modify this list directly but use addRow / removeRow to add or remove rows.
public java.util.ArrayList getColumns()
Developers should not modify this list directly but use addColumn / removeColumn to add or remove columns.
public void addRow(Row row)
row
- The row to add.public boolean removeRow(Row row)
If the given row is not a child of the root row of this table this method does nothing
and returns false
.
row
- The row to remove.
true
if the row was a child of the root row
and if it has been removed successfully.public void addColumn(Column column)
column
- The column to add.public boolean removeColumn(Column column)
If the given row is not a child of the root column of this table this method does nothing
and returns false
.
column
- The column to remove.
true
if the column was a child of the root column
and if it has been removed successfully.public MarkupExtension createMarkupExtension(Lookup lookup)
IMarkupExtensionFactory
createMarkupExtension
in interface IMarkupExtensionFactory
lookup
- The lookup that shall be considered when creating the markup extension.public Insets getAccumulatedInsets()
public Row getRootRow()
The root row is a container for the rows at root level
.
public Column createColumn()
Developers should use this method or one of the other createColumn()
methods to create new columns.
This method creates a new column, sets defaults, parent and table correctly and adds the newly created row to the column.
public Column createColumn(int index)
Developers should use this method or one of the other createColumn()
methods to create new columns.
This method creates a new column, sets defaults, parent and table correctly and adds the newly created row to the column.
index
- The position of the newly added column.
public Column createColumn(Column parent)
Developers should use this method or one of the other createColumn()
methods to create new columns.
This method creates a new column, sets defaults, parent and table correctly and adds the newly created row to the column.
public Column createColumn(Column parent, int index)
Developers should use this method or one of the other createColumn()
methods to create new columns.
This method creates a new column, sets defaults, parent and table correctly and adds the newly created row to the column.
index
- The position of the new column.
protected Column createNewColumn()
default settings
.
The addColumn()
methods delegate to this method to create the column instance.
public Column createColumn(Column parent, int i, double width, double minimumSize, Insets insets, INodeStyle style)
parent
- The parent to add the column to.i
- The index to add the column at.width
- The size of the new column.minimumSize
- The minimum size of the new column.insets
- The insets of the new column.style
- The style of the new column.
public Row createRow(Row parent, int i, double height, double minimumSize, Insets insets, INodeStyle style)
parent
- The parent to add the row to.i
- The index to add the row at.height
- The size of the new row.minimumSize
- The minimum size of the new row.insets
- The insets of the new row.style
- The style of the new row.
public Row createRow()
Developers should use this method or one of the other createRow()
methods to create new rows.
This method creates a new row, sets defaults, parent and table correctly and adds the newly created row to the root.
public Row createRow(int index)
Developers should use this method or one of the other createRow()
methods to create new rows.
This method creates a new row, sets defaults, parent and table correctly and adds the newly created row to the root.
public Row createRow(Row parent)
Developers should use this method or one of the other createRow()
methods to create new rows.
This method creates a new row, sets defaults, parent and table correctly and adds the newly created row to the root.
public Row createRow(Row parent, int index)
Developers should use this method or one of the other createRow()
methods to create new rows.
This method creates a new row, sets defaults, parent and table correctly and adds the newly created row to the root.
protected Row createNewRow()
default settings
.
The addRow()
methods delegate to this method to create the row instance.
public java.awt.geom.Rectangle2D.Double getLayout()
The upper left corner of the bounding box is the relative location
to the upper left corner of the node which contains this table.
public void placeInCell(Node tableNode, Node node, Column column, Row row)
tableNode
- The node the table is assigned to.node
- The node to place.column
- The column to place the node in.row
- The row to place the node in.public static boolean isRoot(Column column)
column
- The column.
true
if the given column is the root column of a table.public static boolean isRoot(Row row)
row
- The row.
true
if the given row is the root row of a table.public Column getRootColumn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |