com.vaadin.terminal.gwt.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.terminal.gwt.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.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Container, Paintable, ActionOwner, Iterable<com.google.gwt.user.client.ui.Widget>
Direct Known Subclasses:
Enclosing class:
- extends com.google.gwt.user.client.ui.Panel
- implements ActionOwner, Container
public class VScrollTable.VScrollTableBody.VScrollTableRow
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()
|
RenderSpace |
getAllocatedSpace(com.google.gwt.user.client.ui.Widget child)
Returns the size currently allocated for the child component. |
ApplicationConnection |
getClient()
|
int |
getIndex()
|
String |
getKey()
|
String |
getPaintableId()
|
boolean |
hasChildComponent(com.google.gwt.user.client.ui.Widget component)
Is a given component child of this layout. |
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()
|
protected void |
onAttach()
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
|
protected void |
onDetach()
|
protected void |
paintComponent(Paintable p,
UIDL uidl)
|
boolean |
remove(com.google.gwt.user.client.ui.Widget w)
|
void |
replaceChildComponent(com.google.gwt.user.client.ui.Widget oldComponent,
com.google.gwt.user.client.ui.Widget newComponent)
Replace child of this layout with another component. |
boolean |
requestLayout(Set<Paintable> children)
Called when a child components size has been updated in the rendering phase. |
protected void |
setCellWidth(int cellIx,
int width)
|
void |
showContextMenu(com.google.gwt.user.client.Event event)
|
protected void |
showContextMenu(int left,
int top)
|
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 |
void |
updateCaption(Paintable component,
UIDL uidl)
Update child components caption, description and error message. |
void |
updateFromUIDL(UIDL uidl,
ApplicationConnection client)
|
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, 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 |
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 |
---|
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()
- Returns:
- always returns false in the default implementation
Overriding this and returning true causes all text cells to be rendered as HTML.
isInViewPort
public boolean isInViewPort()
- Returns:
Detects whether row is visible in tables viewport.
isBefore
public boolean isBefore(VScrollTable.VScrollTableBody.VScrollTableRow row1)
- Parameters:
row1
-- Returns:
- true if this rows index is smaller than in the row1
Makes a check based on indexes whether the row is before the compared row.
getIndex
public int getIndex()
paintComponent
protected void paintComponent(Paintable p,
UIDL uidl)
onAttach
protected void onAttach()
- Overrides:
onAttach
in classcom.google.gwt.user.client.ui.Widget
onDetach
protected void onDetach()
- Overrides:
onDetach
in 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)
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 interfacecom.google.gwt.user.client.ui.HasWidgets
- Specified by:
iterator
in interfaceIterable<com.google.gwt.user.client.ui.Widget>
remove
public boolean remove(com.google.gwt.user.client.ui.Widget w)
- Specified by:
remove
in interfacecom.google.gwt.user.client.ui.HasWidgets
- Specified by:
remove
in classcom.google.gwt.user.client.ui.Panel
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
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)
showContextMenu
protected void showContextMenu(int left,
int top)
isSelected
public boolean isSelected()
- Returns:
- Returns true if selected, else false
Has the row been selected?
toggleSelection
public void toggleSelection()
Toggle the selection of the row
getActions
public Action[] getActions()
- Specified by:
getActions
in interfaceActionOwner
- Returns:
- Array of IActions
getClient
public ApplicationConnection getClient()
- Specified by:
getClient
in interfaceActionOwner
getPaintableId
public String getPaintableId()
- Specified by:
getPaintableId
in interfaceActionOwner
getAllocatedSpace
public RenderSpace getAllocatedSpace(com.google.gwt.user.client.ui.Widget child)
- Specified by:
getAllocatedSpace
in interfaceContainer
- Returns:
Description copied from interface: Container
Returns the size currently allocated for the child component.
hasChildComponent
public boolean hasChildComponent(com.google.gwt.user.client.ui.Widget component)
- Specified by:
hasChildComponent
in interfaceContainer
- Parameters:
component
- Component to test.- Returns:
- true iff component is a child of this layout.
Description copied from interface: Container
Is a given component child of this layout.
replaceChildComponent
public void replaceChildComponent(com.google.gwt.user.client.ui.Widget oldComponent,
com.google.gwt.user.client.ui.Widget newComponent)
- Specified by:
replaceChildComponent
in interfaceContainer
- Parameters:
oldComponent
- Child to be replacednewComponent
- Child that replaces the oldComponent
Description copied from interface: Container
Replace child of this layout with another component. Each layout must be able to switch children. To to this, one must just give references to a current and new child.
requestLayout
public boolean requestLayout(Set<Paintable> children)
- Specified by:
requestLayout
in interfaceContainer
- Parameters:
children
- Set of child widgets whose size have changed- Returns:
- true if the size of the Container remains the same, false if the event need to be propagated to the Containers parent
Description copied from interface: Container
Called when a child components size has been updated in the rendering phase.
updateCaption
public void updateCaption(Paintable component,
UIDL uidl)
- Specified by:
updateCaption
in interfaceContainer
- Parameters:
component
- Child component for which service is requested.uidl
- UIDL of the child component.
Description copied from interface: Container
Update child components caption, description and error message.
Each component is responsible for maintaining its caption, description and error message. In most cases components doesn't want to do that and those elements reside outside of the component. Because of this layouts must provide service for it's childen to show those elements for them.
updateFromUIDL
public void updateFromUIDL(UIDL uidl,
ApplicationConnection client)
- Specified by:
updateFromUIDL
in interfacePaintable