public class UiWidgetAdapterGwtTableColumn extends UiWidgetAdapterGwtWidget<TableCellHeaderAtomic> implements UiWidgetAdapterTableColumn
UiWidgetAdapterTableColumn
using GWT.Modifier and Type | Class and Description |
---|---|
protected static class |
UiWidgetAdapterGwtTableColumn.ColumnWidthRange
Container for the range of the width of a column.
|
private class |
UiWidgetAdapterGwtTableColumn.ReorderHandler
Handler for the reorder behavior of this column.
|
private class |
UiWidgetAdapterGwtTableColumn.ResizeHandler
Handler for the resize behavior of this column.
|
Modifier and Type | Field and Description |
---|---|
private TableCellAtomic |
bodyWidthCell |
private UiWidgetAdapterGwtAbstractDataTable<?> |
dataTableAdapter |
private com.google.gwt.user.client.ui.FlowPanel |
divContainer
Required for layout due to HTML obstracles.
|
private UiWidgetWithValue<?> |
editWidget |
private com.google.gwt.user.client.ui.Label |
headerLabel |
private boolean |
reorderable |
private boolean |
resizable |
private CssDivWidget |
resizeWidget |
private CssIconWidget |
sortIcon |
TAB_INDEX_NONE
HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
PROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLE
WAI_ARIA
PROPERTY_LABEL
ACCESS_KEY_NONE, HTML_ATTRIBUTE_ACCESS_KEY
ATTRIBUTE_COLSPAN
Constructor and Description |
---|
UiWidgetAdapterGwtTableColumn(UiWidgetAdapterGwtAbstractDataTable<?> dataTableAdapter)
The constructor.
|
UiWidgetAdapterGwtTableColumn(UiWidgetAdapterGwtAbstractDataTable<?> dataTableAdapter,
TableCellHeaderAtomic toplevelWidget)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected TableCellHeaderAtomic |
createToplevelWidget()
This method creates the
underlying widget . |
TableCellAtomic |
getBodyWidthCell() |
UiWidgetAdapterGwtAbstractDataTable<?> |
getDataTableAdapter() |
UiWidgetWithValue<?> |
getEditWidget() |
com.google.gwt.user.client.ui.Label |
getHeaderLabel() |
Length |
getLength(LengthProperty property)
This method gets the
Length for the given LengthProperty of this object. |
protected AbstractUiWidgetTableColumn<?,?,?> |
getUiWidgetTyped()
This method is a design suggestion for implementations of widget adapters that need typed access to
AbstractUiWidgetAdapter.getUiWidget() and want to perform the cast only in a single place. |
boolean |
isReorderable()
This method determines if this object can be reordered.
|
boolean |
isSortable()
This method determines if this object can be sorted.
|
void |
setEditWidget(UiWidgetWithValue<?> editWidget) |
void |
setEnabled(boolean enabled)
This method sets the
enabled status of this object. |
void |
setLength(LengthProperty property,
Length length)
This method sets the specified
length of this object. |
void |
setReorderable(boolean reorderable)
This method sets the
reorderable attribute. |
void |
setResizable(boolean resizable)
This method sets the
resizable attribute. |
void |
setSortable(boolean sortable)
This method sets the
sortable attribute. |
void |
setSortOrder(SortOrder sortOrder) |
void |
setTitle(String title)
This method sets the
title of this object. |
dispose, getActiveWidget, removeFromParent
addHandlerRegistration, addStyle, createAbsoluteImageUrl, createEventAdapter, getHeightInPixel, getImage, getImageParentElement, getSizeElement, getToplevelWidget, getToplevelWidget, getWidthInPixel, isStyleDeltaSupported, removeStyle, setAttribute, setId, setImage, setPrimaryStyle, setStyles, setTooltip, setVisible
applyEventAdapter, applyEventAdapterForChange, applyEventAdapterForClick, applyEventAdapterForFocus, applyEventAdapterForSelection, getEventAdapter, setEventSender
createLabel, getAccessKey, getAltText, getAttribute, getBundle, getColumnSpan, getContext, getHeightInRows, getId, getLabel, getMaximumTextLength, getPrimaryStyle, getSelectionMode, getStyles, getTitle, getTooltip, getToplevelWidget, getUiWidget, getUrl, getValidationFailure, hasStyle, isDisposed, isEnabled, isFocused, isResizable, setMode, setParent, setUiWidget
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createAbsoluteImageUrl, createLabel, getToplevelWidget, isStyleDeltaSupported, removeFromParent, setEventSender, setMode, setParent, setVisible
setId
getId
setTooltip
getTooltip
isEnabled
addStyle, removeStyle
hasStyle
setStyles
getStyles
setPrimaryStyle
getPrimaryStyle
dispose
isDisposed
getHeightInPixel, getWidthInPixel
getAttribute
setAttribute
getTitle
isResizable
private com.google.gwt.user.client.ui.FlowPanel divContainer
private com.google.gwt.user.client.ui.Label headerLabel
getHeaderLabel()
private CssIconWidget sortIcon
setSortOrder(SortOrder)
private CssDivWidget resizeWidget
setResizable(boolean)
private final TableCellAtomic bodyWidthCell
getBodyWidthCell()
private final UiWidgetAdapterGwtAbstractDataTable<?> dataTableAdapter
getDataTableAdapter()
private boolean resizable
setResizable(boolean)
private boolean reorderable
setReorderable(boolean)
private UiWidgetWithValue<?> editWidget
getEditWidget()
public UiWidgetAdapterGwtTableColumn(UiWidgetAdapterGwtAbstractDataTable<?> dataTableAdapter)
dataTableAdapter
- is the data table adapter
.public UiWidgetAdapterGwtTableColumn(UiWidgetAdapterGwtAbstractDataTable<?> dataTableAdapter, TableCellHeaderAtomic toplevelWidget)
toplevelWidget
- is the toplevel widget
.dataTableAdapter
- is the data table adapter
.protected TableCellHeaderAtomic createToplevelWidget()
underlying widget
. createToplevelWidget
in class AbstractUiWidgetAdapter<TableCellHeaderAtomic>
underlying widget
.public TableCellAtomic getBodyWidthCell()
public com.google.gwt.user.client.ui.Label getHeaderLabel()
public UiWidgetAdapterGwtAbstractDataTable<?> getDataTableAdapter()
public void setSortOrder(SortOrder sortOrder)
setSortOrder
in interface UiWidgetAdapterTableColumn
sortOrder
- is the SortOrder
or null
for none.public void setEnabled(boolean enabled)
enabled
status of this object. If it is disabled, the user can
not interact with the object.setEnabled
in interface AttributeWriteEnabled
enabled
- - if true
the object will be enabled, else the object will be disabled.public void setTitle(String title)
title
of this object.setTitle
in interface AttributeWriteTitle<String>
title
- is the new title
to set.public void setResizable(boolean resizable)
resizable
attribute.setResizable
in interface AttributeWriteResizable
resizable
- is the new value of AttributeReadResizable.isResizable()
.public boolean isReorderable()
isReorderable
in interface AttributeReadReorderable
true
if the object can be reordered (by the end-user) - typically via drag and drop,
false
otherwise.public void setReorderable(boolean reorderable)
reorderable
attribute.setReorderable
in interface AttributeWriteReorderable
reorderable
- is the new value of AttributeReadReorderable.isReorderable()
.public boolean isSortable()
isSortable
in interface AttributeReadSortable
true
if the object can be sorted (by the end-user) - typically by clicking (e.g. the
header of a column), false
otherwise.public void setSortable(boolean sortable)
sortable
attribute.setSortable
in interface AttributeWriteSortable
sortable
- is the new value of AttributeReadSortable.isSortable()
.public Length getLength(LengthProperty property)
Length
for the given LengthProperty
of this object. getLength
(LengthProperty.WIDTH
)
will return the same result as AttributeReadSize.getWidth()
. Unlike AttributeReadSize
this method provides access to additional properties such as e.g. LengthProperty.MIN_WIDTH
or
LengthProperty.MAX_HEIGHT
.getLength
in interface AttributeReadLengthProperty
getLength
in class UiWidgetAdapterGwt<TableCellHeaderAtomic>
property
- is the LengthProperty
identifying the actual property to get.Length
. Will be Length.ZERO
if undefined (NOT set).public void setLength(LengthProperty property, Length length)
length
of this object. setLength
(LengthProperty.WIDTH
, value)
will return the same result as setWidth
(value)
.setLength
in interface AttributeWriteLengthProperty
setLength
in class UiWidgetAdapterGwt<TableCellHeaderAtomic>
property
- is the LengthProperty
identifying the actual property to set.length
- is the new length
to set.public UiWidgetWithValue<?> getEditWidget()
UiWidgetWithValue
used for inline-editing and as template to create the view widgets
in the cells of this column.public void setEditWidget(UiWidgetWithValue<?> editWidget)
editWidget
- is the editWidget to setprotected AbstractUiWidgetTableColumn<?,?,?> getUiWidgetTyped()
AbstractUiWidgetAdapter.getUiWidget()
and want to perform the cast only in a single place. If you would override
AbstractUiWidgetAdapter.getUiWidget()
to add the cast and do that multiple times across the inheritance hierarchy this
would cause multiple/unnecessary casts. Casting is required as we already declare enough generics for
widget adapters and also want to keep the code more flexible.getUiWidgetTyped
in class AbstractUiWidgetAdapter<TableCellHeaderAtomic>
UiWidget
potentially specifically typed.Copyright © 2001–2016 mmm-Team. All rights reserved.