com.vaadin.client.ui
Class VScrollTable.HeaderCell

java.lang.Object
  extended by Widget
      extended by com.vaadin.client.ui.VScrollTable.HeaderCell
Direct Known Subclasses:
VScrollTable.RowHeadersHeaderCell
Enclosing class:
VScrollTable

public class VScrollTable.HeaderCell
extends Widget


Constructor Summary
VScrollTable.HeaderCell(java.lang.String colId, java.lang.String headerText)
           
 
Method Summary
 void disableAutoWidthCalculation()
           
 char getAlign()
           
 java.lang.String getCaption()
           
 java.lang.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(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(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.
protected  void saveNaturalColumnWidthIfNotSaved(int columnIndex)
          Saves natural column width if it hasn't been saved already.
 void setAlign(char c)
           
 void setExpandRatio(float floatAttribute)
           
 void setNaturalMinimumColumnWidth(int w)
           
 void setSortable(boolean b)
           
 void setText(java.lang.String headerText)
           
 void setUndefinedWidth()
           
 void setWidth(int w, boolean ensureDefinedWidth)
          Sets width to the header cell.
protected  void updateStyleNames(java.lang.String primaryStyleName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VScrollTable.HeaderCell

public VScrollTable.HeaderCell(java.lang.String colId,
                               java.lang.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)

updateStyleNames

protected void updateStyleNames(java.lang.String primaryStyleName)

disableAutoWidthCalculation

public void disableAutoWidthCalculation()

setWidth

public void setWidth(int w,
                     boolean ensureDefinedWidth)
Sets width to the header cell. This width should not include any possible indent modifications that are present in VScrollTable.VScrollTableBody.getMaxIndent().

Parameters:
w - required width of the cell sans indentations
ensureDefinedWidth - disables expand ratio if required

setUndefinedWidth

public void setUndefinedWidth()

isDefinedWidth

public boolean isDefinedWidth()
Detects if width is fixed by developer on server side or resized to current width by user.

Returns:
true if defined, false if "natural" width

getWidthWithIndent

protected int getWidthWithIndent()
This method exists for the needs of VTreeTable only. Returns the pixels width of the header cell. This includes the indent, if applicable.

Returns:
The width in pixels

getWidth

public int getWidth()
Returns the pixels width of the header cell.

Returns:
The width in pixels

setText

public void setText(java.lang.String headerText)

getColKey

public java.lang.String getColKey()

onBrowserEvent

public void onBrowserEvent(Event event)
Handle column reordering.


handleCaptionEvent

protected void handleCaptionEvent(Event event)

getMinWidth

public int getMinWidth()

getCaption

public java.lang.String getCaption()

isEnabled

public boolean isEnabled()

setAlign

public void setAlign(char c)

getAlign

public char getAlign()

saveNaturalColumnWidthIfNotSaved

protected void saveNaturalColumnWidthIfNotSaved(int columnIndex)
Saves natural column width if it hasn't been saved already.

Parameters:
columnIndex -
Since:
7.3.9

getNaturalColumnWidth

public int getNaturalColumnWidth(int columnIndex)
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.

Parameters:
columnIndex - column index hint, if -1 (unknown) it will be detected
Returns:

setExpandRatio

public void setExpandRatio(float floatAttribute)

getExpandRatio

public float getExpandRatio()

isSorted

public boolean isSorted()


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.