Home | Trees | Indices | Help |
|
---|
|
object --+ | util.IEventListener --+ | terminal.paintable.IPaintable --+ | object --+ | | | terminal.variable_owner.IVariableOwner --+ | object --+ | | | terminal.sizeable.ISizeable --+ | component.IComponent --+ | object --+ | | | event.method_event_source.IMethodEventSource --+ | abstract_component.AbstractComponent --+ | object --+ | | | data.buffered.IBuffered --+ | | | object --+ | | | | | data.validatable.IValidatable --+ | | | data.buffered.IBufferedValidatable --+ | | | object --+ | | | | | data.property.IValueChangeNotifier --+ | | | object --+ | | | | | data.property.IValueChangeListener --+ | | | object --+ | | | | | data.property.IViewer --+ | | | | | data.property.IEditor --+ | | | object --+ | | | | | util.IEventListener --+ | | | | | terminal.paintable.IPaintable --+ | | | | | object --+ | | | | | | | terminal.variable_owner.IVariableOwner --+ | | | | | object --+ | | | | | | | terminal.sizeable.ISizeable --+ | | | | | component.IComponent --+ | | | | | component.IFocusable --+ | | | field.IField --+ | object --+ | | | event.action.IShortcutNotifier --+ | object --+ | | | data.property.IReadOnlyStatusChangeNotifier --+ | object --+ | | | data.property.IReadOnlyStatusChangeListener --+ | abstract_field.AbstractField --+ | object --+ | | | data.container.IContainer --+ | object --+ | | | data.container.IViewer --+ | object --+ | | | data.container.IPropertySetChangeListener --+ | object --+ | | | data.container.IPropertySetChangeNotifier --+ | object --+ | | | data.container.IItemSetChangeNotifier --+ | object --+ | | | data.container.IItemSetChangeListener --+ | abstract_select.AbstractSelect --+ | object --+ | | | data.container.IContainer --+ | | | data.container.IOrdered --+ | | | data.container.ISortable --+ | object --+ | | | event.item_click_event.IItemClickNotifier --+ | | | event.item_click_event.IItemClickSource --+ | object --+ | | | event.item_click_event.IItemClickNotifier --+ | object --+ | | | util.IEventListener --+ | | | terminal.paintable.IPaintable --+ | | | object --+ | | | | | terminal.variable_owner.IVariableOwner --+ | | | object --+ | | | | | terminal.sizeable.ISizeable --+ | | | component.IComponent --+ | | | event.dd.drag_source.IDragSource --+ | object --+ | | | util.IEventListener --+ | | | terminal.paintable.IPaintable --+ | | | object --+ | | | | | terminal.variable_owner.IVariableOwner --+ | | | object --+ | | | | | terminal.sizeable.ISizeable --+ | | | component.IComponent --+ | | | event.dd.drop_target.IDropTarget --+ | Table
Table
is used for representing data or components in a
pageable and selectable table.
Scalability of the Table is largely dictated by the container. A table does not have a limit for the number of items and is just as fast with hundreds of thousands of items as with just a few. The current GWT implementation with scrolling however limits the number of rows to around 500000, depending on the browser and the pixel height of rows.
Components in a Table will not have their caption nor icon rendered.
Version: 1.1.2
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
CLIENT_WIDGET = None hash(x) |
|||
CELL_KEY = 0
|
|||
CELL_HEADER = 1
|
|||
CELL_ICON = 2
|
|||
CELL_ITEMID = 3
|
|||
CELL_GENERATED_ROW = 4
|
|||
CELL_FIRSTCOL = 5
|
|||
ALIGN_LEFT =
Left column alignment. |
|||
ALIGN_CENTER =
Center column alignment. |
|||
ALIGN_RIGHT =
Right column alignment. |
|||
COLUMN_HEADER_MODE_HIDDEN = -1 Column header mode: Column headers are hidden. |
|||
COLUMN_HEADER_MODE_ID = 0 Column header mode: Property ID:s are used as column headers. |
|||
COLUMN_HEADER_MODE_EXPLICIT = 1 Column header mode: Column headers are explicitly specified with |
|||
COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID = 2 Column header mode: Column headers are explicitly specified with |
|||
ROW_HEADER_MODE_HIDDEN = -1 Row caption mode: The row headers are hidden. |
|||
ROW_HEADER_MODE_ID = 0 Row caption mode: Items Id-objects toString is used as row caption. |
|||
ROW_HEADER_MODE_ITEM = 1 Row caption mode: Item-objects toString is used as row caption. |
|||
ROW_HEADER_MODE_INDEX = 2 Row caption mode: Index of the item is used as item caption. |
|||
ROW_HEADER_MODE_EXPLICIT = 4 Row caption mode: Item captions are explicitly specified. |
|||
ROW_HEADER_MODE_PROPERTY = 6 Row caption mode: Item captions are read from property specified |
|||
ROW_HEADER_MODE_ICON_ONLY = 5 Row caption mode: Only icons are shown, the captions are hidden. |
|||
ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID = 3 Row caption mode: Item captions are explicitly specified, but if |
|||
_CACHE_RATE_DEFAULT = 2 The default rate that table caches rows for smooth scrolling. |
|||
_ROW_HEADER_COLUMN_KEY =
|
|||
_ROW_HEADER_FAKE_PROPERTY_ID = object()
|
|||
Inherited from Inherited from Inherited from |
|
|||
_columnCollapsingAllowed True if column collapsing is allowed. |
|||
_columnReorderingAllowed True if reordering of columns is allowed on the client side. |
|||
_columnIdMap Keymapper for column ids. |
|||
_visibleColumns Holds visible column propertyIds - in order. |
|||
_collapsedColumns Holds propertyIds of currently collapsed columns. |
|||
_columnHeaders Holds headers for visible columns (by propertyId). |
|||
_columnFooters Holds footers for visible columns (by propertyId). |
|||
_columnIcons Holds icons for visible columns (by propertyId). |
|||
_columnAlignments Holds alignments for visible columns (by propertyId). |
|||
_columnWidths Holds column widths in pixels (Integer) or expand ratios |
|||
_columnGenerators Holds column generators |
|||
_pageLength Holds value of property pageLength. |
|||
_currentPageFirstItemId Id the first item on the current page. |
|||
_currentPageFirstItemIndex Index of the first item on the current page. |
|||
_selectable Holds value of property selectable. |
|||
_columnHeaderMode Holds value of property columnHeaderMode. |
|||
_columnFootersVisible Should the Table footer be visible? |
|||
_rowCaptionsAreHidden True iff the row captions are hidden. |
|||
_pageBuffer Page contents buffer used in buffered mode. |
|||
_listenedProperties Set of properties listened - the list is kept to release |
|||
_visibleComponents Set of visible components - the is used for needsRepaint |
|||
_actionHandlers List of action handlers. |
|||
_actionMapper Action mapper. |
|||
_fieldFactory Table cell editor factory. |
|||
_editable Is table editable. |
|||
_sortAscending Current sorting direction. |
|||
_sortContainerPropertyId Currently table is sorted on this propertyId. |
|||
_sortDisabled Is table sorting disabled alltogether; even if some of |
|||
_reqRowsToPaint Number of rows explicitly requested by the client to be painted |
|||
_reqFirstRowToPaint Index of the first rows explicitly requested by the client to be |
|||
_cellStyleGenerator Table cell specific style generator |
|||
_itemDescriptionGenerator Table cell specific tooltip generator |
|||
alwaysRecalculateColumnWidths EXPERIMENTAL feature: will tell the client to re-calculate column |
|||
Inherited from Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
Creates a new table with caption and connect it to a IContainer.
|
Gets the array of visible column id:s, including generated columns. The columns are show in the order of their appearance in this array.
|
Sets the array of visible column property ids. The columns are show in the order of their appearance in this array.
|
Gets the headers of the columns. The headers match the property id:s given my the set visible column headers. The table must be set in either COLUMN_HEADER_MODE_EXPLICIT or COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the headers. In the defaults mode any nulls in the headers array are replaced with id.__str__.
|
Sets the headers of the columns. The headers match the property id:s given my the set visible column headers. The table must be set in either COLUMN_HEADER_MODE_EXPLICIT or COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the headers. In the defaults mode any nulls in the headers array are replaced with id.toString() outputs when rendering.
|
Gets the icons of the columns. The icons in headers match the property ids given my the set visible column headers. The table must be set in either COLUMN_HEADER_MODE_EXPLICIT or COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the headers with icons.
|
Sets the icons of the columns. The icons in headers match the property id:s given my the set visible column headers. The table must be set in either COLUMN_HEADER_MODE_EXPLICIT or COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the headers with icons.
|
Gets the array of column alignments. The items in the array must match the properties identified by getVisibleColumns. The possible values for the alignments include:
The alignments default to ALIGN_LEFT: any null values are rendered as align lefts.
|
Sets the column alignments. The items in the array must match the properties identified by getVisibleColumns. The possible values for the alignments include:
The alignments default to ALIGN_LEFT
|
Sets columns width (in pixels). Theme may not necessary respect very small or very big values. Setting width to -1 (default) means that theme will make decision of width. Column can either have a fixed width or expand ratio. The latter one set is used. See @link setColumnExpandRatio.
|
Sets the column expand ratio for given column. Expand ratios can be defined to customize the way how excess space is divided among columns. Table can have excess space if it has its width defined and there is horizontally more space than columns consume naturally. Excess space is the space that is not used by columns with explicit width (see setColumnWidth) or with natural width (no width nor expand ratio). By default (without expand ratios) the excess space is divided proportionally to columns natural widths. Only expand ratios of visible columns are used in final calculations. Column can either have a fixed width or expand ratio. The latter one set is used. A column with expand ratio is considered to be minimum width by default (if no excess space exists). The minimum width is defined by terminal implementation. If terminal implementation supports re-sizable columns the column becomes fixed width column if users resizes the column.
|
Gets the pixel width of column
|
Gets the page length. Setting page length 0 disables paging.
|
Sets the page length. Setting page length 0 disables paging. The page length defaults to 15. If Table has width set (setWidth ) the client side may update the page length automatically the correct value.
|
This method adjusts a possible caching mechanism of table implementation. Table component may fetch and render some rows outside visible area. With complex tables (for example containing layouts and components), the client side may become unresponsive. Setting the value lower, UI will become more responsive. With higher values scrolling in client will hit server less frequently. The amount of cached rows will be cacheRate multiplied with pageLength setPageLength both below and above visible area.
|
See Also: setCacheRate |
Getter for property currentPageFirstItem.
|
Setter for property currentPageFirstItemId.
|
Gets the icon Resource for the specified column.
|
Sets the icon Resource for the specified column. Throws ValueError if the specified column is not visible.
|
Gets the header for the specified column.
|
Sets the column header for the specified column;
|
Gets the specified column's alignment.
|
Sets the specified column's alignment. Throws IllegalArgumentException if the alignment is not one of the following: ALIGN_LEFT, ALIGN_CENTER or ALIGN_RIGHT
|
Checks if the specified column is collapsed.
|
Sets whether the specified column is collapsed or not.
|
Checks if column collapsing is allowed.
|
Sets whether column collapsing is allowed or not.
|
Checks if column reordering is allowed.
|
Sets whether column reordering is allowed or not.
|
Getter for property currentPageFirstItem.
|
Setter for property currentPageFirstItem.
|
Getter for property pageBuffering.
Deprecated: functionality is not needed in ajax rendering model |
Setter for property pageBuffering.
Deprecated: functionality is not needed in ajax rendering model |
Getter for property selectable. The table is not selectable by default.
|
Setter for property selectable. The table is not selectable by default.
|
Getter for property columnHeaderMode.
|
Setter for property columnHeaderMode.
|
Refreshes the rows in the internal cache. Only if resetPageBuffer is called before this then all values are guaranteed to be recreated. |
Requests that the Table should be repainted as soon as possible. Note that a
|
|
Render rows with index "firstIndex" to "firstIndex+rows-1" to a new buffer. Reuses values from the current page buffer if the rows are found there. |
|
Helper method to remove listeners and maintain correct component hierarchy. Detaches properties and components if those are no more rendered in client.
|
This method cleans up a IComponent that has been generated when Table is in editable mode. The component needs to be detached from its parent and if it is a field, it needs to be detached from its property data source in order to allow garbage collection to take care of removing the unused component from memory. Override this method and
See Also: getPropertyValue |
Refreshes the current page contents. Deprecated: should not need to be used |
Sets the row header mode. The mode can be one of the following ones:
The default value is ROW_HEADER_MODE_HIDDEN
|
Gets the row header mode.
See Also: setRowHeaderMode |
Adds the new row to table and fill the visible cells (except generated columns) with given values.
|
Discards and recreates the internal row cache. Call this if you make changes that affect the rows but the information about the changes are not automatically propagated to the Table. Do not call this e.g. if you have updated the data model through a Property. These types of changes are automatically propagated to the Table. A typical case when this is needed is if you update a generator (e.g. CellStyleGenerator) and want to ensure that the rows are redrawn with new styles. Note that calling this method is not cheap so avoid calling it unnecessarily. |
Sets the IContainer that serves as the data source of the viewer. As a side-effect the fields value (selection) is set to null due old selection not necessary exists in new IContainer.
|
Handles selection if selection is a multiselection
|
Invoked when the value of a variable has changed.
See Also:
|
Go to mode where content updates are not done. This is due we want to bypass expensive content for some reason (like when we know we may have other content changes on their way).
|
Go to mode where content content refreshing has effect.
|
Paints the content of this component.
|
Subclass and override this to enable partial row updates and additions, which bypass the normal caching mechanism. This is useful for e.g. TreeTable.
|
Subclass and override this to enable partial row additions, bypassing the normal caching mechanism. This is useful for e.g. TreeTable, where expanding a node should only fetch and add the items inside of that node.
|
Subclass and override this to enable partial row additions, bypassing the normal caching mechanism. This is useful for e.g. TreeTable, where expanding a node should only fetch and add the items inside of that node.
|
Subclass and override this to enable removing of rows, bypassing the normal caching and lazy loading mechanism. This is useful for e.g. TreeTable, when you need to hide certain rows as a node is collapsed. This should return true if the rows pointed to by getFirstAddedItemIndex and getAddedRowCount should be hidden instead of added.
|
Subclass and override this to enable partial row updates, bypassing the normal caching and lazy loading mechanism. This is useful for updating the state of certain rows, e.g. in the TreeTable the collapsed state of a single node is updated using this mechanism.
|
Subclass and override this to enable partial row updates, bypassing the normal caching and lazy loading mechanism. This is useful for updating the state of certain rows, e.g. in the TreeTable the collapsed state of a single node is updated using this mechanism. @return: the number of rows to update, starting at the index returned by L{getFirstUpdatedItemIndex}. For plain table it is always 0. |
Resets and paints "to be painted next" variables. Also reset pageBuffer |
Gets the cached visible table contents.
|
Gets the value of property. By default if the table is editable the fieldFactory is used to create editors for table cells. Otherwise formatPropertyValue is used to format the value representation.
See Also: setTableFieldFactory |
Formats table cell property values. By default the property.__str__ and return a empty string for null properties.
|
Registers a new action handler for this container See Also:
|
Removes a previously registered action handler for the contents of this container. See Also:
|
Notifies this listener that the Property's value has changed. Also listens changes in rendered items to refresh content area.
|
Clears the current page buffer. Call this before refreshRenderedCells to ensure that all content is updated from the properties. |
Notifies the component that it is connected to an application.
See Also: IComponent.attach |
Notifies the component that it is detached from the application
See Also: IComponent.detach |
Removes all Items from the IContainer.
See Also: IContainer.removeAllItems |
Removes the Item identified by
See Also: IContainer.removeItem |
Removes a Property specified by the given Property ID from the IContainer.
See Also: IContainer.removeContainerProperty |
Adds a new property to the table and show it as a visible column.
See Also: IContainer.addContainerProperty |
Adds a generated column to the Table. A generated column is a column that exists only in the Table, not as a property in the underlying IContainer. It shows up just as a regular column. A generated column will override a property with the same id, so that the generated column is shown instead of the column representing the property. Note that getContainerProperty() will still get the real property. Table will not listen to value change events from properties overridden by generated columns. If the content of your generated column depends on properties that are not directly visible in the table, attach value change listener to update the content on all depended properties. Otherwise your UI might not get updated as expected. Also note that getVisibleColumns() will return the generated columns, while getContainerPropertyIds() will not.
|
Returns the IColumnGenerator used to generate the given column.
|
Removes a generated column previously added with addGeneratedColumn.
|
Returns item identifiers of the items which are currently rendered on the client. Note, that some due to historical reasons the name of the method is bit misleading. Some items may be partly or totally out of the viewport of the table's scrollable area. Actully detecting rows which can be actually seen by the end user may be problematic due to the client server architecture. Using getCurrentPageFirstItemId combined with getPageLength may produce good enough estimates in some situations. See Also:
|
IContainer datasource item set change. Table must flush its buffers on change.
See Also:
|
IContainer datasource property set change. Table must flush its buffers on change.
See Also:
|
Adding new items is not supported.
See Also:
|
Gets the ID of the Item following the Item that corresponds to itemId.
See Also: IOrdered.nextItemId |
Gets the ID of the Item preceding the Item that corresponds to the itemId.
See Also: IOrdered.prevItemId |
Gets the ID of the first Item in the IContainer.
See Also: IOrdered.firstItemId |
Gets the ID of the last Item in the IContainer.
See Also: IOrdered.lastItemId |
Tests if the Item corresponding to the given Item ID is the first Item in the IContainer.
See Also: IOrdered.isFirstId |
Tests if the Item corresponding to the given Item ID is the last Item in the IContainer.
See Also: IOrdered.isLastId |
Adds new item after the given item.
See Also: IOrdered.addItemAfter |
Sets the TableFieldFactory that is used to create editor for table cells. The TableFieldFactory is only used if the Table is editable. By default the DefaultFieldFactory is used.
|
Gets the TableFieldFactory that is used to create editor for table cells. The IFieldFactory is only used if the Table is editable.
See Also: isEditable |
Gets the IFieldFactory that is used to create editor for table cells. The IFieldFactory is only used if the Table is editable.
See Also: isEditable Deprecated: use getTableFieldFactory instead |
Sets the IFieldFactory that is used to create editor for table cells. The IFieldFactory is only used if the Table is editable. By default the BaseFieldFactory is used.
Deprecated: use setTableFieldFactory() instead |
Is table editable. If table is editable a editor of type IField is created for each table cell. The assigned IFieldFactory is used to create the instances. To provide custom editors for table cells create a class implementing the IFieldFactory interface, and assign it to table, and set the editable property to true.
|
Sets the editable property. If table is editable a editor of type IField is created for each table cell. The assigned IFieldFactory is used to create the instances. To provide custom editors for table cells create a class implementins the IFieldFactory interface, and assign it to table, and set the editable property to true.
|
Sorts the table.
See Also: ISortable.sort |
Gets the container property IDs, which can be used to sort the item.
|
Gets the currently sorted column property ID.
|
Sets the currently sorted column property id. With doSort flag actual sorting may be bypassed.
|
Is the table currently sorted in ascending order.
|
Sets the table in ascending order. With doSort flag actual sort can be bypassed.
|
Is sorting disabled altogether. True iff no sortable columns are given even in the case where data source would support this.
|
Disables the sorting altogether. To disable sorting altogether, set to true. In this case no sortable columns are given even in the case where datasource would support this.
|
Table does not support lazy options loading mode. Setting this true will throw NotImplementedError. See Also:
|
Set cell style generator for Table.
|
Adds a header click/footer click/column resize/column reorder listener which handles the click events when the user clicks on a column header cell in the Table. The listener will receive events which contain information about which column was clicked and some details about the mouse event.
|
|
Removes a listener from the Table.
|
|
Enables or disables the component. The user can not interact disabled components, which are shown with a style that indicates the status, usually shaded in light gray color. Components are enabled by default. Children of a disabled component are automatically disabled; if a child component is explicitly set as disabled, changes in the disabled status of its parents do not change its status: enabled = new Button("Enabled") enabled.setEnabled(True) # the default layout.addComponent(enabled) disabled = Button("Disabled") disabled.setEnabled(False) layout.addComponent(disabled) This method will trigger a RepaintRequestEvent for the component and, if it is a
|
Sets the drag start mode of the Table. Drag start mode controls how Table behaves as a drag source. |
|
IDragSource may convert data added by client side component to meaningful values for server side developer or add other data based on it. For example Tree converts item identifiers to generated string keys
for the client side. Muntjac developer don't and can't know anything
about these generated keys, only about item identifiers. When tree node
is dragged client puts that key to
|
|
Called before the DragAndDropEvent is passed to
|
Sets the behavior of how the multi-select mode should behave when the table is both selectable and in multi-select mode. Note, that on some clients the mode may not be respected. E.g. on touch based devices CTRL/SHIFT base selection method is invalid, so touch based browsers always use the MultiSelectMode.SIMPLE.
|
Returns the select mode in which multi-select is used.
|
Gets the footer caption beneath the rows
|
Sets the column footer caption. The column footer caption is the text displayed beneath the column if footers have been set visible.
|
Sets the footer visible in the bottom of the table. The footer can be used to add column related data like sums to the bottom of the Table using setColumnFooter.
|
Set the item description generator which generates tooltips for cells and rows in the Table
|
Is the footer currently visible?
|
Assigns a row generator to the table. The row generator will be able to replace rows in the table when it is rendered.
|
|
ALIGN_LEFTLeft column alignment. <b>This is the default behaviour.</b>
|
ROW_HEADER_MODE_INDEXRow caption mode: Index of the item is used as item caption. The
|
|
_pageLengthHolds value of property pageLength. 0 disables paging. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Aug 31 14:06:41 2013 | http://epydoc.sourceforge.net |