com.vaadin.client.ui
Class VScrollTable.VScrollTableBody.VScrollTableRow

java.lang.Object
  extended by Panel
      extended by com.vaadin.client.ui.VScrollTable.VScrollTableBody.VScrollTableRow
All Implemented Interfaces:
ActionOwner
Direct Known Subclasses:
VScrollTable.VScrollTableBody.VScrollTableGeneratedRow, VTreeTable.VTreeTableScrollBody.VTreeTableRow
Enclosing class:
VScrollTable.VScrollTableBody

public class VScrollTable.VScrollTableBody.VScrollTableRow
extends Panel
implements ActionOwner


Field Summary
protected  java.util.ArrayList<Widget> childWidgets
           
protected  int rowKey
           
 
Constructor Summary
VScrollTable.VScrollTableBody.VScrollTableRow()
          Add a dummy row, used for measurements if Table is empty.
VScrollTable.VScrollTableBody.VScrollTableRow(UIDL uidl, char[] aligns)
           
 
Method Summary
 void addCell(UIDL rowUidl, java.lang.String text, char align, java.lang.String style, boolean textIsHTML, boolean sorted)
           
 void addCell(UIDL rowUidl, java.lang.String text, char align, java.lang.String style, boolean textIsHTML, boolean sorted, java.lang.String description)
           
 void addCell(UIDL rowUidl, Widget w, char align, java.lang.String style, boolean sorted, java.lang.String description)
           
protected  void addCellsFromUIDL(UIDL uidl, char[] aligns, int col, int visibleColumnIndex)
           
 Action[] getActions()
           
 ApplicationConnection getClient()
           
 int getIndex()
           
 java.lang.String getKey()
           
 java.lang.String getPaintableId()
           
 TooltipInfo getTooltip(com.google.gwt.dom.client.Element target)
           
 TooltipInfo getTooltipInfo()
           
 Widget getWidgetForPaintable()
           
protected  void initCellWidths()
           
protected  void initCellWithText(java.lang.String text, char align, java.lang.String style, boolean textIsHTML, boolean sorted, java.lang.String description, TableCellElement td)
           
protected  void initCellWithWidget(Widget w, char align, java.lang.String style, boolean sorted, TableCellElement td)
           
 boolean isBefore(VScrollTable.VScrollTableBody.VScrollTableRow row1)
          Makes a check based on indexes whether the row is before the compared row.
 boolean isInViewPort()
          Detects whether row is visible in tables viewport.
protected  boolean isRenderHtmlInCells()
          Overriding this and returning true causes all text cells to be rendered as HTML.
 boolean isSelected()
          Has the row been selected?
 java.util.Iterator<Widget> iterator()
           
 void onBrowserEvent(Event event)
           
protected  void onDetach()
           
 boolean remove(Widget w)
           
protected  void setCellWidth(int cellIx, int width)
           
 void showContextMenu(Event event)
           
 void showContextMenu(int left, int top)
           
protected  void startRowDrag(Event event, int type, Element targetTdOrTr)
           
 void toggleSelection()
          Toggle the selection of the row
protected  void updateCellStyleNames(TableCellElement td, java.lang.String primaryStyleName)
           
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
 

Field Detail

childWidgets

protected java.util.ArrayList<Widget> childWidgets

rowKey

protected final int rowKey
Constructor Detail

VScrollTable.VScrollTableBody.VScrollTableRow

public VScrollTable.VScrollTableBody.VScrollTableRow(UIDL uidl,
                                                     char[] aligns)

VScrollTable.VScrollTableBody.VScrollTableRow

public VScrollTable.VScrollTableBody.VScrollTableRow()
Add a dummy row, used for measurements if Table is empty.

Method Detail

updateStyleNames

protected void updateStyleNames(java.lang.String primaryStyleName)

getTooltipInfo

public TooltipInfo getTooltipInfo()

initCellWidths

protected void initCellWidths()

setCellWidth

protected void setCellWidth(int cellIx,
                            int width)

addCellsFromUIDL

protected void addCellsFromUIDL(UIDL uidl,
                                char[] aligns,
                                int col,
                                int visibleColumnIndex)

isRenderHtmlInCells

protected boolean isRenderHtmlInCells()
Overriding this and returning true causes all text cells to be rendered as HTML.

Returns:
always returns false in the default implementation

isInViewPort

public boolean isInViewPort()
Detects whether row is visible in tables viewport.

Returns:

isBefore

public boolean isBefore(VScrollTable.VScrollTableBody.VScrollTableRow row1)
Makes a check based on indexes whether the row is before the compared row.

Parameters:
row1 -
Returns:
true if this rows index is smaller than in the row1

getIndex

public int getIndex()

onDetach

protected void onDetach()

getKey

public java.lang.String getKey()

addCell

public void addCell(UIDL rowUidl,
                    java.lang.String text,
                    char align,
                    java.lang.String style,
                    boolean textIsHTML,
                    boolean sorted)

addCell

public void addCell(UIDL rowUidl,
                    java.lang.String text,
                    char align,
                    java.lang.String style,
                    boolean textIsHTML,
                    boolean sorted,
                    java.lang.String description)

initCellWithText

protected void initCellWithText(java.lang.String text,
                                char align,
                                java.lang.String style,
                                boolean textIsHTML,
                                boolean sorted,
                                java.lang.String description,
                                TableCellElement td)

updateCellStyleNames

protected void updateCellStyleNames(TableCellElement td,
                                    java.lang.String primaryStyleName)

addCell

public void addCell(UIDL rowUidl,
                    Widget w,
                    char align,
                    java.lang.String style,
                    boolean sorted,
                    java.lang.String description)

initCellWithWidget

protected void initCellWithWidget(Widget w,
                                  char align,
                                  java.lang.String style,
                                  boolean sorted,
                                  TableCellElement td)

iterator

public java.util.Iterator<Widget> iterator()

remove

public boolean remove(Widget w)

getTooltip

public TooltipInfo getTooltip(com.google.gwt.dom.client.Element target)

onBrowserEvent

public void onBrowserEvent(Event event)

startRowDrag

protected void startRowDrag(Event event,
                            int type,
                            Element targetTdOrTr)

showContextMenu

public void showContextMenu(Event event)

showContextMenu

public void showContextMenu(int left,
                            int top)

isSelected

public boolean isSelected()
Has the row been selected?

Returns:
Returns true if selected, else false

toggleSelection

public void toggleSelection()
Toggle the selection of the row


getActions

public Action[] getActions()
Specified by:
getActions in interface ActionOwner
Returns:
Array of IActions

getClient

public ApplicationConnection getClient()
Specified by:
getClient in interface ActionOwner

getPaintableId

public java.lang.String getPaintableId()
Specified by:
getPaintableId in interface ActionOwner

getWidgetForPaintable

public Widget getWidgetForPaintable()


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