org.apache.myfaces.tobago.component
Class UIToolBar

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIPanel
              extended by org.apache.myfaces.tobago.internal.component.AbstractUIToolBar
                  extended by org.apache.myfaces.tobago.component.UIToolBar
All Implemented Interfaces:
javax.faces.component.StateHolder, SupportsMarkup, Configurable, LayoutBase, LayoutComponent

public class UIToolBar
extends AbstractUIToolBar
implements SupportsMarkup

Renders a toolbar.

Allowed subcomponents are subtypes of UICommand i.e. 'button' and 'link' tags. These are rendered by ToolbarRenderer, so the result has no difference.

To add an drop down menu to a button add a facet 'dropDownMenu' containing a <tc:menu> tag to the button. Label's and Image's on those menu tag's are ignored and replaced by the renderer.

       <tc:button onclick="alert('test 0')"
           label="Alert 0" >
         <f:facet name="dropDownMenu">
           <tc:menu>
             <tc:menuCommand onclick="alert('test 1')" label="Alert 1"/>
             <tc:menuCommand onclick="alert('test 2')" label="Alert 2"/>
             <tc:menuCommand onclick="alert('test 3')" label="Alert 3"/>
           </tc:menu>
         </f:facet>
       </tc:button>
       
UIComponent class, generated from template component1.2.stg with class ToolBarTagDeclaration.


Field Summary
static String COMPONENT_TYPE
           
 
Fields inherited from class org.apache.myfaces.tobago.internal.component.AbstractUIToolBar
ICON_BIG, ICON_OFF, ICON_SMALL, LABEL_BOTTOM, LABEL_OFF, LABEL_RIGHT, ORIENTATION_LEFT, ORIENTATION_RIGHT
 
Fields inherited from class javax.faces.component.UIPanel
COMPONENT_FAMILY
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
UIToolBar()
           
 
Method Summary
 Measure getBorderBottom()
          This attribute is for internal use only.
 Measure getBorderLeft()
          This attribute is for internal use only.
 Measure getBorderRight()
          This attribute is for internal use only.
 Measure getBorderTop()
          This attribute is for internal use only.
 Integer getColumnSpan()
           
 Measure getCurrentHeight()
          This value will usually be set by the layout manager.
 Markup getCurrentMarkup()
           
 Measure getCurrentWidth()
          This value will usually be set by the layout manager.
 Display getDisplay()
          This attribute is for internal use only.
 Measure getHeight()
          This value will usually be set by the layout manager.
 Integer getHorizontalIndex()
          This attribute is for internal use only.
 String getIconSize()
          Size of button images, possible values are: small, big, off.
 String getLabelPosition()
          Position of the button label, possible values are: right, bottom, off.
 Measure getLeft()
          This value will usually be set by the layout manager.
 Measure getMarginBottom()
           
 Measure getMarginLeft()
           
 Measure getMarginRight()
           
 Measure getMarginTop()
           
 Markup getMarkup()
           
 Measure getMaximumHeight()
           
 Measure getMaximumWidth()
           
 Measure getMinimumHeight()
           
 Measure getMinimumWidth()
           
 String getOrientation()
          Orientation of toolbar
Default: left
Allowed Values: left,right
 Measure getPaddingBottom()
          This attribute is for internal use only.
 Measure getPaddingLeft()
          This attribute is for internal use only.
 Measure getPaddingRight()
          This attribute is for internal use only.
 Measure getPaddingTop()
          This attribute is for internal use only.
 Measure getPreferredHeight()
           
 Measure getPreferredWidth()
           
 Integer getRowSpan()
           
 String getTip()
          Text value to display as tooltip.
 Measure getTop()
          This value will usually be set by the layout manager.
 Integer getVerticalIndex()
          This attribute is for internal use only.
 Measure getWidth()
          This value will usually be set by the layout manager.
 boolean isOverflowX()
          This attribute is for internal use only.
 boolean isOverflowY()
          This attribute is for internal use only.
 void restoreState(javax.faces.context.FacesContext context, Object componentState)
           
 Object saveState(javax.faces.context.FacesContext context)
           
 void setBorderBottom(Measure borderBottom)
           
 void setBorderLeft(Measure borderLeft)
           
 void setBorderRight(Measure borderRight)
           
 void setBorderTop(Measure borderTop)
           
 void setColumnSpan(Integer columnSpan)
           
 void setCurrentHeight(Measure currentHeight)
           
 void setCurrentMarkup(Markup currentMarkup)
           
 void setCurrentWidth(Measure currentWidth)
           
 void setDisplay(Display display)
           
 void setHeight(Measure height)
           
 void setHorizontalIndex(Integer horizontalIndex)
           
 void setIconSize(String iconSize)
           
 void setLabelPosition(String labelPosition)
           
 void setLeft(Measure left)
           
 void setMarginBottom(Measure marginBottom)
           
 void setMarginLeft(Measure marginLeft)
           
 void setMarginRight(Measure marginRight)
           
 void setMarginTop(Measure marginTop)
           
 void setMarkup(Markup markup)
           
 void setMaximumHeight(Measure maximumHeight)
           
 void setMaximumWidth(Measure maximumWidth)
           
 void setMinimumHeight(Measure minimumHeight)
           
 void setMinimumWidth(Measure minimumWidth)
           
 void setOrientation(String orientation)
           
 void setOverflowX(boolean overflowX)
           
 void setOverflowY(boolean overflowY)
           
 void setPaddingBottom(Measure paddingBottom)
           
 void setPaddingLeft(Measure paddingLeft)
           
 void setPaddingRight(Measure paddingRight)
           
 void setPaddingTop(Measure paddingTop)
           
 void setPreferredHeight(Measure preferredHeight)
           
 void setPreferredWidth(Measure preferredWidth)
           
 void setRowSpan(Integer rowSpan)
           
 void setTip(String tip)
           
 void setTop(Measure top)
           
 void setVerticalIndex(Integer verticalIndex)
           
 void setWidth(Measure width)
           
 
