|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WWidget
eu.webtoolkit.jwt.WCompositeWidget
eu.webtoolkit.jwt.WAbstractItemView
public abstract class WAbstractItemView
An abstract base class for item Views.
See WTableView or WTreeView for a description.
The strings used in this class can be translated by overriding the default values for the following localization keys:
| Nested Class Summary | |
|---|---|
static class |
WAbstractItemView.EditOption
Enumeration that specifies editing options. |
static class |
WAbstractItemView.EditTrigger
Enumeration that specifies the user action that triggers editing. |
static class |
WAbstractItemView.ScrollHint
Enumeration that specifies a scrolling option. |
| Constructor Summary | |
|---|---|
protected |
WAbstractItemView()
Creates a new item view. |
protected |
WAbstractItemView(WContainerWidget parent)
Creates a new item view. |
| Method Summary | |
|---|---|
Signal2<WModelIndex,WMouseEvent> |
clicked()
Signal emitted when an item is clicked. |
void |
closeEditor(WModelIndex index)
Closes the editor for the given index. |
void |
closeEditor(WModelIndex index,
boolean saveData)
Closes the editor for the given index. |
void |
closeEditors()
Closes all open editors. |
void |
closeEditors(boolean saveData)
Closes all open editors. |
Signal2<java.lang.Integer,WLength> |
columnResized()
Returns the signal emitted when a column is resized by the user. |
protected WWidget |
createExtraHeaderWidget(int column)
Create an extra widget in the header. |
Signal2<WModelIndex,WMouseEvent> |
doubleClicked()
Signal emitted when an item is double clicked. |
protected void |
dropEvent(WDropEvent e,
WModelIndex index)
Handles a drop event (drag & drop). |
void |
edit(WModelIndex index)
Opens an editor for the given index. |
protected WWidget |
extraHeaderWidget(int column)
Returns the extra header widget. |
AlignmentFlag |
getColumnAlignment(int column)
Returns the content alignment for a column. |
WLength |
getColumnWidth(int column)
Returns the column width. |
protected WWidget |
getCreatePageNavigationBar()
Returns a page navigation widget. |
abstract int |
getCurrentPage()
Returns the current page. |
java.util.EnumSet<WAbstractItemView.EditOption> |
getEditOptions()
Returns the editing options. |
java.util.EnumSet<WAbstractItemView.EditTrigger> |
getEditTriggers()
Returns the editing triggers. |
AlignmentFlag |
getHeaderAlignment(int column)
Deprecated. use horizontalHeaderAlignment() instead. |
WLength |
getHeaderHeight()
Returns the header height. |
WAbstractItemDelegate |
getItemDelegate()
Returns the default item delegate. |
WAbstractItemDelegate |
getItemDelegate(int column)
Returns the delegate for a column. |
WAbstractItemDelegate |
getItemDelegate(WModelIndex index)
Returns the delegate for rendering an item. |
WAbstractItemDelegate |
getItemDelegateForColumn(int column)
Returns the delegate that was set for a column. |
WAbstractItemModel |
getModel()
Returns the model. |
abstract int |
getPageCount()
Returns the number of pages. |
abstract int |
getPageSize()
Returns the page size. |
WModelIndex |
getRootIndex()
Returns the root index. |
int |
getRowHeaderCount()
Returns the number of columns that are used as row headers. |
WLength |
getRowHeight()
Returns the row height. |
java.util.SortedSet<WModelIndex> |
getSelectedIndexes()
Returns the set of selected items. |
SelectionBehavior |
getSelectionBehavior()
Returns the selection behaviour. |
SelectionMode |
getSelectionMode()
Returns the selection mode. |
WItemSelectionModel |
getSelectionModel()
Returns the selection model. |
int |
getSortColumn()
Returns the current sorting columm. |
SortOrder |
getSortOrder()
Returns the current sorting order. |
boolean |
hasAlternatingRowColors()
Returns whether alternating row colors are used. |
void |
hideColumn(int column)
Hides a column. |
AlignmentFlag |
horizontalHeaderAlignment(int column)
Returns the horizontal header alignment for a column. |
boolean |
isColumn1Fixed()
Deprecated. Use getRowHeaderCount() instead. |
boolean |
isColumnHidden(int column)
Returns if a column is hidden. |
boolean |
isColumnResizeEnabled()
Returns whether column resizing is enabled. |
boolean |
isEditing(WModelIndex index)
Returns whether an editor is open for a given index. |
boolean |
isSelected(WModelIndex index)
Returns wheter an item is selected. |
boolean |
isSortingEnabled()
Returns whether sorting is enabled. |
boolean |
isSortingEnabled(int column)
Returns whether sorting is enabled for a single column. |
boolean |
isValid(WModelIndex index)
Returns whether an editor's state is valid. |
protected void |
modelHeaderDataChanged(Orientation orientation,
int start,
int end)
|
Signal2<WModelIndex,WMouseEvent> |
mouseWentDown()
Signal emitted when a mouse button is pressed down. |
Signal2<WModelIndex,WMouseEvent> |
mouseWentUp()
Signal emitted when the mouse button is released. |
Signal |
pageChanged()
Signal emitted when page information was updated. |
void |
remove()
Destructor. |
protected void |
saveExtraHeaderWidgets()
|
void |
scrollTo(WModelIndex index)
Scrolls the view to an item. |
abstract void |
scrollTo(WModelIndex index,
WAbstractItemView.ScrollHint hint)
Scrolls the view to an item. |
void |
select(WModelIndex index)
Selects a single item. |
void |
select(WModelIndex index,
SelectionFlag option)
Selects a single item. |
Signal |
selectionChanged()
Signal emitted when the selection is changed. |
void |
setAlternatingRowColors(boolean enable)
Sets if alternating row colors are to be used. |
void |
setColumn1Fixed(boolean enable)
Deprecated. Use setRowHeaderCount() instead. |
void |
setColumnAlignment(int column,
AlignmentFlag alignment)
Sets the content alignment for a column. |
abstract void |
setColumnBorder(WColor color)
Sets the column border color. |
void |
setColumnHidden(int column,
boolean hidden)
Changes the visibility of a column. |
void |
setColumnResizeEnabled(boolean enabled)
Enables interactive column resizing. |
abstract void |
setColumnWidth(int column,
WLength width)
Sets the column width. |
abstract void |
setCurrentPage(int page)
Sets the current page. |
void |
setDragEnabled(boolean enable)
Enables the selection to be dragged (drag & drop). |
void |
setDropsEnabled(boolean enable)
Enables drop operations (drag & drop). |
void |
setEditOptions(java.util.EnumSet<WAbstractItemView.EditOption> editOptions)
Configures editing options. |
void |
setEditOptions(WAbstractItemView.EditOption editOption,
WAbstractItemView.EditOption... editOptions)
Configures editing options. |
void |
setEditTriggers(java.util.EnumSet<WAbstractItemView.EditTrigger> editTriggers)
Configures what actions should trigger editing. |
void |
setEditTriggers(WAbstractItemView.EditTrigger editTrigger,
WAbstractItemView.EditTrigger... editTriggers)
Configures what actions should trigger editing. |
void |
setHeaderAlignment(int column,
AlignmentFlag alignmen,
AlignmentFlag... alignment)
Sets the header alignment for a column. |
void |
setHeaderAlignment(int column,
java.util.EnumSet<AlignmentFlag> alignment)
Sets the header alignment for a column. |
void |
setHeaderHeight(WLength height)
Sets the header height. |
void |
setHeaderHeight(WLength height,
boolean multiLine)
Deprecated. use setHeaderHeight(),
setHeaderAlignment() and
setHeaderWordWrap() instead. |
void |
setHeaderItemDelegate(WAbstractItemDelegate delegate)
Sets the header item delegate. |
void |
setHeaderWordWrap(int column,
boolean enabled)
Configures header text wrapping. |
void |
setItemDelegate(WAbstractItemDelegate delegate)
Sets the default item delegate. |
void |
setItemDelegateForColumn(int column,
WAbstractItemDelegate delegate)
Sets the delegate for a column. |
void |
setModel(WAbstractItemModel model)
Sets the model. |
void |
setRootIndex(WModelIndex rootIndex)
Sets the root index. |
void |
setRowHeaderCount(int count)
Configures the number of columns that are used as row headers. |
void |
setRowHeight(WLength rowHeight)
Sets the row height. |
void |
setSelectedIndexes(java.util.SortedSet<WModelIndex> indexes)
Sets the selected items. |
void |
setSelectionBehavior(SelectionBehavior behavior)
Changes the selection behaviour. |
void |
setSelectionMode(SelectionMode mode)
Sets the selection mode. |
void |
setSortingEnabled(boolean enabled)
Enables or disables sorting for all columns. |
void |
setSortingEnabled(int column,
boolean enabled)
Enables or disables sorting for a single column. |
protected boolean |
shiftEditors(WModelIndex parent,
int start,
int count,
boolean persistWhenShifted)
|
void |
showColumn(int column)
Shows a column. |
void |
sortByColumn(int column,
SortOrder order)
Sorts the data according to a column. |
WValidator.State |
validateEditor(WModelIndex index)
Validates the editor for the given index. |
WValidator.State |
validateEditors()
Validates all editors. |
AlignmentFlag |
verticalHeaderAlignment(int column)
Returns the vertical header alignment for a column. |
| Methods inherited from class eu.webtoolkit.jwt.WWidget |
|---|
acceptDrops, acceptDrops, addCssRule, addCssRule, addStyleClass, animateHide, animateShow, containsExposed, disable, dropEvent, enable, getDrop, getJsRef, getParent, hide, htmlText, isLayoutSizeAware, isRendered, layoutSizeChanged, positionAt, positionAt, removeStyleClass, resize, setClearSides, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr |
| Methods inherited from class eu.webtoolkit.jwt.WObject |
|---|
getObjectName, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected WAbstractItemView(WContainerWidget parent)
protected WAbstractItemView()
Calls this((WContainerWidget)null)
| Method Detail |
|---|
public void remove()
WWidgetDeletes a widget and all children (recursively). If the widget is contained in another widget, it is removed first.
remove in class WCompositeWidgetWContainerWidget.removeWidget(WWidget widget)public void setModel(WAbstractItemModel model)
The View will display data of the given model and changes in
the model are reflected by the View.
The initial model is null.
setRootIndex(WModelIndex rootIndex)public WAbstractItemModel getModel()
setModel(WAbstractItemModel model)public void setRootIndex(WModelIndex rootIndex)
The root index is the model index that is considered the root node. This node itself is not rendered, but its children are.
The default value is null, corresponding to the model's
root node.
setModel(WAbstractItemModel model)public WModelIndex getRootIndex()
setRootIndex(WModelIndex rootIndex)public void setItemDelegate(WAbstractItemDelegate delegate)
The previous delegate is not deleted. This item delegate is for all columns for which no specific item delegate is set.
The default item delegate is a WItemDelegate.
setItemDelegateForColumn(int column,
WAbstractItemDelegate delegate)public WAbstractItemDelegate getItemDelegate()
setItemDelegate(WAbstractItemDelegate delegate)
public void setItemDelegateForColumn(int column,
WAbstractItemDelegate delegate)
A delegate previously set (if any) is not deleted.
setItemDelegate(WAbstractItemDelegate delegate)public WAbstractItemDelegate getItemDelegateForColumn(int column)
Returns null if no delegate was set for the column.
setItemDelegateForColumn(int column,
WAbstractItemDelegate delegate)public WAbstractItemDelegate getItemDelegate(WModelIndex index)
setItemDelegateForColumn(int column,
WAbstractItemDelegate delegate),
setItemDelegate(WAbstractItemDelegate delegate)public WAbstractItemDelegate getItemDelegate(int column)
Returns either the delegate that was set for the column, or the default delegate.
public void setHeaderItemDelegate(WAbstractItemDelegate delegate)
This item delegate is used for rendering items in the header.
The previous delegate is not deleted. This item delegate is for all columns for which no specific item delegate is set.
The default item delegate is a WItemDelegate.
public void setColumnAlignment(int column,
AlignmentFlag alignment)
The default value is AlignmentFlag.AlignLeft.
setHeaderAlignment(int column, EnumSet alignment)public AlignmentFlag getColumnAlignment(int column)
setColumnAlignment(int column, AlignmentFlag
alignment)
public void setHeaderAlignment(int column,
java.util.EnumSet<AlignmentFlag> alignment)
The default alignemnt is horizontally left, and vertically centered. (
AlignmentFlag.AlignLeft | AlignmentFlag.AlignMiddle).
Valid options for horizontal alignment are
AlignmentFlag.AlignLeft, AlignmentFlag.AlignCenter or
AlignmentFlag.AlignRight.
Valid options for vertical alignment are
AlignmentFlag.AlignMiddle or AlignmentFlag.AlignTop. In
the latter case, other contents may be added below the label in
createExtraHeaderWidget().
setColumnAlignment(int column, AlignmentFlag
alignment)
public final void setHeaderAlignment(int column,
AlignmentFlag alignmen,
AlignmentFlag... alignment)
Calls setHeaderAlignment(column, EnumSet.of(alignmen, alignment))
public AlignmentFlag getHeaderAlignment(int column)
horizontalHeaderAlignment() instead.
setHeaderAlignment(int column, EnumSet alignment)public AlignmentFlag horizontalHeaderAlignment(int column)
setHeaderAlignment(int column, EnumSet alignment)public AlignmentFlag verticalHeaderAlignment(int column)
setHeaderAlignment(int column, EnumSet alignment)
public void setHeaderWordWrap(int column,
boolean enabled)
This setting only affects a multiline header, and the default value is
true. When set to false, the header itself will
not wrap (as with a vertically centered header), and thus extra widgets
will not shift down when there is a long header label.
public void setAlternatingRowColors(boolean enable)
Configure whether rows get alternating background colors, defined by the current CSS theme.
The default value is false.
public boolean hasAlternatingRowColors()
When enabled, rows are displayed in alternating row colors, according to the current theme's definition.
setAlternatingRowColors(boolean enable)
public void sortByColumn(int column,
SortOrder order)
Sorts the data according to data in column column and sort
order order.
The default sorting column is -1: the model is unsorted.
WAbstractItemModel.sort(int column, SortOrder order)public int getSortColumn()
sortByColumn(int column, SortOrder order),
getSortOrder()public SortOrder getSortOrder()
sortByColumn(int column, SortOrder order),
getSortColumn()public void setSortingEnabled(boolean enabled)
Enable or disable sorting by the user on all columns.
Sorting is enabled by default.
WAbstractItemModel.sort(int column, SortOrder order)
public void setSortingEnabled(int column,
boolean enabled)
Enable or disable sorting by the user for a specific column.
Sorting is enabled by default.
WAbstractItemModel.sort(int column, SortOrder order)public boolean isSortingEnabled()
setSortingEnabled(boolean enabled)public boolean isSortingEnabled(int column)
setSortingEnabled(boolean enabled)public void setColumnResizeEnabled(boolean enabled)
Enable or disable column resize handles for interactive resizing of the columns.
Column resizing is enabled by default when JavaScript is available.
setColumnResizeEnabled(boolean enabled)public boolean isColumnResizeEnabled()
setColumnResizeEnabled(boolean enabled)public void setSelectionBehavior(SelectionBehavior behavior)
The selection behavior indicates whether whole rows or individual items
can be selected. It is a property of the
getSelectionModel().
By default, selection operates on rows (
SelectRows), in which case model
indexes will always be in the first column (column null).
Alternatively, you can allow selection for individual items (
SelectItems).
WItemSelectionModel.setSelectionBehavior(SelectionBehavior behavior),
setSelectionMode(SelectionMode mode)public SelectionBehavior getSelectionBehavior()
setSelectionBehavior(SelectionBehavior behavior)public void setSelectionMode(SelectionMode mode)
By default selection is disabled (NoSelection).
setSelectionBehavior(SelectionBehavior behavior)public SelectionMode getSelectionMode()
setSelectionMode(SelectionMode mode)public WItemSelectionModel getSelectionModel()
The selection model keeps track of the currently selected items.
public void setSelectedIndexes(java.util.SortedSet<WModelIndex> indexes)
Replaces the current selection with indexes.
select(WModelIndex index, SelectionFlag option),
getSelectionModel()
public void select(WModelIndex index,
SelectionFlag option)
setSelectedIndexes(SortedSet indexes),
getSelectionModel()public final void select(WModelIndex index)
Calls select(index, SelectionFlag.Select)
public boolean isSelected(WModelIndex index)
This is a convenience method for:
selectionModel().isSelected(index)
getSelectedIndexes(),
select(WModelIndex index, SelectionFlag option),
getSelectionModel()public java.util.SortedSet<WModelIndex> getSelectedIndexes()
The model indexes are returned as a set, topologically ordered (in the order they appear in the view).
This is a convenience method for:
selectionModel().selectedIndexes()
setSelectedIndexes(SortedSet indexes)public void setDragEnabled(boolean enable)
To enable dragging of the selection, you first need to enable selection
using setSelectionMode().
Whether an individual item may be dragged is controlled by the
item's ItemIsDragEnabled flag.
The selection can be dragged only if all items currently selected can be
dragged.
setDropsEnabled(boolean enable)public void setDropsEnabled(boolean enable)
When drop is enabled, the tree view will indicate that something may be
dropped when the mime-type of the dragged object is compatible with one
of the model's accepted drop mime-types (see
WAbstractItemModel#getAcceptDropMimeTypes()) or this widget's
accepted drop mime-types (see
WWidget#acceptDrops()), and the target item has drop enabled (which is
controlled by the item's ItemIsDropEnabled flag).
Drop events must be handled in
dropEvent().
setDragEnabled(boolean enable),
dropEvent(WDropEvent e, WModelIndex index)public void setRowHeight(WLength rowHeight)
The view renders all rows with a same height. This method configures this row height.
The default value is 20 pixels.
Note: The height must be specified in
WLength.Unit.Pixel units.
setColumnWidth(int column, WLength width)public WLength getRowHeight()
public abstract void setColumnWidth(int column,
WLength width)
The default column width is 150 pixels.
Note: The actual space occupied by each column is the column width augmented by 7 pixels for internal padding and a border.
public WLength getColumnWidth(int column)
setColumnWidth(int column, WLength width)
public void setColumnHidden(int column,
boolean hidden)
isColumnHidden(int column)public boolean isColumnHidden(int column)
setColumnHidden(int column, boolean hidden)public void hideColumn(int column)
showColumn(int column),
setColumnHidden(int column, boolean hidden)public void showColumn(int column)
hideColumn(int column),
setColumnHidden(int column, boolean hidden)public abstract void setColumnBorder(WColor color)
The default border color is defined by the CSS theme.
public void setHeaderHeight(WLength height)
The default value is 20 pixels.
public void setHeaderHeight(WLength height,
boolean multiLine)
setHeaderHeight(),
setHeaderAlignment() and
setHeaderWordWrap() instead.
Along with setting the header height, this also configures vertical
aligment and header label word wrapping. This has been deprecated in
favour of the more fine grained control using
setHeaderAlignment() and
setHeaderWordWrap().
When multiLine is false, the header alignment
is set to AlignmentFlag.AlignMiddle. When multiLine
is true, the header alignment is set to
AlignmentFlag.AlignTop and header word wrap is set to
true.
public WLength getHeaderHeight()
setHeaderHeight(WLength height)public abstract int getPageCount()
When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of pages currently shown.
getCreatePageNavigationBar(),
pageChanged()public abstract int getPageSize()
When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This returns the number of items per page.
getCreatePageNavigationBar(),
pageChanged()public abstract int getCurrentPage()
When Ajax/JavaScript is not available, the view will use a paging
navigation bar to allow scrolling through the data. This returns the
current page (between 0 and getPageCount() - 1).
getCreatePageNavigationBar(),
pageChanged()public abstract void setCurrentPage(int page)
When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This method can be used to change the current page.
getCreatePageNavigationBar(),
pageChanged()
public abstract void scrollTo(WModelIndex index,
WAbstractItemView.ScrollHint hint)
Scrolls the view to ensure that the item which represents the provided
index is visible. A hint may indicate how the
item should appear in the viewport (if possible).
Note: Currently only implemented to scroll to the correct row, not taking into account the column.
public final void scrollTo(WModelIndex index)
Calls
scrollTo(index, WAbstractItemView.ScrollHint.EnsureVisible)
public void setEditTriggers(java.util.EnumSet<WAbstractItemView.EditTrigger> editTriggers)
The default value is DoubleClicked.
edit(WModelIndex index)
public final void setEditTriggers(WAbstractItemView.EditTrigger editTrigger,
WAbstractItemView.EditTrigger... editTriggers)
Calls setEditTriggers(EnumSet.of(editTrigger, editTriggers))
public java.util.EnumSet<WAbstractItemView.EditTrigger> getEditTriggers()
setEditTriggers(EnumSet editTriggers)public void setEditOptions(java.util.EnumSet<WAbstractItemView.EditOption> editOptions)
The default value is SingleEditor;
public final void setEditOptions(WAbstractItemView.EditOption editOption,
WAbstractItemView.EditOption... editOptions)
Calls setEditOptions(EnumSet.of(editOption, editOptions))
public java.util.EnumSet<WAbstractItemView.EditOption> getEditOptions()
setEditOptions(EnumSet editOptions)public void edit(WModelIndex index)
Unless multiple editors are enabled, any other open editor is closed first.
setEditTriggers(EnumSet editTriggers),
setEditOptions(EnumSet editOptions),
closeEditor(WModelIndex index, boolean saveData)
public void closeEditor(WModelIndex index,
boolean saveData)
If saveData is true, then the currently edited value is
saved first to the model.
edit(WModelIndex index)public final void closeEditor(WModelIndex index)
Calls closeEditor(index, true)
public void closeEditors(boolean saveData)
If saveData is true, then the currently edited values are
saved to the model before closing the editor.
closeEditor(WModelIndex index, boolean saveData)public final void closeEditors()
Calls closeEditors(true)
public WValidator.State validateEditor(WModelIndex index)
Validation is done by invoking
WAbstractItemDelegate#validate().
public WValidator.State validateEditors()
validateEditor(WModelIndex index)public boolean isEditing(WModelIndex index)
edit(WModelIndex index)public boolean isValid(WModelIndex index)
public Signal2<WModelIndex,WMouseEvent> clicked()
doubleClicked()public Signal2<WModelIndex,WMouseEvent> doubleClicked()
clicked()public Signal2<WModelIndex,WMouseEvent> mouseWentDown()
mouseWentUp()public Signal2<WModelIndex,WMouseEvent> mouseWentUp()
mouseWentDown()public Signal selectionChanged()
select(WModelIndex index, SelectionFlag option),
setSelectionMode(SelectionMode mode),
setSelectionBehavior(SelectionBehavior behavior)public Signal pageChanged()
When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data. This signal is emitted when page-related information changed (e.g. the current page was changed, or the number of rows was changed).
getCreatePageNavigationBar()public Signal2<java.lang.Integer,WLength> columnResized()
The arguments of the signal are: the column index and the new width of the column.
public void setRowHeaderCount(int count)
An item view does not use the vertical header data from the model in any way, but instead you can configure data in the first column(s) to be used as a row headers.
These columns will not scroll horizontally together with the rest of the model.
The default value is 0.
Note: Currently, this property must be set before any other settings of the view and only a value of 0 or 1 is supported.
public int getRowHeaderCount()
setRowHeaderCount(int count)public void setColumn1Fixed(boolean enable)
setRowHeaderCount() instead.
To display a model with many columns, this option allows you to keep the first column fixed while scrolling through the other columns of the model.
The default value is false.
public boolean isColumn1Fixed()
getRowHeaderCount() instead.
setColumn1Fixed(boolean enable)
protected void dropEvent(WDropEvent e,
WModelIndex index)
The event object contains details about the drop operation,
identifying the source (which provides the data) and the mime-type of the
data. The drop was received on the target item.
The drop event can be handled either by the view itself, or by the model.
The default implementation checks if the mime-type is accepted by the
model, and if so passes the drop event to the model. If the source is the
view's own selection model, then the drop event will be handled as a
MoveAction, otherwise the drop event will
be handled as a CopyAction.
WAbstractItemModel.dropEvent(WDropEvent e, DropAction action, int
row, int column, WModelIndex parent)protected WWidget createExtraHeaderWidget(int column)
You may reimplement this method to provide an extra widget to be placed
below the header label. The extra widget will be visible only if a
multi-line header is configured using
setHeaderHeight().
The widget is created only once, but this method may be called repeatedly
for a column for which prior calls returned null (i.e. each
time the header is rerendered).
The default implementation returns null.
setHeaderHeight(WLength height),
extraHeaderWidget(int column)protected WWidget extraHeaderWidget(int column)
Returns the widget previously created using
createExtraHeaderWidget()
createExtraHeaderWidget(int column)protected WWidget getCreatePageNavigationBar()
When Ajax/JavaScript is not available, the view will use a paging navigation bar to allow scrolling through the data, created by this method. The default implementation displays a simple navigation bar with (First, Prevous, Next, Last) buttons and a page counter.
You may want to reimplement this method to provide a custom page
navigation bar. You can use the
getCurrentPage(),
getPageCount(), and
setCurrentPage()
methods to set or get the page information, and listen to the
pageChanged() signal to react to
changes.
protected void modelHeaderDataChanged(Orientation orientation,
int start,
int end)
protected void saveExtraHeaderWidgets()
protected boolean shiftEditors(WModelIndex parent,
int start,
int count,
boolean persistWhenShifted)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||