|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface represents the definition of a CompositeGroup that
behaves like a 2-dimensional table, complete with rows and columns. This table
allows a Composite object to be placed inside any cell which may
span multiple columns and rows. The indices of the columns and rows are 1-based,
such that the upper-left cell has the position [1,1]. Columns and rows can be
resized, moved, added, removed and uniquely identified by their headers.
A CompositeTable is made up of a View and a Model.
Embedded Composite objects and properties, such as row and column
count, are part of the model. The view holds visual data, such as widths and
selections. The following lists show to which group the different classes belong:
View
CompositeTablecom.tensegrity.composite.CompositeTableGridSelectionItemsAbstractTableHeaderVisualizerDefaultTableHeaderVisualizerModel
CompositeTableModelDefaultCompositeTableModel
The following figure shows a CompositeTable containing 4 labels positioned
in cells [2,2] (with horizontal spanning), [2,6], [4,2] and cell [4,4] (with a horizontal spanning).

To get started using a CompositeTable, start by creating a new
CoordinateSystem and then create a new DefaultCompositeTable.
These modes are used when a column or row is resized by the user dragging the border lines or when a column or row has to be resized due to a in-place editing of an inlying label.
The events fired by a CompositeTable can be divided into two parts:
events concerning the model (changes to column or row count, composites
added, etc.) and events concerning the view (cells selected, etc.) part
of the table.
Notice:
If you do not find the method you are looking, you should have a look at the
JavaDoc for CompositeTableModel.
The CompositeTable is still under construction, so that the
documentation ends here but will be extended within the next releases of
the composite framework.
| Field Summary | |
static int |
CELL
constants for the composites the table is made of |
static int |
CELL_SELECTION
select a single cell |
static int |
CELL_SELECTION_ALL
constant for the cell selection mode |
static int |
CELL_SELECTION_NON_EMPTY
constant for the cell selection mode |
static int |
COLUMN
constants for the composites the table is made of |
static int |
COLUMN_SELECTION
selection of a whole column |
static int |
DEFAULT_COLUMN_COUNT
Default values for column and row count |
static int |
DEFAULT_ROW_COUNT
Default values for column and row count |
static int |
EVENT_MASK_ADD_COMPOSITE
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off. |
static int |
EVENT_MASK_ADD_COMPOSITES
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off. |
static int |
EVENT_MASK_FOLDSTATE_CHANGE
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off. |
static int |
EVENT_MASK_MODEL
Event masks, to en- or disable the appropriate events |
static int |
EVENT_MASK_MODEL_COMPOSITE
Event masks, to en- or disable the appropriate events |
static int |
EVENT_MASK_REMOVE_COMPOSITE
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off. |
static int |
EVENT_MASK_REMOVE_COMPOSITES
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off. |
static int |
EVENT_MASK_RESTRICTED_BY_BUILDER
Event masks, to en- or disable the appropriate events |
static int |
EVENT_MASK_SELECTION_CHANGED
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off. |
static int |
EVENT_MASK_SIZE_ADJUSTMENT
Constants that tell about the different events or groups of events and can be used with BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off. |
static int |
FOLDPLACEMENT_CENTERED
Constants used to define the position of the fold-button. |
static int |
FOLDPLACEMENT_UPPERCORNER
Constants used to define the position of the fold-button. |
static int |
FOLDSTATE_FOLDED
Constant that tell about a state of folding a CompositeGroup supports |
static int |
FOLDSTATE_UNFOLDED
Constant that tell about a state of folding a CompositeGroup supports |
static int |
HORIZONTAL
vertical or horizontal alignment |
static int |
MULTIPLE_SELECTION_MODE
Multiple selections can be made |
static int |
RESIZE_LAST
The size of the last column or row is adjusted using the same amount of space, but in the opposite direction. |
static int |
RESIZE_NEXT
When the size of a column (respectively row) is adjusted, the size of the neighboring column (row) adjusted using the same amount of space, but in the opposite direction. |
static int |
RESIZE_NONE
Just set the size without affecting anything. |
static int |
RESIZE_SUBSEQUENT
Columns or rows are adjusted proportionally on a size change. |
static int |
RESIZE_TABLE
The entire table becomes larger or smaller when a column or row is resize. |
static int |
ROW
constants for the composites the table is made of |
static int |
ROW_SELECTION
select a whole row |
static int |
SINGLE_SELECTION_MODE
Only one selection at a time can be made |
static boolean |
SUPPRESS_CROSSOVER_MULTISELECTION
|
static int |
VERTICAL
vertical or horizontal alignment |
| Fields inherited from interface com.tensegrity.composite.BaseComposite |
DELEGATE_INFOVALUE, EVENT_MASK_MOUSE, EVENT_MASK_SELECT, GENERAL_INFOVALUE, NON_INFOVALUE |
| Fields inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
TREE_SUBSET_POSTFIX |
| Method Summary | |
void |
addTableSelectionListener(CompositeTableSelectionListener listener)
Registers listener so that it will receive
CompositeTableSelectionEvents. |
boolean |
areRowPortsEnabled()
Returns true, if row-ports are enabled. |
void |
clearColumnRanges()
Reset all column ranges. |
void |
clearRowRanges()
Reset all set row ranges. |
void |
clearSelection()
Clears all made selections (if any) of any type. |
int |
getActiveColumn()
Returns the index of the active column selection, which usually is the last selected column. |
int |
getActiveRow()
Returns the index of the active row selection, which usually is the last selected row. |
PaintFormat |
getBackgroundPaintFormat()
Returns the PaintFormat of the tables background.
|
Boundary |
getCellBounds(int col,
int row)
Returns the cell bounds of the cell in column col, row
row. |
CompositeIterator |
getCellComposites()
Returns an iterator over all Composites that are added
to the grid of this table. |
PaintFormat |
getCellPaintFormat(int column,
int row)
Returns the PaintFormat of the given table cell.
|
int |
getCellResizeMode()
Returns the auto resize mode of the table. |
int |
getCellSelectionMode()
Returns the cell selection mode. |
FontFormat |
getColumnHeaderFontFormat()
Returns FontFormat used for column headers. |
int |
getColumnHeaderHeight()
Returns the height of the column-headers. |
PaintFormat |
getColumnHeaderPaintFormat()
Returns the PaintFormat for unselected column headers. |
StrokeFormat |
getColumnHeaderStrokeFormat()
Returns the StrokeFormat of the column-headers. |
PaintFormat |
getColumnPaintFormat(int column)
Returns the PaintFormat of the given table column.
|
int |
getColumnWidth(int column)
Returns the width of the specified column. |
java.lang.String |
getFoldedGeometry()
Returns the geometry that is used for the folded representation |
java.lang.String |
getFoldedStyle()
Returns the style that is used for the folded representation |
int |
getFoldState()
Returns the state of folding of the CompositeGroup. |
int |
getFoldStateButtonCursor()
Returns the cursor that is displayed over the foldstate button |
Size |
getFoldStateSize(int foldstate)
Returns a Size instance that describes the extensions of a
CompositeGroup when it is in a folded state defined by the
constant given by foldstate. |
StrokeFormat |
getGridStrokeFormat()
Returns the StrokeFormat of the tables grid. |
com.tensegrity.composite.defaultimpl.table.CompositeTableModel |
getModel()
Return the used CompositeTableModel. |
FontFormat |
getRowHeaderFontFormat()
Returns FontFormat used for row headers. |
PaintFormat |
getRowHeaderPaintFormat()
Returns the PaintFormat for unselected row headers. |
StrokeFormat |
getRowHeaderStrokeFormat()
Returns the StrokeFormat of the row-headers. |
int |
getRowHeaderWidth()
Returns the width of the row-headers. |
int |
getRowHeight(int row)
Returns the height of the specified row. |
PaintFormat |
getRowPaintFormat(int row)
Returns the PaintFormat of the given table row.
|
PaintFormat |
getSelectedCellPaintFormat()
Returns the PaintFormat for selected cells.
|
java.util.List |
getSelectedCells()
Returns an List with all currently selected cells.
|
PaintFormat |
getSelectedColumnHeaderPaintFormat()
Returns the PaintFormat for selected column headers. |
ArrayListInt |
getSelectedColumns()
Returns an ArrayListInt with all currently selected columns. |
java.util.List |
getSelectedComposites()
Returns a List with all selected composites. |
PaintFormat |
getSelectedRowHeaderPaintFormat()
Returns the PaintFormat for selected row headers. |
ArrayListInt |
getSelectedRows()
Returns an ArrayListInt with all currently selected rows. |
com.tensegrity.composite.defaultimpl.table.TableElement |
getTableColumn(int column)
Returns the TableElemnt for the given column column. |
com.tensegrity.composite.defaultimpl.table.TableElement |
getTableRow(int row)
Returns the TableElemnt for the given row row. |
boolean |
isCellResizeEnabled()
Determines whether the resizing of cells is allowed. |
boolean |
isCellSelectionEnabled()
Returns true, if the selection of cells is allowed. |
boolean |
isColumnSelectionEnabled()
Returns true, if the selection of columns is allowed. |
boolean |
isFoldable()
Returns a boolean that indicates whether this
CompositeGroup is foldable or not. |
boolean |
isGridVisible()
Returns true if the table draws lines (a grid) between
cells. |
boolean |
isGridVisible(int orientation)
Returns true, if grid-lines for the given orientation are
drawn. |
boolean |
isRowSelectionEnabled()
Returns true, if the selection of columns is allowed. |
boolean |
isShowColumnHeaders()
Returns true if column-headers are shown. |
boolean |
isShowRowHeaders()
Returns true if row-headers are shown. |
boolean |
isUpperLeftCellVisible()
Returns true, if the upper left cell of the header-area is
visible. |
void |
moveColumn(int oldIndex,
int newIndex)
Moves the column and its header at oldIndex to
newIndex. |
void |
moveRow(int oldIndex,
int newIndex)
Moves the row and its header at oldIndex to
newIndex. |
void |
removeSelectedCompositesFromModel()
Removes all selected Composites from the model (if any). |
void |
removeSelection(int col,
int row,
int type)
Removes the specified selection at position column, row of
type type from the list of currently made selections. |
void |
removeSelectionListener(CompositeTableSelectionListener listener)
Unregisters the given listener so that it will no longer
receive CompositeTableSelectionEvents. |
void |
setBackgroundPaintFormat(PaintFormat paintFormat)
Sets the PaintFormat for the tables background. |
void |
setCellPaintFormat(int column,
int row,
PaintFormat pf)
Sets the PaintFormat of cell (column, row) to the given
one. |
void |
setCellResizeEnabled(boolean b)
Enables / Disables the resizing of column- and rows via mouse interaction. |
void |
setCellResizeMode(int mode)
Sets the table's resize mode when table columns or rows are resized. |
void |
setCellSelectionEnabled(boolean c)
Enables or disables cell selections. |
void |
setCellSelectionMode(int mode)
Sets the cell selection mode. |
void |
setColumnHeaderFontFormat(FontFormat format)
Sets the FontFormat for column headers. |
void |
setColumnHeaderHeight(int height)
Sets the height of single column-headers. |
void |
setColumnHeaderPaintFormat(PaintFormat format)
Sets the PaintFormat for unselected column headers. |
void |
setColumnHeaderStrokeFormat(StrokeFormat strokeFormat)
Set the StrokeFormat of the column-headers. |
void |
setColumnHeadersVisible(boolean show)
Sets the visibility of the column headers |
void |
setColumnHeaderVisualizer(com.tensegrity.composite.defaultimpl.table.AbstractTableHeaderVisualizer vis)
Sets the visualizer for table-columns.If no visualizer is set, the DefaultTableHeaderVisualizer
will be used. |
void |
setColumnMargin(int column,
int margin)
Sets the margin for column column to margin.
|
void |
setColumnPaintFormat(int column,
PaintFormat pf)
Sets the PaintFormat for the given column. |
void |
setColumnSelectionEnabled(boolean c)
Enables or disables the selection of columns. |
void |
setColumnWidth(int column,
int width)
Sets the width of column column to width.
|
void |
setCustomSpanAttributeEditor(CustomAttributeEditor customEditor)
Sets a custom editor for a CompositeTableSpan when edited
in the AttributeTable. |
void |
setCustomSpanAttributeRenderer(CustomAttributeRenderer customRenderer)
Sets a custom renderer for a CompositeTableSpan when shown
in the AttributeTable. |
void |
setFoldable(boolean foldable)
Sets the state of foldability for this CompositeGroup to the
value given by foldable. |
void |
setFoldedGeometry(java.lang.String geometryname)
Sets the geometry that is used for the folded representation |
void |
setFoldedStyle(java.lang.String stylename)
Sets the style that is used for the folded representation |
void |
setFoldState(int foldstate)
Sets the CompositeGroup to the state of folding given by
state. |
void |
setFoldStateButtonCursor(int cursorID)
Sets the cursor that is displayed over the foldstate button |
void |
setFoldStateSize(int foldstate,
Size size)
Sets the extensions of a CompositeGroup for the fold state
defined by the constant given by foldstate to the extensions
of the Size instance given by size. |
void |
setGridStrokeFormat(StrokeFormat strokeFormat)
Set the StrokeFormat of the tables grid. |
void |
setGridVisible(boolean showGrid)
Sets whether grid lines are drawn between table cells. |
void |
setGridVisible(int orientation,
boolean visible)
Sets whether the grid is drawn for the given orientation. |
void |
setMargin(int margin)
Sets the margin to be used within the whole table. |
void |
setMaximumCellSize(Size size)
Sets the maximum size for all cells (columns and rows). |
void |
setMinimumCellSize(Size size)
Sets the minimal size for all cells (columns and row). |
void |
setModel(com.tensegrity.composite.defaultimpl.table.CompositeTableModel model)
Sets the Data-Model of the Table to the given model and registers for CompositeTableModelEvents. |
void |
setRowHeaderFontFormat(FontFormat format)
Sets the FontFormat for row headers. |
void |
setRowHeaderPaintFormat(PaintFormat format)
Sets the PaintFormat for unselected row headers. |
void |
setRowHeaderStrokeFormat(StrokeFormat strokeFormat)
Set the StrokeFormat of the row-headers. |
void |
setRowHeadersVisible(boolean show)
Sets whether the Row headers are shown or not. |
void |
setRowHeaderVisualizer(com.tensegrity.composite.defaultimpl.table.AbstractTableHeaderVisualizer vis)
Sets the visualizer for table-rows. |
void |
setRowHeaderWidth(int width)
Sets the width of the single row-headers. |
void |
setRowHeight(int row,
int width)
Sets the height of row row to height.
|
void |
setRowMargin(int row,
int margin)
Sets the margin for row row to margin.
|
void |
setRowPaintFormat(int row,
PaintFormat pf)
Sets the PaintFormat for the given table row. |
void |
setRowPortsEnabled(boolean b)
Enables row ports depending on the given boolean parameter. |
void |
setRowSelectionEnabled(boolean c)
Enables or disables the selection of columns. |
void |
setSelectedCellPaintFormat(PaintFormat paintFormat)
Sets the PaintFormat for the table background. |
void |
setSelectedColumnHeaderPaintFormat(PaintFormat format)
Sets the PaintFormat for selected column headers. |
void |
setSelectedRowHeaderPaintFormat(PaintFormat format)
Sets the PaintFormat for selected rows headers. |
int |
setSelection(int column,
int row,
int type)
Sets the actual selection to the cell / row / column specified by column, row. |
void |
setSelectionMode(int mode)
|
void |
setUpperLeftCellVisible(boolean vis)
Set the visibility of the upper left cell to the given one. |
| Methods inherited from interface com.tensegrity.composite.CompositeControl |
isVisible |
| Methods inherited from interface com.tensegrity.generic.attribute.AttributableOnSet |
addAttributableOnSetListener, areAttributableEventsEnabled, disableAttributableEvents, enableAttributableEvents, getAttributes, getAttributesTree, removeAttributableOnSetListener, setAttributes, setAttributesTree |
| Methods inherited from interface com.tensegrity.generic.attribute.Attributable |
getAttribute, getAttributeType, getAttributeValue, setAttribute, setAttributeValue |
| Methods inherited from interface com.tensegrity.graphics.interaction.BaseInteractable |
getBoundingBox, getInteractionDescriptor, getMoveItem, hits, internalEnableSelection, internalSelect, internalSetSelected, isMovable, isSelectable, isSelected, mouseClick, mouseDown, mouseEnter, mouseExit, mouseUp, postActing, preActing, select, setMovable, setSelectable, setSelected, startAction, stopAction |
| Methods inherited from interface com.tensegrity.graphics.interaction.Interactable |
calculateBoundingBox, isResizable, setResizable |
| Methods inherited from interface com.tensegrity.graphics.interaction.InteractionProvider |
actAt, descriptorChanged, dismissFromInteractionCycle, getCurrentInteractionItemFor, getCursorID, getInteractionProviders, getSelection, getSelectionBoundingBox, hasMultiSelection, hasSelection, hasSubSelection, hitsAt, mouseClickAt, mouseDownAt, mouseMoveAt, mouseUpAt, postAction, preAction, select, selectAll, selectAt, selectContaining, selectSubsequent, setSelection, startActionAt, stopActionAt, unselect, unselect, unselectAll, unselectSubsequent |
| Field Detail |
public static final boolean SUPPRESS_CROSSOVER_MULTISELECTION
public static final int EVENT_MASK_ADD_COMPOSITE
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_ADD_COMPOSITES
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_REMOVE_COMPOSITE
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_REMOVE_COMPOSITES
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_SELECTION_CHANGED
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_FOLDSTATE_CHANGE
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int EVENT_MASK_SIZE_ADJUSTMENT
BaseComposite.enableEvents(int) to turn them on and
BaseComposite.disableEvents(int) to turn them off.
public static final int FOLDSTATE_FOLDED
CompositeGroup supports
public static final int FOLDSTATE_UNFOLDED
CompositeGroup supports
public static final int FOLDPLACEMENT_CENTERED
public static final int FOLDPLACEMENT_UPPERCORNER
public static final int EVENT_MASK_MODEL
public static final int EVENT_MASK_MODEL_COMPOSITE
public static final int EVENT_MASK_RESTRICTED_BY_BUILDER
public static final int RESIZE_NEXT
public static final int RESIZE_LAST
public static final int RESIZE_SUBSEQUENT
public static final int RESIZE_TABLE
public static final int RESIZE_NONE
applyGeomtry and the CompositeTableBuilder.
public static final int CELL_SELECTION
public static final int CELL_SELECTION_ALL
public static final int CELL_SELECTION_NON_EMPTY
public static final int ROW_SELECTION
public static final int COLUMN_SELECTION
public static final int CELL
public static final int COLUMN
public static final int ROW
public static final int DEFAULT_COLUMN_COUNT
public static final int DEFAULT_ROW_COUNT
public static final int VERTICAL
public static final int HORIZONTAL
public static final int SINGLE_SELECTION_MODE
public static final int MULTIPLE_SELECTION_MODE
| Method Detail |
public void setColumnWidth(int column,
int width)
column to width.
This column is then marked as - set -. All unset columns are adjusted
so that the overall sum of all widths fits the width of the underlying
coordinate-system. All previously set columns are unaffected by this
adjustment. So, if there�s is just one unset column remaining and you
try to set it�s width an Exception will be thrown. It�s
width is determined by all previously set columns.
column - the column for which you would like to set the width.width - the desired absolute width.public int getColumnWidth(int column)
column - the column to return the width for.
public void setRowHeight(int row,
int width)
row to height.
This row is then marked as - set -. All unset rows are adjusted
so that the overall sum of all heights fits the height of the underlying
coordinate-system. All previously set rows are unaffected by this
adjustment. So, if there�s is just one unset row remaining and you
try to set it�s height an Exception will be thrown. It�s
height is determined by all previously set rows.
row - the row for which you would like to set the height.width - the desired absolute height.public int getRowHeight(int row)
row - the row to query the height for.
public void clearColumnRanges()
public void clearRowRanges()
public boolean isGridVisible()
true if the table draws lines (a grid) between
cells. The default is true.
true if a grid is drawn, false if not.setGridVisible(boolean)public void setGridVisible(boolean showGrid)
showGrid - true, if grid lines should be drawn.isGridVisible()public boolean isGridVisible(int orientation)
true, if grid-lines for the given orientation are
drawn.
orientation - the orientation of the grid. Valid values are
HORIZONTAL and VERTICAL.
true, if grid-lines for the given direction are
drawn.
public void setGridVisible(int orientation,
boolean visible)
true.
orientation - the orientation of the grid. Valid values are
HORIZONTAL and VERTICAL.visible - true, if lines should be drawn.public int getColumnHeaderHeight()
public void setColumnHeaderHeight(int height)
height - the height of column-headers.public boolean isShowColumnHeaders()
true if column-headers are shown.
true if column-headers are shown.public void setColumnHeadersVisible(boolean show)
show - set to true, if column headers should be
visible.public int getRowHeaderWidth()
public void setRowHeaderWidth(int width)
width - the width to be set for every row-header.public boolean isShowRowHeaders()
true if row-headers are shown.
true if row-headers are shown.public void setRowHeadersVisible(boolean show)
show - true, if row headers should be displayed.public boolean isUpperLeftCellVisible()
true, if the upper left cell of the header-area is
visible.
true, if the upper left cell is visible.public void setUpperLeftCellVisible(boolean vis)
vis - true, if the upper left cell should be drawn.public int getCellResizeMode()
RESIZE_SUBSEQUENT.
public void setCellResizeMode(int mode)
RESIZE_SUBSEQUENT is used.
mode - the mode to set . Valid modes are
public boolean isCellResizeEnabled()
true, if resizing is be enabled.public void setCellResizeEnabled(boolean b)
b - true, if resizing shall be enabled.
public PaintFormat getCellPaintFormat(int column,
int row)
PaintFormat of the given table cell.
Null is returned when no PaintFormat is set for
the given cell.
column - the column.row - the row.
PaintFormat of the given table cell.
public void setCellPaintFormat(int column,
int row,
PaintFormat pf)
PaintFormat of cell (column, row) to the given
one.
column - the column for which to set the PaintFormat.row - the row for which to set the PaintFormat.pf - the PaintFormat to be set.public PaintFormat getColumnPaintFormat(int column)
PaintFormat of the given table column.
If no PaintFormat is set null is returned.
column - the column to return the PaintFormat for.
PaintFormat of the given table column.
public void setColumnPaintFormat(int column,
PaintFormat pf)
PaintFormat for the given column.
column - the column for which to set the PaintFormat
for.pf - the PaintFormat to be set.public PaintFormat getRowPaintFormat(int row)
PaintFormat of the given table row.
If no PaintFormat is set null is returned.
row - the row to return the PaintFormat for.
PaintFormat of the given table row.
public void setRowPaintFormat(int row,
PaintFormat pf)
PaintFormat for the given table row.
row - the row for which to set the PaintFormat for.pf - the PaintFormat to be set.public PaintFormat getBackgroundPaintFormat()
PaintFormat of the tables background.
If no PaintFormat is set, null is returned.
PaintFormat of the tables background.public void setBackgroundPaintFormat(PaintFormat paintFormat)
PaintFormat for the tables background.
paintFormat - the PaintFormat to be set for the tables
background.public PaintFormat getSelectedCellPaintFormat()
PaintFormat for selected cells.
If no PaintFormat is set, null is returned.
PaintFormat for selected cells.public void setSelectedCellPaintFormat(PaintFormat paintFormat)
PaintFormat for the table background.
paintFormat - the PaintFormat to be used for selected
cells.public PaintFormat getSelectedColumnHeaderPaintFormat()
PaintFormat for selected column headers.
PaintFormatpublic void setSelectedColumnHeaderPaintFormat(PaintFormat format)
PaintFormat for selected column headers.
format - the PaintFormat to be set.public PaintFormat getSelectedRowHeaderPaintFormat()
PaintFormat for selected row headers.
PaintFormatpublic void setSelectedRowHeaderPaintFormat(PaintFormat format)
PaintFormat for selected rows headers.
format - the PaintFormat to be set.public PaintFormat getColumnHeaderPaintFormat()
PaintFormat for unselected column headers.
PaintFormatpublic void setColumnHeaderPaintFormat(PaintFormat format)
PaintFormat for unselected column headers.
format - the PaintFormat to be set.public PaintFormat getRowHeaderPaintFormat()
PaintFormat for unselected row headers.
PaintFormatpublic void setRowHeaderPaintFormat(PaintFormat format)
PaintFormat for unselected row headers.
format - the PaintFormat to be set.public FontFormat getColumnHeaderFontFormat()
FontFormat used for column headers.
FontFormatpublic void setColumnHeaderFontFormat(FontFormat format)
FontFormat for column headers.
format - the FontFormat to be set.public FontFormat getRowHeaderFontFormat()
FontFormat used for row headers.
FontFormatpublic void setRowHeaderFontFormat(FontFormat format)
FontFormat for row headers.
format - the FontFormat to be set.public StrokeFormat getGridStrokeFormat()
StrokeFormat of the tables grid.
StrokeFormat.public void setGridStrokeFormat(StrokeFormat strokeFormat)
StrokeFormat of the tables grid.
strokeFormat - the StrokeFormat to be set.public StrokeFormat getColumnHeaderStrokeFormat()
StrokeFormat of the column-headers.
StrokeFormat.public void setColumnHeaderStrokeFormat(StrokeFormat strokeFormat)
StrokeFormat of the column-headers.
strokeFormat - the StrokeFormat to be set.public StrokeFormat getRowHeaderStrokeFormat()
StrokeFormat of the row-headers.
StrokeFormat.public void setRowHeaderStrokeFormat(StrokeFormat strokeFormat)
StrokeFormat of the row-headers.
strokeFormat - the StrokeFormat to be set.public int getCellSelectionMode()
public void setCellSelectionMode(int mode)
CELL_SELECTION_ALL
and CELL_SELECTION_NON_EMPTY.
mode - the cell selection mode to set.
public int setSelection(int column,
int row,
int type)
column, row. All selections of the given type
made up to now will be erased.
If the type is COLUMN- / ROW_SELECTION only the column /
row -parameter is relevant.
column - the column to be selected.row - the row to be selected.type - the desired selection mode; legal values are
SINGLE_CELL-,COLUMN- or ROW_SELECTION.
public void clearSelection()
public void removeSelection(int col,
int row,
int type)
column, row of
type type from the list of currently made selections.
col - the column.row - the row.type - type can be SINGLE_CELL-,COLUMN- or
ROW_SELECTION.setSelection(int, int, int)public ArrayListInt getSelectedColumns()
ArrayListInt with all currently selected columns.
ArrayListInt with all currently selected columns.public int getActiveColumn()
public int getActiveRow()
public ArrayListInt getSelectedRows()
ArrayListInt with all currently selected rows.
ArrayListInt with all currently selected rows.public java.util.List getSelectedCells()
List with all currently selected cells.
The inlaying cells are of type SelectionItems.Cell.
List that contains all currently selected cells.SelectionItemspublic boolean isCellSelectionEnabled()
true, if the selection of cells is allowed.
true, if the selection of cells is allowed.public void setCellSelectionEnabled(boolean c)
c - true, if cell selection should be allowed.public boolean isColumnSelectionEnabled()
true, if the selection of columns is allowed.
true, if the selection of columns is allowed.public void setColumnSelectionEnabled(boolean c)
c - true, if column selection should be allowed.public boolean isRowSelectionEnabled()
true, if the selection of columns is allowed.
true, if the selection of columns is allowed.public void setRowSelectionEnabled(boolean c)
c - true, if column selection should be allowed.
public void setRowMargin(int row,
int margin)
row to margin.
Note:setColumnMargin OR
setRowMargin. If you try to use them both, only the
row-margins will be considered.
row - the row to set the margin for.margin - the margin to set.setColumnMargin(int, int)public void setRowPortsEnabled(boolean b)
boolean parameter.
b - true to enable row ports, otherwise false.public boolean areRowPortsEnabled()
true, if row-ports are enabled.
true, if row-ports are enabled.
public void setColumnMargin(int column,
int margin)
column to margin.
Note:setColumnMargin OR
setRowMargin. If you try to use them both, only the
row-margins will be considered.
column - the column to set the margin for.margin - the margin to set.setRowMargin(int, int)public void setMargin(int margin)
margin - the margin to set.setRowMargin(int, int),
setColumnMargin(int, int)public void addTableSelectionListener(CompositeTableSelectionListener listener)
listener so that it will receive
CompositeTableSelectionEvents.
listener - the CompositeTableSelectionListener to
register.CompositeTableSelectionEventpublic void removeSelectionListener(CompositeTableSelectionListener listener)
listener so that it will no longer
receive CompositeTableSelectionEvents.
listener - the CompositeTableSelectionListener to
unregister.public java.util.List getSelectedComposites()
List with all selected composites. A composite is
selected, when the corresponding cell, column or row is selected.
If no Composite is selected, null is returned.
List of the selected composites, or
null when nothing is selected.public void removeSelectedCompositesFromModel()
Composites from the model (if any).
public void setCustomSpanAttributeEditor(CustomAttributeEditor customEditor)
CompositeTableSpan when edited
in the AttributeTable.
customEditor - the CustomAttributeEditor to set.public void setCustomSpanAttributeRenderer(CustomAttributeRenderer customRenderer)
CompositeTableSpan when shown
in the AttributeTable.
customRenderer - the CustomAttributeRenderer to set.public void setColumnHeaderVisualizer(com.tensegrity.composite.defaultimpl.table.AbstractTableHeaderVisualizer vis)
DefaultTableHeaderVisualizer
will be used.
vis - the visualizer to be set for table column-headers.public void setRowHeaderVisualizer(com.tensegrity.composite.defaultimpl.table.AbstractTableHeaderVisualizer vis)
DefaultTableHeaderVisualizer
will be used.
vis - the visualizer to be set for the table row-headers.public void setMinimumCellSize(Size size)
size - the desired minimal cell size.setMaximumCellSize(Size)public void setMaximumCellSize(Size size)
size - the desired maximum cell size.setMinimumCellSize(Size)
public void moveColumn(int oldIndex,
int newIndex)
throws com.tensegrity.composite.defaultimpl.table.CompositeTableException
oldIndex to
newIndex. All columns before and the one at column
newIndex will be shifted left.
This operation fails, if the columns at oldIndex or
newIndex contain composites with spans. In this case
a CompositeTableException will be thrown.
SelectionListener registered with the table,
all received column-row pairs refer to state of the table before all
movements. For example: After moveColumn(1,3) column 1 will
now lay in column 3, column 2 in column 1 and column 3 in column 2. Now
a selection occurs in the first visible column (column 2). The column-number
the SelectionEvent transmits has the value 2.
oldIndex - the index of the column to be moved.newIndex - the index of the column's new location.
com.tensegrity.composite.defaultimpl.table.CompositeTableException - if the given oldIndex or
newIndex are not in the valid range or the columns contain
Composites with set spans.
public void moveRow(int oldIndex,
int newIndex)
throws com.tensegrity.composite.defaultimpl.table.CompositeTableException
oldIndex to
newIndex. All rows top of and the one at index
newIndex will be shifted upwards.
This operation fails, if the rows at oldIndex or
newIndex contain composites with spans. In this case
a CompositeTableException will be thrown.
moveColumn(int, int).
oldIndex - the index of the row to be moved.newIndex - index of the rows new location.
com.tensegrity.composite.defaultimpl.table.CompositeTableException - will be raised, if the
given oldIndex or newIndex are not in the
valid range or the rows contain Composites with set spans.public com.tensegrity.composite.defaultimpl.table.TableElement getTableColumn(int column)
TableElemnt for the given column column.
column - the column to return the associated
TableElement for.
TableElemnt for the given column.public com.tensegrity.composite.defaultimpl.table.TableElement getTableRow(int row)
TableElemnt for the given row row.
row - the row to return the associated TableElement
for.
TableElemnt for the given row.public com.tensegrity.composite.defaultimpl.table.CompositeTableModel getModel()
CompositeTableModel.
CompositeTableModel.
public void setModel(com.tensegrity.composite.defaultimpl.table.CompositeTableModel model)
throws com.tensegrity.composite.defaultimpl.table.CompositeTableException
CompositeTableModelEvents.
model - the model to be used for this table instance.
com.tensegrity.composite.defaultimpl.table.CompositeTableException - if the given model is not suitable.
public Boundary getCellBounds(int col,
int row)
col, row
row.
col - the column of the cell.row - the row of the cell.
col, row
row.public CompositeIterator getCellComposites()
Composites that are added
to the grid of this table.
Composites that are added
to the grid of this table.public boolean isFoldable()
boolean that indicates whether this
CompositeGroup is foldable or not.
CompositeGrouppublic void setFoldable(boolean foldable)
CompositeGroup to the
value given by foldable. If the CompositeGroup
is no longer foldable and it is in a fold state different from
FOLDSTATE_UNFOLDED the fold state will be changed to
FOLDSTATE_UNFOLDED.
foldable - the new fold state for the CompositeGrouppublic int getFoldState()
CompositeGroup. If the
CompositeGroup is not foldable FOLDSTATE_UNFOLDED
is returned.
CompositeGroupFOLDSTATE_FOLDED,
FOLDSTATE_UNFOLDEDpublic void setFoldState(int foldstate)
CompositeGroup to the state of folding given by
state. The supported states of folding are defined through
constants defined in this interface. If the CompositeGroup
is not foldable nothing happens. If the CompositeGroup is
actually in the given state also nothing will happen.
foldstate - the state of folding to set the
CompositeGroup toFOLDSTATE_FOLDED,
FOLDSTATE_UNFOLDEDpublic Size getFoldStateSize(int foldstate)
Size instance that describes the extensions of a
CompositeGroup when it is in a folded state defined by the
constant given by foldstate. These extensions may vary for
different states of folding. The values of the extensions are given in
the coordinate system of the context the CompositeGroup
lies within.
Notice that at the actual state of development only the
FOLDSTATE_FOLDED constant is supported.
foldstate - the constant of the fold state the extensions should be
returned for
CompositeGroup in the actual state of folding
public void setFoldStateSize(int foldstate,
Size size)
CompositeGroup for the fold state
defined by the constant given by foldstate to the extensions
of the Size instance given by size. The values
of the extensions should be given in the coordinate system of the context
the CompositeGroup lies within.
When setting the extensions for the defined fold state and the
CompositeGroup is actually in that state creates a
ResizeEvent if one of the new extensions is different from
the current extensions for that state.
Notice that at the actual state of development only the
FOLDSTATE_FOLDED and FOLDSTATE_UNFOLDED constants are
supported.
foldstate - the constant of the fold state the extensions should be
adjusted forsize - the new extensions for the state of folding defined through
the parameterpublic int getFoldStateButtonCursor()
public void setFoldStateButtonCursor(int cursorID)
cursorID - the cursor that is displayed over the
foldstate buttonpublic java.lang.String getFoldedGeometry()
public void setFoldedGeometry(java.lang.String geometryname)
geometryname - the geometry that is used for the folded
representationpublic java.lang.String getFoldedStyle()
public void setFoldedStyle(java.lang.String stylename)
stylename - the style that is used for the folded
representationpublic void setSelectionMode(int mode)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||