com.vaadin.terminal.gwt.client.ui.table
Class VScrollTable.VScrollTableBody.VScrollTableRow

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.vaadin.terminal.gwt.client.ui.table.VScrollTable.VScrollTableBody.VScrollTableRow
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.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, ActionOwner, Iterable<com.google.gwt.user.client.ui.Widget>
Direct Known Subclasses:
VScrollTable.VScrollTableBody.VScrollTableGeneratedRow
Enclosing class:
VScrollTable.VScrollTableBody

public class VScrollTable.VScrollTableBody.VScrollTableRow
extends com.google.gwt.user.client.ui.Panel
implements ActionOwner


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
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
protected  ArrayList<com.google.gwt.user.client.ui.Widget> childWidgets
           
protected  int rowKey
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
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, String text, char align, String style, boolean textIsHTML, boolean sorted)
           
 void addCell(UIDL rowUidl, String text, char align, String style, boolean textIsHTML, boolean sorted, String description)
           
 void addCell(UIDL rowUidl, com.google.gwt.user.client.ui.Widget w, char align, String style, boolean sorted)
           
protected  void addCellsFromUIDL(UIDL uidl, char[] aligns, int col, int visibleColumnIndex)
           
 Action[] getActions()
           
 ApplicationConnection getClient()
           
 int getIndex()
           
 String getKey()
           
 String getPaintableId()
           
 TooltipInfo getTooltip(com.google.gwt.dom.client.Element target)
           
 TooltipInfo getTooltipInfo()
           
 com.google.gwt.user.client.ui.Widget getWidgetForPaintable()
           
protected  void initCellWidths()
           
protected  void initCellWithText(String text, char align, String style, boolean textIsHTML, boolean sorted, String description, com.google.gwt.dom.client.TableCellElement td)
           
protected  void initCellWithWidget(com.google.gwt.user.client.ui.Widget w, char align, String style, boolean sorted, com.google.gwt.dom.client.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?
 Iterator<com.google.gwt.user.client.ui.Widget> iterator()
           
 void onBrowserEvent(com.google.gwt.user.client.Event event)
           
protected  void onDetach()
           
 boolean remove(com.google.gwt.user.client.ui.Widget w)
           
protected  void setCellWidth(int cellIx, int width)
           
 void showContextMenu(com.google.gwt.user.client.Event event)
           
protected  void startRowDrag(com.google.gwt.user.client.Event event, int type, com.google.gwt.user.client.Element targetTdOrTr)
           
 void toggleSelection()
          Toggle the selection of the row
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, 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, resolvePotentialElement, 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
 

Field Detail

childWidgets

protected ArrayList<com.google.gwt.user.client.ui.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

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()
Overrides:
onDetach in class com.google.gwt.user.client.ui.Widget

getKey

public String getKey()

addCell

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

addCell

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

initCellWithText

protected void initCellWithText(String text,
                                char align,
                                String style,
                                boolean textIsHTML,
                                boolean sorted,
                                String description,
                                com.google.gwt.dom.client.TableCellElement td)

addCell

public void addCell(UIDL rowUidl,
                    com.google.gwt.user.client.ui.Widget w,
                    char align,
                    String style,
                    boolean sorted)

initCellWithWidget

protected void initCellWithWidget(com.google.gwt.user.client.ui.Widget w,
                                  char align,
                                  String style,
                                  boolean sorted,
                                  com.google.gwt.dom.client.TableCellElement td)

iterator

public Iterator<com.google.gwt.user.client.ui.Widget> iterator()
Specified by:
iterator in interface com.google.gwt.user.client.ui.HasWidgets
Specified by:
iterator in interface Iterable<com.google.gwt.user.client.ui.Widget>

remove

public boolean remove(com.google.gwt.user.client.ui.Widget w)
Specified by:
remove in interface com.google.gwt.user.client.ui.HasWidgets
Specified by:
remove in class com.google.gwt.user.client.ui.Panel

getTooltip

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

onBrowserEvent

public void onBrowserEvent(com.google.gwt.user.client.Event event)
Specified by:
onBrowserEvent in interface com.google.gwt.user.client.EventListener
Overrides:
onBrowserEvent in class com.google.gwt.user.client.ui.Widget

startRowDrag

protected void startRowDrag(com.google.gwt.user.client.Event event,
                            int type,
                            com.google.gwt.user.client.Element targetTdOrTr)

showContextMenu

public void showContextMenu(com.google.gwt.user.client.Event event)

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 String getPaintableId()
Specified by:
getPaintableId in interface ActionOwner

getWidgetForPaintable

public com.google.gwt.user.client.ui.Widget getWidgetForPaintable()


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