com.vaadin.terminal.gwt.client.ui.
Class VScrollTable.HeaderCell
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.vaadin.terminal.gwt.client.ui.VScrollTable.HeaderCell
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget
Direct Known Subclasses:
Enclosing class:
- extends com.google.gwt.user.client.ui.Widget
public class VScrollTable.HeaderCell
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Field Summary |
---|
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
VScrollTable.HeaderCell(String colId,
String headerText)
|
Method Summary | |
---|---|
void |
disableAutoWidthCalculation()
|
char |
getAlign()
|
String |
getCaption()
|
String |
getColKey()
|
float |
getExpandRatio()
|
int |
getMinWidth()
|
int |
getNaturalColumnWidth(int columnIndex)
Detects the natural minimum width for the column of this header cell. |
int |
getWidth()
Returns the pixels width of the header cell. |
protected int |
getWidthWithIndent()
This method exists for the needs of VTreeTable only. |
protected void |
handleCaptionEvent(com.google.gwt.user.client.Event event)
|
boolean |
isDefinedWidth()
Detects if width is fixed by developer on server side or resized to current width by user. |
boolean |
isEnabled()
|
boolean |
isSorted()
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
Handle column reordering. |
void |
resizeCaptionContainer(int rightSpacing)
Makes room for the sorting indicator in case the column that the header cell belongs to is sorted. |
void |
setAlign(char c)
|
void |
setExpandRatio(float floatAttribute)
|
void |
setNaturalMinimumColumnWidth(int w)
|
void |
setSortable(boolean b)
|
void |
setText(String headerText)
|
void |
setUndefinedWidth()
|
void |
setWidth(int w,
boolean ensureDefinedWidth)
Sets width to the header cell. |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
VScrollTable.HeaderCell
public VScrollTable.HeaderCell(String colId,
String headerText)
Method Detail |
---|
setSortable
public void setSortable(boolean b)
resizeCaptionContainer
public void resizeCaptionContainer(int rightSpacing)
Makes room for the sorting indicator in case the column that the header cell belongs to is sorted. This is done by resizing the width of the caption container element by the correct amount
setNaturalMinimumColumnWidth
public void setNaturalMinimumColumnWidth(int w)
disableAutoWidthCalculation
public void disableAutoWidthCalculation()
setWidth
public void setWidth(int w,
boolean ensureDefinedWidth)
- Parameters:
w
- required width of the cell sans indentationsensureDefinedWidth
- disables expand ratio if required
Sets width to the header cell. This width should not include any
possible indent modifications that are present in
VScrollTable.VScrollTableBody.getMaxIndent()
.
setUndefinedWidth
public void setUndefinedWidth()
isDefinedWidth
public boolean isDefinedWidth()
- Returns:
- true if defined, false if "natural" width
Detects if width is fixed by developer on server side or resized to current width by user.
getWidthWithIndent
protected int getWidthWithIndent()
- Returns:
- The width in pixels
This method exists for the needs of VTreeTable
only.
Returns the pixels width of the header cell. This includes the
indent, if applicable.
getWidth
public int getWidth()
- Returns:
- The width in pixels
Returns the pixels width of the header cell.
setText
public void setText(String headerText)
getColKey
public String getColKey()
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEvent
in interfacecom.google.gwt.user.client.EventListener
- Overrides:
onBrowserEvent
in classcom.google.gwt.user.client.ui.Widget
Handle column reordering.
handleCaptionEvent
protected void handleCaptionEvent(com.google.gwt.user.client.Event event)
getMinWidth
public int getMinWidth()
getCaption
public String getCaption()
isEnabled
public boolean isEnabled()
setAlign
public void setAlign(char c)
getAlign
public char getAlign()
getNaturalColumnWidth
public int getNaturalColumnWidth(int columnIndex)
- Parameters:
columnIndex
- column index hint, if -1 (unknown) it will be detected- Returns:
Detects the natural minimum width for the column of this header cell. If column is resized by user or the width is defined by server the actual width is returned. Else the natural min width is returned.
setExpandRatio
public void setExpandRatio(float floatAttribute)
getExpandRatio
public float getExpandRatio()
isSorted
public boolean isSorted()