Package com.vaadin.v7.client.ui
Class VScrollTable.VScrollTableBody.VScrollTableRow
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.vaadin.v7.client.ui.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,VTreeTable.VTreeTableScrollBody.VTreeTableRow
- Enclosing class:
- VScrollTable.VScrollTableBody
public class VScrollTable.VScrollTableBody.VScrollTableRow extends com.google.gwt.user.client.ui.Panel implements ActionOwner
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanapplyZeroWidthFixprotected List<com.google.gwt.user.client.ui.Widget>childWidgetsprotected introwKey
-
Constructor Summary
Constructors Constructor Description VScrollTableRow()Add a dummy row, used for measurements if Table is empty.VScrollTableRow(UIDL uidl, char[] aligns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCell(UIDL rowUidl, com.google.gwt.user.client.ui.Widget w, char align, String style, boolean sorted, String description)voidaddCell(UIDL rowUidl, String text, char align, String style, boolean textIsHTML, boolean sorted)voidaddCell(UIDL rowUidl, String text, char align, String style, boolean textIsHTML, boolean sorted, String description)protected voidaddCellsFromUIDL(UIDL uidl, char[] aligns, int col, int visibleColumnIndex)Action[]getActions()ApplicationConnectiongetClient()intgetIndex()StringgetKey()StringgetPaintableId()TooltipInfogetTooltip(com.google.gwt.dom.client.Element target)TooltipInfogetTooltipInfo()com.google.gwt.user.client.ui.WidgetgetWidgetForPaintable()protected voidinitCellWidths()protected voidinitCellWithText(String text, char align, String style, boolean textIsHTML, boolean sorted, String description, com.google.gwt.dom.client.TableCellElement td)protected voidinitCellWithWidget(com.google.gwt.user.client.ui.Widget w, char align, String style, boolean sorted, com.google.gwt.dom.client.TableCellElement td)booleanisBefore(VScrollTable.VScrollTableBody.VScrollTableRow row1)Makes a check based on indexes whether the row is before the compared row.booleanisInViewPort()Detects whether row is visible in tables viewport.protected booleanisRenderHtmlInCells()Overriding this and returning true causes all text cells to be rendered as HTML.booleanisSelected()Has the row been selected?Iterator<com.google.gwt.user.client.ui.Widget>iterator()voidonBrowserEvent(com.google.gwt.user.client.Event event)protected voidonDetach()booleanremove(com.google.gwt.user.client.ui.Widget w)protected voidsetCellWidth(int cellIx, int width)voidshowContextMenu(int left, int top)voidshowContextMenu(com.google.gwt.user.client.Event event)protected voidstartRowDrag(com.google.gwt.user.client.Event event, int type, com.google.gwt.dom.client.Element targetTdOrTr)voidtoggleSelection()Toggle the selection of the row.protected voidupdateCellStyleNames(com.google.gwt.dom.client.TableCellElement td, String primaryStyleName)protected voidupdateStyleNames(String primaryStyleName)-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, add, adopt, clear, 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, unsinkEvents
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
childWidgets
protected List<com.google.gwt.user.client.ui.Widget> childWidgets
-
rowKey
protected final int rowKey
-
applyZeroWidthFix
protected boolean applyZeroWidthFix
-
-
Constructor Detail
-
VScrollTableRow
public VScrollTableRow(UIDL uidl, char[] aligns)
-
VScrollTableRow
public VScrollTableRow()
Add a dummy row, used for measurements if Table is empty.
-
-
Method Detail
-
updateStyleNames
protected void updateStyleNames(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()
- Overrides:
onDetachin classcom.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)
-
updateCellStyleNames
protected void updateCellStyleNames(com.google.gwt.dom.client.TableCellElement td, String primaryStyleName)
-
addCell
public void addCell(UIDL rowUidl, com.google.gwt.user.client.ui.Widget w, char align, String style, boolean sorted, String description)
-
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()
-
remove
public boolean remove(com.google.gwt.user.client.ui.Widget w)
- Specified by:
removein interfacecom.google.gwt.user.client.ui.HasWidgets- Specified by:
removein classcom.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:
onBrowserEventin interfacecom.google.gwt.user.client.EventListener- Overrides:
onBrowserEventin classcom.google.gwt.user.client.ui.Widget
-
startRowDrag
protected void startRowDrag(com.google.gwt.user.client.Event event, int type, com.google.gwt.dom.client.Element targetTdOrTr)
-
showContextMenu
public void showContextMenu(com.google.gwt.user.client.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:
getActionsin interfaceActionOwner
-
getClient
public ApplicationConnection getClient()
- Specified by:
getClientin interfaceActionOwner
-
getPaintableId
public String getPaintableId()
- Specified by:
getPaintableIdin interfaceActionOwner
-
getWidgetForPaintable
public com.google.gwt.user.client.ui.Widget getWidgetForPaintable()
-
-