org.zkoss.zul
Class Row

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zk.ui.HtmlBasedComponent
          extended by org.zkoss.zul.impl.XulElement
              extended by org.zkoss.zul.Row
All Implemented Interfaces:
Serializable, Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.sys.ComponentCtrl
Direct Known Subclasses:
Group, Groupfoot

public class Row
extends XulElement

A single row in a Rows element. Each child of the Row element is placed in each successive cell of the grid. The row with the most child elements determines the number of columns in each row.

Default getZclass(): z-row. (since 3.5.0)

Author:
tomyeh
See Also:
Serialized Form

Nested Class Summary
protected  class Row.ExtraCtrl
          A utility class to implement HtmlBasedComponent.getExtraCtrl().
 
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children
 
Field Summary
 
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclass
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
 
Constructor Summary
Row()
           
 
Method Summary
 void beforeChildAdded(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)
           
 void beforeParentChanged(org.zkoss.zk.ui.Component parent)
           
 Object clone()
           
 String getAlign()
          Returns the horizontal alignment of the whole row.
 Detail getDetailChild()
          Returns the child detail component.
 Object getExtraCtrl()
           
 Grid getGrid()
          Returns the grid that contains this row.
 Group getGroup()
          Returns the group that this row belongs to, or null.
 int getIndex()
          Returns the index of the specified row.
 String getSclass()
          Returns the style class.
 String getSpans()
          Deprecated. As of release 5.0.0, use Cell instead.
 String getValign()
          Returns the vertical alignment of the whole row.
<T> T
getValue()
          Returns the value.
 String getZclass()
           
 boolean insertBefore(org.zkoss.zk.ui.Component newChild, org.zkoss.zk.ui.Component refChild)
           
 boolean isNowrap()
          Returns the nowrap.
 void onChildRemoved(org.zkoss.zk.ui.Component child)
           
protected  void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
           
 void setAlign(String align)
          Sets the horizontal alignment of the whole row.
 void setHflex(String flex)
          Deprecated. as of release 6.0.0. To control the size of Grid related components, please refer to Grid and Column instead.
 void setNowrap(boolean nowrap)
          Sets the nowrap.
 void setSpans(String spans)
          Deprecated. As of release 5.0.0, use Cell instead.
 void setValign(String valign)
          Sets the vertical alignment of the whole row.
<T> void
setValue(T value)
          Sets the value.
 boolean setVisible(boolean visible)
           
 void setWidth(String width)
          Deprecated. as of release 6.0.0. To control the size of Grid related components, please refer to Grid and Column instead.
 
Methods inherited from class org.zkoss.zul.impl.XulElement
getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
 
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeightDirectly, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTooltiptext, setTop, setTopDirectly, setVflex, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addScopeListener, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildRemoved, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableClientUpdate, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, removeScopeListener, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, willPassivate, willPassivate, willSerialize, willSerialize
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Row

public Row()
Method Detail

getDetailChild

public Detail getDetailChild()
Returns the child detail component.

Since:
3.5.0

getGrid

public Grid getGrid()
Returns the grid that contains this row.


getAlign

public String getAlign()
Returns the horizontal alignment of the whole row.

Default: null (system default: left unless CSS specified).


setAlign

public void setAlign(String align)
Sets the horizontal alignment of the whole row. Allowed values: right, left, center, justify, char


isNowrap

public boolean isNowrap()
Returns the nowrap.

Default: null (system default: wrap).


setNowrap

public void setNowrap(boolean nowrap)
Sets the nowrap.


getValign

public String getValign()
Returns the vertical alignment of the whole row.

Default: null (system default: top).


setValign

public void setValign(String valign)
Sets the vertical alignment of the whole row. Allowed values: top, middle, bottom, baseline


setVisible

public boolean setVisible(boolean visible)
Specified by:
setVisible in interface org.zkoss.zk.ui.Component
Overrides:
setVisible in class org.zkoss.zk.ui.AbstractComponent

getValue

public <T> T getValue()
Returns the value.

Default: null.

Note: the value is application dependent, you can place whatever value you want.


setValue

public <T> void setValue(T value)
Sets the value.

Parameters:
value - the value.

Note: the value is application dependent, you can place whatever value you want.


getSpans

public String getSpans()
Deprecated. As of release 5.0.0, use Cell instead.

Returns the spans, which is a list of numbers separated by comma.

Default: empty.


setSpans

public void setSpans(String spans)
              throws org.zkoss.zk.ui.WrongValueException
Deprecated. As of release 5.0.0, use Cell instead.

Sets the spans, which is a list of numbers separated by comma.

For example, "1,2,3" means the second column will span two columns and the following column span three columns, while others occupies one column.

Throws:
org.zkoss.zk.ui.WrongValueException

getIndex

public int getIndex()
Returns the index of the specified row.

Notice that the performance is not good if there are a lot of rows. Therefore, this method shall not be used with a huge grid.

Since:
6.0.0

getZclass

public String getZclass()
Overrides:
getZclass in class org.zkoss.zk.ui.HtmlBasedComponent

getGroup

public Group getGroup()
Returns the group that this row belongs to, or null.

Since:
3.5.0

setWidth

public void setWidth(String width)
Deprecated. as of release 6.0.0. To control the size of Grid related components, please refer to Grid and Column instead.

Overrides:
setWidth in class org.zkoss.zk.ui.HtmlBasedComponent

setHflex

public void setHflex(String flex)
Deprecated. as of release 6.0.0. To control the size of Grid related components, please refer to Grid and Column instead.

Overrides:
setHflex in class org.zkoss.zk.ui.HtmlBasedComponent

getSclass

public String getSclass()
Returns the style class. By default, it is the same as grid's stye class, unless HtmlBasedComponent.setSclass(java.lang.String) is called with non-empty value.

Overrides:
getSclass in class org.zkoss.zk.ui.HtmlBasedComponent

renderProperties

protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer)
                         throws IOException
Overrides:
renderProperties in class XulElement
Throws:
IOException

beforeParentChanged

public void beforeParentChanged(org.zkoss.zk.ui.Component parent)
Specified by:
beforeParentChanged in interface org.zkoss.zk.ui.sys.ComponentCtrl
Overrides:
beforeParentChanged in class org.zkoss.zk.ui.AbstractComponent

beforeChildAdded

public void beforeChildAdded(org.zkoss.zk.ui.Component newChild,
                             org.zkoss.zk.ui.Component refChild)
Specified by:
beforeChildAdded in interface org.zkoss.zk.ui.sys.ComponentCtrl
Overrides:
beforeChildAdded in class org.zkoss.zk.ui.AbstractComponent

insertBefore

public boolean insertBefore(org.zkoss.zk.ui.Component newChild,
                            org.zkoss.zk.ui.Component refChild)
Specified by:
insertBefore in interface org.zkoss.zk.ui.Component
Overrides:
insertBefore in class org.zkoss.zk.ui.AbstractComponent

onChildRemoved

public void onChildRemoved(org.zkoss.zk.ui.Component child)
Specified by:
onChildRemoved in interface org.zkoss.zk.ui.sys.ComponentCtrl
Overrides:
onChildRemoved in class org.zkoss.zk.ui.AbstractComponent

clone

public Object clone()
Specified by:
clone in interface org.zkoss.zk.ui.Component
Overrides:
clone in class XulElement

getExtraCtrl

public Object getExtraCtrl()
Specified by:
getExtraCtrl in interface org.zkoss.zk.ui.sys.ComponentCtrl
Overrides:
getExtraCtrl in class org.zkoss.zk.ui.HtmlBasedComponent


Copyright © 2014. All rights reserved.