Methods inherited from class javax.faces.component.UIPanel
getFamily
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.myfaces.tobago.layout.LayoutComponent
isRendered
 
Methods inherited from interface org.apache.myfaces.tobago.config.Configurable
getRendererType
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

UIToolBar

public UIToolBar()
Method Detail

getMarkup

public Markup getMarkup()
Specified by:
getMarkup in interface SupportsMarkup

setMarkup

public void setMarkup(Markup markup)
Specified by:
setMarkup in interface SupportsMarkup

getMarginLeft

public Measure getMarginLeft()
Specified by:
getMarginLeft in interface LayoutBase

setMarginLeft

public void setMarginLeft(Measure marginLeft)
Specified by:
setMarginLeft in interface LayoutBase

getMinimumHeight

public Measure getMinimumHeight()
Specified by:
getMinimumHeight in interface LayoutBase

setMinimumHeight

public void setMinimumHeight(Measure minimumHeight)
Specified by:
setMinimumHeight in interface LayoutBase

getBorderLeft

public Measure getBorderLeft()
This attribute is for internal use only.


setBorderLeft

public void setBorderLeft(Measure borderLeft)

getTip

public String getTip()
Text value to display as tooltip.


setTip

public void setTip(String tip)

getHeight

public Measure getHeight()
This value will usually be set by the layout manager.

Specified by:
getHeight in interface LayoutBase

setHeight

public void setHeight(Measure height)
Specified by:
setHeight in interface LayoutBase

getMinimumWidth

public Measure getMinimumWidth()
Specified by:
getMinimumWidth in interface LayoutBase

setMinimumWidth

public void setMinimumWidth(Measure minimumWidth)
Specified by:
setMinimumWidth in interface LayoutBase

isOverflowX

public boolean isOverflowX()
This attribute is for internal use only.


setOverflowX

public void setOverflowX(boolean overflowX)

getRowSpan

public Integer getRowSpan()
Specified by:
getRowSpan in interface LayoutComponent

setRowSpan

public void setRowSpan(Integer rowSpan)
Specified by:
setRowSpan in interface LayoutComponent

isOverflowY

public boolean isOverflowY()
This attribute is for internal use only.


setOverflowY

public void setOverflowY(boolean overflowY)

getLeft

public Measure getLeft()
This value will usually be set by the layout manager.

Specified by:
getLeft in interface LayoutBase

setLeft

public void setLeft(Measure left)
Specified by:
setLeft in interface LayoutBase

getColumnSpan

public Integer getColumnSpan()
Specified by:
getColumnSpan in interface LayoutComponent

setColumnSpan

public void setColumnSpan(Integer columnSpan)
Specified by:
setColumnSpan in interface LayoutComponent

getBorderRight

public Measure getBorderRight()
This attribute is for internal use only.


setBorderRight

public void setBorderRight(Measure borderRight)

getPaddingBottom

public Measure getPaddingBottom()
This attribute is for internal use only.


setPaddingBottom

public void setPaddingBottom(Measure paddingBottom)

getMaximumHeight

public Measure getMaximumHeight()
Specified by:
getMaximumHeight in interface LayoutBase

setMaximumHeight

public void setMaximumHeight(Measure maximumHeight)
Specified by:
setMaximumHeight in interface LayoutBase

getTop

public Measure getTop()
This value will usually be set by the layout manager.

Specified by:
getTop in interface LayoutBase

setTop

public void setTop(Measure top)
Specified by:
setTop in interface LayoutBase

getOrientation

public String getOrientation()
Orientation of toolbar
Default: left
Allowed Values: left,right


