|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.terminal.Identifiable
com.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.ui.AbstractField
com.itmill.toolkit.ui.Select
com.itmill.toolkit.ui.Table
public class Table
TableComponent is used for representing data or components in
pageable and selectable table.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.itmill.toolkit.ui.Select |
|---|
Select.OptionsStream |
| Nested classes/interfaces inherited from class com.itmill.toolkit.ui.AbstractField |
|---|
AbstractField.ReadOnlyStatusChangeEvent |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Field |
|---|
Field.ValueChangeEvent |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Component |
|---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Buffered |
|---|
Buffered.SourceException |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.data.Property |
|---|
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
| Field Summary | |
|---|---|
static String |
ALIGN_CENTER
Center column alignment. |
static String |
ALIGN_LEFT
Left column alignment. |
static String |
ALIGN_RIGHT
Right column alignment. |
static int |
COLUMN_HEADER_MODE_EXPLICIT
Column header mode: Column headers are explicitly specified with setColumnHeaders. |
static int |
COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID
Column header mode: Column headers are explicitly specified with setColumnHeaders |
static int |
COLUMN_HEADER_MODE_HIDDEN
Column header mode: Column headers are hidden. |
static int |
COLUMN_HEADER_MODE_ID
Column header mode: Property ID:s are used as column headers. |
static int |
ROW_HEADER_MODE_EXPLICIT
Row caption mode: Item captions are explicitly specified. |
static int |
ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID
Row caption mode: Item captions are explicitly specified, but if the caption is missing, the item id objects toString() is used
instead. |
static int |
ROW_HEADER_MODE_HIDDEN
Row caption mode: The row headers are hidden. |
static int |
ROW_HEADER_MODE_ICON_ONLY
Row caption mode: Only icons are shown, the captions are hidden. |
static int |
ROW_HEADER_MODE_ID
Row caption mode: Items Id-objects toString is used as row caption. |
static int |
ROW_HEADER_MODE_INDEX
Row caption mode: Index of the item is used as item caption. |
static int |
ROW_HEADER_MODE_ITEM
Row caption mode: Item-objects toString is used as row caption. |
static int |
ROW_HEADER_MODE_PROPERTY
Row caption mode: Item captions are read from property specified with setItemCaptionPropertyId. |
| Fields inherited from class com.itmill.toolkit.ui.Select |
|---|
ITEM_CAPTION_MODE_EXPLICIT, ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID, ITEM_CAPTION_MODE_ICON_ONLY, ITEM_CAPTION_MODE_ID, ITEM_CAPTION_MODE_INDEX, ITEM_CAPTION_MODE_ITEM, ITEM_CAPTION_MODE_PROPERTY, itemIdMapper, items |
| Fields inherited from interface com.itmill.toolkit.terminal.Sizeable |
|---|
UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNITS_ROWS |
| Constructor Summary | |
|---|---|
Table()
Creates a new empty table. |
|
Table(String caption)
Creates a new empty table with caption. |
|
Table(String caption,
Container dataSource)
Creates a new table with caption and connect it to a Container. |
|
| Method Summary | |
|---|---|
void |
addActionHandler(Action.Handler actionHandler)
Registers a new action handler for this container |
boolean |
addContainerProperty(Object propertyId,
Class type,
Object defaultValue)
Adds a new property to the table and show it as a visible column. |
boolean |
addContainerProperty(Object propertyId,
Class type,
Object defaultValue,
String columnHeader,
Resource columnIcon,
String columnAlignment)
Adds a new property to the table and show it as a visible column. |
Object |
addItem(Object[] cells,
Object itemId)
Adds the new row to table and fill the visible cells with given values. |
Object |
addItemAfter(Object previousItemId)
Adds new item after the given item. |
Item |
addItemAfter(Object previousItemId,
Object newItemId)
Adds new item after the given item. |
void |
attach()
Notifies the component that it is connected to an application. |
void |
changeVariables(Object source,
Map variables)
Invoked when the value of a variable has changed. |
void |
containerItemSetChange(Container.ItemSetChangeEvent event)
Container datasource item set change. |
void |
containerPropertySetChange(Container.PropertySetChangeEvent event)
Container datasource property set change. |
void |
detach()
Notifies the component that it is detached from the application |
Object |
firstItemId()
Gets the ID of the first Item in the Container. |
void |
focus()
Focusing to this component is not supported. |
protected String |
formatPropertyValue(Object rowId,
Object colId,
Property property)
Formats table cell property values. |
String |
getColumnAlignment(Object propertyId)
Gets the specified column's alignment. |
String[] |
getColumnAlignments()
Gets the array of column alignments. |
String |
getColumnHeader(Object propertyId)
Gets the header for the specified column. |
int |
getColumnHeaderMode()
Getter for property columnHeaderMode. |
String[] |
getColumnHeaders()
Gets the headers of the columns. |
Resource |
getColumnIcon(Object propertyId)
Gets the icon Resource for the specified column. |
Resource[] |
getColumnIcons()
Gets the icons of the columns. |
String |
getColumnStyle(Object propertyId)
Return the stylename for a column. |
int |
getColumnWidth(Object propertyId)
Gets the width of column |
Object |
getCurrentPageFirstItemId()
Getter for property currentPageFirstItem. |
int |
getCurrentPageFirstItemIndex()
Getter for property currentPageFirstItem. |
FieldFactory |
getFieldFactory()
Gets the FieldFactory that is used to create editor for table cells. |
int |
getHeight()
Gets the height in pixels. |
int |
getHeightUnits()
Gets the height property units. |
Object |
getItemStylePropertyId()
Gets the property id to used for styling rows. |
int |
getPageLength()
Gets the page length. |
protected Object |
getPropertyValue(Object rowId,
Object colId,
Property property)
Gets the value of property. |
int |
getRowHeaderMode()
Gets the row header mode. |
Collection |
getSortableContainerPropertyIds()
Gets the container property IDs, which can be used to sort the item. |
Object |
getSortContainerPropertyId()
Gets the currently sorted column property ID. |
String |
getTag()
Gets the UIDL tag corresponding to component. |
int |
getWidth()
Gets the width in pixels. |
int |
getWidthUnits()
Gets the width property units. |
Object[] |
getVisibleColumns()
Gets the array of visible column property id:s. |
Collection |
getVisibleItemIds()
Returns the list of items on the current page |
boolean |
isColumnCollapsed(Object propertyId)
Checks if the specified column is collapsed. |
boolean |
isColumnCollapsingAllowed()
Checks if column collapsing is allowed. |
boolean |
isColumnReorderingAllowed()
Checks if column reordering is allowed. |
boolean |
isEditable()
Is table editable. |
boolean |
isFirstId(Object itemId)
Tests if the Item corresponding to the given Item ID is the first Item in the Container. |
boolean |
isLastId(Object itemId)
Tests if the Item corresponding to the given Item ID is the last Item in the Container. |
boolean |
isPageBufferingEnabled()
Getter for property pageBuffering. |
boolean |
isSelectable()
Getter for property selectable. |
boolean |
isSortAscending()
Is the table currently sorted in ascending order. |
boolean |
isSortDisabled()
Is sorting disabled altogether. |
Object |
lastItemId()
Gets the ID of the last Item in the Container. |
Object |
nextItemId(Object itemId)
Gets the ID of the Item following the Item that corresponds to itemId. |
void |
paintContent(PaintTarget target)
Paints the content of this component. |
Object |
prevItemId(Object itemId)
Gets the ID of the Item preceding the Item that corresponds to the itemId. |
void |
refreshCurrentPage()
Refreshes the current page contents. |
void |
removeActionHandler(Action.Handler actionHandler)
Removes a previously registered action handler for the contents of this container. |
boolean |
removeAllItems()
Removes all Items from the Container. |
boolean |
removeContainerProperty(Object propertyId)
Removes a Property specified by the given Property ID from the Container. |
boolean |
removeItem(Object itemId)
Removes the Item identified by ItemId from the Container. |
void |
setColumnAlignment(Object propertyId,
String alignment)
Sets the specified column's alignment. |
void |
setColumnAlignments(String[] columnAlignments)
Sets the column alignments. |
void |
setColumnCollapsed(Object propertyId,
boolean collapsed)
Sets whether the specified column is collapsed or not. |
void |
setColumnCollapsingAllowed(boolean collapsingAllowed)
Sets whether column collapsing is allowed or not. |
void |
setColumnHeader(Object propertyId,
String header)
Sets the column header for the specified column; |
void |
setColumnHeaderMode(int columnHeaderMode)
Setter for property columnHeaderMode. |
void |
setColumnHeaders(String[] columnHeaders)
Sets the headers of the columns. |
void |
setColumnIcon(Object propertyId,
Resource icon)
Sets the icon Resource for the specified column. |
void |
setColumnIcons(Resource[] columnIcons)
Sets the icons of the columns. |
void |
setColumnReorderingAllowed(boolean reorderingAllowed)
Sets whether column reordering is allowed or not. |
void |
setColumnStyle(Object propertyId,
String style)
Set the stylename for a column. |
void |
setColumnWidth(Object columnId,
int width)
Sets columns width (in pixels). |
void |
setContainerDataSource(Container newDataSource)
Sets the Container that serves as the data source of the viewer. |
void |
setCurrentPageFirstItemId(Object currentPageFirstItemId)
Setter for property currentPageFirstItemId. |
void |
setCurrentPageFirstItemIndex(int newIndex)
Setter for property currentPageFirstItem. |
void |
setEditable(boolean editable)
Sets the editable property. |
void |
setFieldFactory(FieldFactory fieldFactory)
Sets the FieldFactory that is used to create editor for table cells. |
void |
setHeight(int height)
Sets the height in pixels. |
void |
setHeightUnits(int units)
Sets the height units. |
void |
setItemStylePropertyId(Object propertyId)
Sets the property id to use for styling rows. |
void |
setLazyLoading(boolean useLazyLoading)
Table does not support lazy options loading mode. |
void |
setNewItemsAllowed(boolean allowNewOptions)
Adding new items is not supported. |
void |
setPageBufferingEnabled(boolean pageBuffering)
Setter for property pageBuffering. |
void |
setPageLength(int pageLength)
Sets the page length. |
void |
setRowHeaderMode(int mode)
Sets the row header mode. |
void |
setSelectable(boolean selectable)
Setter for property selectable. |
void |
setSortAscending(boolean ascending)
Sets the table in ascending order. |
void |
setSortContainerPropertyId(Object propertyId)
Sets the currently sorted column property id. |
void |
setSortDisabled(boolean sortDisabled)
Disables the sorting altogether. |
void |
setWidth(int width)
Sets the width in pixels. |
void |
setWidthUnits(int units)
Sets the width units. |
void |
setVisibleColumns(Object[] visibleColumns)
Sets the array of visible column property id:s. |
void |
sort()
Sorts the table by currently selected sorting column. |
void |
sort(Object[] propertyId,
boolean[] ascending)
Sorts the table. |
void |
valueChange(Property.ValueChangeEvent event)
Notifies this listener that the Property's value has changed. |
| Methods inherited from class com.itmill.toolkit.ui.AbstractField |
|---|
addListener, addListener, addValidator, commit, constructField, discard, finalize, fireReadOnlyStatusChange, fireValueChange, getErrorMessage, getFocusableId, getPropertyDataSource, getTabIndex, getValidators, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isReadThrough, isRequired, isValid, isWriteThrough, removeListener, removeListener, removeValidator, setInternalValue, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setReadThrough, setRequired, setTabIndex, setWriteThrough, toString, validate |
| Methods inherited from class com.itmill.toolkit.ui.AbstractComponent |
|---|
addListener, addListener, addListener, addListener, childRequestedRepaint, dependsOn, fireComponentErrorEvent, fireComponentEvent, fireEvent, getApplication, getCaption, getComponentError, getData, getDescription, getDirectDependencies, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isImmediate, isVisible, paint, removeDirectDependency, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDescription, setEnabled, setIcon, setImmediate, setLocale, setParent, setStyle, setVisible |
| Methods inherited from class com.itmill.toolkit.terminal.Identifiable |
|---|
getDebugId, getUIID, setDebugId, setUIID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.itmill.toolkit.ui.Field |
|---|
getDescription, setCaption, setDescription |
| Methods inherited from interface com.itmill.toolkit.ui.Component |
|---|
addListener, childRequestedRepaint, getApplication, getCaption, getIcon, getLocale, getParent, getStyle, getWindow, isEnabled, isVisible, removeListener, setEnabled, setParent, setStyle, setVisible |
| Methods inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
addListener, paint, removeListener, requestRepaint, requestRepaintRequests |
| Methods inherited from interface com.itmill.toolkit.terminal.VariableOwner |
|---|
dependsOn, getDirectDependencies, isImmediate, removeDirectDependency |
| Field Detail |
|---|
public static final String ALIGN_LEFT
public static final String ALIGN_CENTER
public static final String ALIGN_RIGHT
public static final int COLUMN_HEADER_MODE_HIDDEN
public static final int COLUMN_HEADER_MODE_ID
public static final int COLUMN_HEADER_MODE_EXPLICIT
setColumnHeaders.
public static final int COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID
setColumnHeaders
public static final int ROW_HEADER_MODE_HIDDEN
public static final int ROW_HEADER_MODE_ID
public static final int ROW_HEADER_MODE_ITEM
public static final int ROW_HEADER_MODE_INDEX
public static final int ROW_HEADER_MODE_EXPLICIT
public static final int ROW_HEADER_MODE_PROPERTY
setItemCaptionPropertyId.
public static final int ROW_HEADER_MODE_ICON_ONLY
public static final int ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID
toString() is used
instead.
| Constructor Detail |
|---|
public Table()
public Table(String caption)
caption -
public Table(String caption,
Container dataSource)
caption - dataSource - | Method Detail |
|---|
public Object[] getVisibleColumns()
The columns are show in the order of their appearance in this array.
public void setVisibleColumns(Object[] visibleColumns)
The columns are show in the order of their appearance in this array.
visibleColumns - the Array of shown property id:s.public String[] getColumnHeaders()
The headers match the property id:s given my the set visible column
headers. The table must be set in either
ROW_HEADER_MODE_EXPLICIT or
ROW_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.
public void setColumnHeaders(String[] columnHeaders)
The headers match the property id:s given my the set visible column
headers. The table must be set in either
ROW_HEADER_MODE_EXPLICIT or
ROW_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.
columnHeaders - the Array of column headers that match the
getVisibleColumns method.public Resource[] getColumnIcons()
The icons in headers match the property id:s given my the set visible
column headers. The table must be set in either
ROW_HEADER_MODE_EXPLICIT or
ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the
headers with icons.
getVisibleColumns.public void setColumnIcons(Resource[] columnIcons)
The icons in headers match the property id:s given my the set visible
column headers. The table must be set in either
ROW_HEADER_MODE_EXPLICIT or
ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the
headers with icons.
columnIcons - the Array of icons that match the
getVisibleColumns.public String[] getColumnAlignments()
The items in the array must match the properties identified by
getVisibleColumns(). The possible values for the
alignments include:
ALIGN_LEFT: Left alignmentALIGN_CENTER: CenteredALIGN_RIGHT: Right alignmentALIGN_LEFT: any null values are
rendered as align lefts.
public void setColumnAlignments(String[] columnAlignments)
The items in the array must match the properties identified by
getVisibleColumns(). The possible values for the
alignments include:
ALIGN_LEFT: Left alignmentALIGN_CENTER: CenteredALIGN_RIGHT: Right alignmentALIGN_LEFT
columnAlignments - the Column alignments array.
public void setColumnWidth(Object columnId,
int width)
columnId - column property idwidth - width to be reserved for column contentpublic int getColumnWidth(Object propertyId)
propertyId -
public int getPageLength()
Setting page length 0 disables paging.
public void setPageLength(int pageLength)
Setting page length 0 disables paging. The page length defaults to 15.
pageLength - the Length of one page.public Object getCurrentPageFirstItemId()
public void setCurrentPageFirstItemId(Object currentPageFirstItemId)
currentPageFirstItemId - the New value of property currentPageFirstItemId.public Resource getColumnIcon(Object propertyId)
propertyId - the propertyId identifying the column.
public void setColumnIcon(Object propertyId,
Resource icon)
Throws IllegalArgumentException if the specified column is not visible.
propertyId - the propertyId identifying the column.icon - the icon Resource to set.public String getColumnHeader(Object propertyId)
propertyId - the propertyId identifying the column.
public void setColumnHeader(Object propertyId,
String header)
propertyId - the propertyId identifying the column.header - the header to set.public String getColumnAlignment(Object propertyId)
propertyId - the propertyID identifying the column.
public void setColumnAlignment(Object propertyId,
String alignment)
Throws IllegalArgumentException if the alignment is not one of the following: ALIGN_LEFT, ALIGN_CENTER or ALIGN_RIGHT
propertyId - the propertyID identifying the column.alignment - the desired alignment.public boolean isColumnCollapsed(Object propertyId)
propertyId - the propertyID identifying the column.
public void setColumnCollapsed(Object propertyId,
boolean collapsed)
throws IllegalAccessException
propertyId - the propertyID identifying the column.collapsed - the desired collapsedness.
IllegalAccessExceptionpublic boolean isColumnCollapsingAllowed()
public void setColumnCollapsingAllowed(boolean collapsingAllowed)
collapsingAllowed - specifies whether column collapsing is allowed.public boolean isColumnReorderingAllowed()
public void setColumnReorderingAllowed(boolean reorderingAllowed)
reorderingAllowed - specifies whether column reordering is allowed.public int getCurrentPageFirstItemIndex()
public void setCurrentPageFirstItemIndex(int newIndex)
newIndex - the New value of property currentPageFirstItem.public boolean isPageBufferingEnabled()
public void setPageBufferingEnabled(boolean pageBuffering)
pageBuffering - the New value of property pageBuffering.public boolean isSelectable()
The table is not selectable by default.
public void setSelectable(boolean selectable)
The table is not selectable by default.
selectable - the New value of property selectable.public int getColumnHeaderMode()
public void setColumnHeaderMode(int columnHeaderMode)
columnHeaderMode - the New value of property columnHeaderMode.public void refreshCurrentPage()
public void setRowHeaderMode(int mode)
The mode can be one of the following ones:
ROW_HEADER_MODE_HIDDEN: The row captions are hidden.
ROW_HEADER_MODE_ID: Items Id-objects
toString() is used as row caption.
ROW_HEADER_MODE_ITEM: Item-objects
toString() is used as row caption.
ROW_HEADER_MODE_PROPERTY: Property set with
setItemCaptionPropertyId() is used as row header.
ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID: Items
Id-objects toString() is used as row header. If caption is
explicitly specified, it overrides the id-caption.
ROW_HEADER_MODE_EXPLICIT: The row headers must be
explicitly specified.ROW_HEADER_MODE_INDEX: The index of the item is used
as row caption. The index mode can only be used with the containers
implementing Container.Indexed interface.ROW_HEADER_MODE_HIDDEN
mode - the One of the modes listed above.public int getRowHeaderMode()
setRowHeaderMode(int)public void setItemStylePropertyId(Object propertyId)
propertyId - Id of the property to use for row stylingpublic Object getItemStylePropertyId()
public Object addItem(Object[] cells,
Object itemId)
throws UnsupportedOperationException
cells - the Object array that is used for filling the visible cells
new row. The types must be settable to visible column property
types.itemId - the Id the new row. If null, a new id is automatically
assigned. If given, the table can't already have a item with
given id.
UnsupportedOperationExceptionpublic void setContainerDataSource(Container newDataSource)
setContainerDataSource in interface Container.ViewersetContainerDataSource in class SelectnewDataSource - the new data source.Container.Viewer.setContainerDataSource(Container)
public void changeVariables(Object source,
Map variables)
changeVariables in interface VariableOwnerchangeVariables in class Selectsource - the Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables - the Mapping from variable names to new variable values.Select.changeVariables(java.lang.Object,
java.util.Map)
public void paintContent(PaintTarget target)
throws PaintException
paintContent in class Selecttarget - the Paint target.
PaintException - if the paint operation failed.public String getTag()
getTag in class Select
protected Object getPropertyValue(Object rowId,
Object colId,
Property property)
rowId - the Id of the row (same as item Id).colId - the Id of the column.property - the Property to be presented.
setFieldFactory(FieldFactory)
protected String formatPropertyValue(Object rowId,
Object colId,
Property property)
rowId - the Id of the row (same as item Id).colId - the Id of the column.property - the Property to be formatted.
public void addActionHandler(Action.Handler actionHandler)
addActionHandler in interface Action.ContaineractionHandler - the new handler to be added.Action.Container.addActionHandler(Action.Handler)public void removeActionHandler(Action.Handler actionHandler)
removeActionHandler in interface Action.ContaineractionHandler - the handler to be removed.Action.Container.removeActionHandler(Action.Handler)public void valueChange(Property.ValueChangeEvent event)
valueChange in interface Property.ValueChangeListenervalueChange in class AbstractFieldevent - the value change event telling the data source contents have
changed.Property.ValueChangeListener.valueChange(Property.ValueChangeEvent)public void attach()
attach in interface Componentattach in class SelectComponent.attach()public void detach()
detach in interface Componentdetach in class SelectComponent.detach()public boolean removeAllItems()
removeAllItems in interface ContainerremoveAllItems in class SelectContainer.removeAllItems()public boolean removeItem(Object itemId)
ItemId from the Container.
removeItem in interface ContainerremoveItem in class SelectitemId - ID of the Item to remove
Container.removeItem(Object)
public boolean removeContainerProperty(Object propertyId)
throws UnsupportedOperationException
removeContainerProperty in interface ContainerremoveContainerProperty in class SelectpropertyId - ID of the Property to remove
UnsupportedOperationExceptionContainer.removeContainerProperty(Object)
public boolean addContainerProperty(Object propertyId,
Class type,
Object defaultValue)
throws UnsupportedOperationException
addContainerProperty in interface ContaineraddContainerProperty in class SelectpropertyId - the Id of the property.type - the class of the property.defaultValue - the default value given for all existing items.
UnsupportedOperationExceptionContainer.addContainerProperty(Object,
Class, Object)
public boolean addContainerProperty(Object propertyId,
Class type,
Object defaultValue,
String columnHeader,
Resource columnIcon,
String columnAlignment)
throws UnsupportedOperationException
propertyId - the Id of the propertytype - the class of the propertydefaultValue - the default value given for all existing itemscolumnHeader - the Explicit header of the column. If explicit header is not
needed, this should be set null.columnIcon - the Icon of the column. If icon is not needed, this should be
set null.columnAlignment - the Alignment of the column. Null implies align left.
UnsupportedOperationException - if the operation is not supported.Container.addContainerProperty(Object,
Class, Object)public Collection getVisibleItemIds()
getVisibleItemIds in class SelectSelect.getVisibleItemIds()public void containerItemSetChange(Container.ItemSetChangeEvent event)
containerItemSetChange in interface Container.ItemSetChangeListenercontainerItemSetChange in class Selectevent - change event textContainer.ItemSetChangeListener.containerItemSetChange(com.itmill.toolkit.data.Container.ItemSetChangeEvent)public void containerPropertySetChange(Container.PropertySetChangeEvent event)
containerPropertySetChange in interface Container.PropertySetChangeListenercontainerPropertySetChange in class Selectevent - Change event.Container.PropertySetChangeListener.containerPropertySetChange(com.itmill.toolkit.data.Container.PropertySetChangeEvent)
public void setNewItemsAllowed(boolean allowNewOptions)
throws UnsupportedOperationException
setNewItemsAllowed in class SelectallowNewOptions - the New value of property allowNewOptions.
UnsupportedOperationException - if set to true.Select.setNewItemsAllowed(boolean)
public void focus()
throws UnsupportedOperationException
focus in interface Component.Focusablefocus in class AbstractFieldUnsupportedOperationException - if invoked.AbstractField.focus()public Object nextItemId(Object itemId)
nextItemId in interface Container.OrdereditemId - ID of an Item in the Container
nullContainer.Ordered.nextItemId(java.lang.Object)public Object prevItemId(Object itemId)
prevItemId in interface Container.OrdereditemId - ID of an Item in the Container
nullContainer.Ordered.prevItemId(java.lang.Object)public Object firstItemId()
firstItemId in interface Container.OrderedContainer.Ordered.firstItemId()public Object lastItemId()
lastItemId in interface Container.OrderedContainer.Ordered.lastItemId()public boolean isFirstId(Object itemId)
isFirstId in interface Container.OrdereditemId - ID of an Item in the Container
true if the Item is first in the Container,
false if notContainer.Ordered.isFirstId(java.lang.Object)public boolean isLastId(Object itemId)
isLastId in interface Container.Orderedtrue if the Item is last in the Container,
false if notContainer.Ordered.isLastId(java.lang.Object)
public Object addItemAfter(Object previousItemId)
throws UnsupportedOperationException
addItemAfter in interface Container.OrderedpreviousItemId - Id of the previous item in ordered container.
UnsupportedOperationExceptionContainer.Ordered.addItemAfter(java.lang.Object)
public Item addItemAfter(Object previousItemId,
Object newItemId)
throws UnsupportedOperationException
addItemAfter in interface Container.OrderedpreviousItemId - Id of the previous item in ordered container.newItemId - Id of the new item to be added.
UnsupportedOperationExceptionContainer.Ordered.addItemAfter(java.lang.Object,
java.lang.Object)public FieldFactory getFieldFactory()
isEditable()public void setFieldFactory(FieldFactory fieldFactory)
fieldFactory - the field factory to set.isEditable(),
BaseFieldFactorypublic boolean isEditable()
Field,
FieldFactorypublic void setEditable(boolean editable)
editable - true if table should be editable by user.Field,
FieldFactory
public void sort(Object[] propertyId,
boolean[] ascending)
throws UnsupportedOperationException
sort in interface Container.SortablepropertyId - Array of container property IDs, which values are used to
sort the items in container as primary, secondary, ...
sorting criterion. All of the item IDs must be in the
collection returned by
getSortableContainerPropertyIdsascending - Array of sorting order flags corresponding to each
property ID used in sorting. If this array is shorter than
propertyId array, ascending order is assumed for items
where the order is not specified. Use true
to sort in ascending order, false to use
descending order.
UnsupportedOperationException - if the container data source does not implement
Container.SortableContainer.Sortable.sort(java.lang.Object[],
boolean[])public void sort()
UnsupportedOperationException - if the container data source does not implement
Container.Sortablepublic Collection getSortableContainerPropertyIds()
getSortableContainerPropertyIds in interface Container.SortableContainer.Sortable.getSortableContainerPropertyIds()public Object getSortContainerPropertyId()
public void setSortContainerPropertyId(Object propertyId)
propertyId - the Container property id of the currently sorted column.public boolean isSortAscending()
true if ascending, false if
descending.public void setSortAscending(boolean ascending)
ascending - true if ascending, false if
descending.public boolean isSortDisabled()
public void setSortDisabled(boolean sortDisabled)
sortDisabled - True iff sorting is disabled.public int getHeightUnits()
getHeightUnits in interface SizeableSizeable.getHeightUnits()public int getWidthUnits()
getWidthUnits in interface SizeableSizeable.getWidthUnits()public void setHeightUnits(int units)
setHeightUnits in interface Sizeableunits - the units used in height property.Sizeable.setHeightUnits(int)public void setWidthUnits(int units)
setWidthUnits in interface Sizeableunits - the units used in width property.Sizeable.setWidthUnits(int)public int getHeight()
getHeight in interface SizeableSizeable.getHeight()public int getWidth()
getWidth in interface SizeableSizeable.getWidth()public void setHeight(int height)
setHeight in interface Sizeableheight - the height to set.public void setWidth(int width)
setWidth in interface Sizeablewidth - the width to set.public void setLazyLoading(boolean useLazyLoading)
setLazyLoading in class SelectSelect.setLazyLoading(boolean)
public void setColumnStyle(Object propertyId,
String style)
propertyId - the column identifier.style - stylename for the column. Use null to remove
styles from a column.public String getColumnStyle(Object propertyId)
propertyId - the column identifier.
null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||