setOrientation

public void setOrientation(String orientation)

getCurrentWidth

public Measure getCurrentWidth()
This value will usually be set by the layout manager. It holds the current width computed by the layout manager.

Specified by:
getCurrentWidth in interface LayoutBase

setCurrentWidth

public void setCurrentWidth(Measure currentWidth)
Specified by:
setCurrentWidth in interface LayoutBase

getPaddingTop

public Measure getPaddingTop()
This attribute is for internal use only.


setPaddingTop

public void setPaddingTop(Measure paddingTop)

getMarginTop

public Measure getMarginTop()
Specified by:
getMarginTop in interface LayoutBase

setMarginTop

public void setMarginTop(Measure marginTop)
Specified by:
setMarginTop in interface LayoutBase

getMarginRight

public Measure getMarginRight()
Specified by:
getMarginRight in interface LayoutBase

setMarginRight

public void setMarginRight(Measure marginRight)
Specified by:
setMarginRight in interface LayoutBase

getWidth

public Measure getWidth()
This value will usually be set by the layout manager.

Specified by:
getWidth in interface LayoutBase

setWidth

public void setWidth(Measure width)
Specified by:
setWidth in interface LayoutBase

getCurrentHeight

public Measure getCurrentHeight()
This value will usually be set by the layout manager. It holds the current height computed by the layout manager.

Specified by:
getCurrentHeight in interface LayoutBase

setCurrentHeight

public void setCurrentHeight(Measure currentHeight)
Specified by:
setCurrentHeight in interface LayoutBase

getPreferredHeight

public Measure getPreferredHeight()
Specified by:
getPreferredHeight in interface LayoutBase

setPreferredHeight

public void setPreferredHeight(Measure preferredHeight)
Specified by:
setPreferredHeight in interface LayoutBase

getLabelPosition

public String getLabelPosition()
Position of the button label, possible values are: right, bottom, off. If toolbar is facet of box: bottom is changed to right!
Default: bottom
Allowed Values: bottom,right,off


setLabelPosition

public void setLabelPosition(String labelPosition)

getDisplay

public Display getDisplay()
This attribute is for internal use only.

Specified by:
getDisplay in interface LayoutComponent

setDisplay

public void setDisplay(Display display)
Specified by:
setDisplay in interface LayoutComponent

getBorderBottom

public Measure getBorderBottom()
This attribute is for internal use only.


setBorderBottom

public void setBorderBottom(Measure borderBottom)

getMaximumWidth

public Measure getMaximumWidth()
Specified by:
getMaximumWidth in interface LayoutBase

setMaximumWidth

public void setMaximumWidth(Measure maximumWidth)
Specified by:
setMaximumWidth in interface LayoutBase

getPaddingLeft

public Measure getPaddingLeft()
This attribute is for internal use only.


setPaddingLeft

public void setPaddingLeft(Measure paddingLeft)

getPaddingRight

public Measure getPaddingRight()
This attribute is for internal use only.


setPaddingRight

public void setPaddingRight(Measure paddingRight)

getPreferredWidth

public Measure getPreferredWidth()
Specified by:
getPreferredWidth in interface LayoutBase

setPreferredWidth

public void setPreferredWidth(Measure preferredWidth)
Specified by:
setPreferredWidth in interface LayoutBase

getMarginBottom

public Measure getMarginBottom()
Specified by:
getMarginBottom in interface LayoutBase

setMarginBottom

public void setMarginBottom(Measure marginBottom)
Specified by:
setMarginBottom in interface LayoutBase

getIconSize

public String getIconSize()
Size of button images, possible values are: small, big, off.
Default: small
Allowed Values: small,big,off


setIconSize

public void setIconSize(String iconSize)

getVerticalIndex

public Integer getVerticalIndex()
This attribute is for internal use only.

Specified by:
getVerticalIndex in interface LayoutComponent

setVerticalIndex

public void setVerticalIndex(Integer verticalIndex)
Specified by:
setVerticalIndex in interface LayoutComponent

getBorderTop

public Measure getBorderTop()
This attribute is for internal use only.


setBorderTop

public void setBorderTop(Measure borderTop)

getCurrentMarkup

public Markup getCurrentMarkup()
Specified by:
getCurrentMarkup in interface SupportsMarkup
Specified by:
getCurrentMarkup in interface Configurable

setCurrentMarkup

public void setCurrentMarkup(Markup currentMarkup)
Specified by:
setCurrentMarkup in interface SupportsMarkup

getHorizontalIndex

public Integer getHorizontalIndex()
This attribute is for internal use only.

Specified by:
getHorizontalIndex in interface LayoutComponent

setHorizontalIndex

public void setHorizontalIndex(Integer horizontalIndex)
Specified by:
setHorizontalIndex in interface LayoutComponent

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         Object componentState)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.