com.esri.adf.web.faces.component
Class ToolbarControl

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by com.esri.adf.web.faces.component.UIToolbar
              extended by com.esri.adf.web.faces.component.ToolbarControl
All Implemented Interfaces:
javax.faces.component.StateHolder

public class ToolbarControl
extends UIToolbar

The Toolbar control displays the tool bar items that are associated with it. It is also responsible for rendering its child control. For example, the child control can be Tool, Command, SelectOne, or Separator. The orientation of the Toolbar control can be changed. Possible values for the orientation are VERTICAL or HORIZONTAL. By default the orientation is HORIZONTAL.


Field Summary
static String BOTTOM_TEXT_POSITION
          The text is displayed at the bottom of the image if the tool bar style is IMAGEANDTEXT.
static String DEFAULT_XSL_FILE_NAME
          The name of the XSL file used to render this control by default.
static String IMAGE_TOOLBAR_STYLE
          Only Image is displayed if the toolbar style is IMAGEONLY.
static String IMAGEANDTEXT_TOOLBAR_STYLE
          Both image and text are displayed if the toolbar style is IMAGEANDTEXT.
static String LEFT_TEXT_POSITION
          The text is displayed to the left of the image if the tool bar style is IMAGEANDTEXT.
static String ORIENTATION_HORIZONTAL
          The default orientation of the toolbar control.
static String ORIENTATION_VERTICAL
          The vertical orientation of the toolbar control.
static String RIGHT_TEXT_POSITION
          The text is displayed to the right of the image if the tool bar style is IMAGEANDTEXT.
static String TEXT_TOOLBAR_STYLE
          Only text is displayed if the toolbar style is TEXTONLY.
static String TOP_TEXT_POSITION
          The text is displayed at the top of the image if the tool bar style is IMAGEANDTEXT.
 
Fields inherited from class com.esri.adf.web.faces.component.UIToolbar
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
ToolbarControl()
           
 
Method Summary
 String getDefaultStyle()
          Returns the default style for the child control.
 String getDisabledStyle()
          Returns the disabled style for the child control.
 String getHoverStyle()
          Returns the hover style for the child control.
 String getOrientation()
          Returns the orientation of the control.
protected  javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext context)
          Returns a design-time renderer if the component is used in an IDE.
 boolean getRendersChildren()
          Returns a flag indicating whether or not this component is responsible for rendering its child components.
 String getSelectedStyle()
          Returns the selected style for the child control.
 String getStyle()
          Returns the style attributes of toolbar control.
 String getStyleClass()
          Returns the file name where the CSS style attributes are defined.
 String getTextPosition()
          Returns the text position for this control.
 String getToolbarStyle()
          Returns the toolbar style for this control.
 void restoreState(javax.faces.context.FacesContext facesContext, Object state)
          Restores the state of the control.
 Object saveState(javax.faces.context.FacesContext facesContext)
          Saves the state of this control.
 void setDefaultStyle(String defaultStyle)
          Sets the default style for the child control.
 void setDisabledStyle(String disabledStyle)
          Sets the disabled style for the child control.
 void setHoverStyle(String hoverStyle)
          Sets the hover style for the child control.
 void setOrientation(String orientation)
          Sets the orientation of the control.
 void setSelectedStyle(String selectedStyle)
          Sets the selected style for the child control.
 void setStyle(String style)
          Sets the default style for the toolbar control.
 void setStyleClass(String styleClass)
          Sets the CSS class name where the CSS style attributes are defined.
 void setTextPosition(String textPosition)
          Sets the text position for this control.
 void setToolbarStyle(String toolbarStyle)
          Sets the toolbar style for this control.
 
Methods inherited from class com.esri.adf.web.faces.component.UIToolbar
getActiveTool, getFamily, getMapId, getXslFile, getXslUrl, isInit, setActiveTool, setInit, setMapId, setXslFile, setXslUrl
 
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, getRendererType, 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
 

Field Detail

DEFAULT_XSL_FILE_NAME

public static final String DEFAULT_XSL_FILE_NAME
The name of the XSL file used to render this control by default.

See Also:
Constant Field Values

ORIENTATION_HORIZONTAL

public static final String ORIENTATION_HORIZONTAL
The default orientation of the toolbar control.

See Also:
Constant Field Values

ORIENTATION_VERTICAL

public static final String ORIENTATION_VERTICAL
The vertical orientation of the toolbar control.

See Also:
Constant Field Values

TOP_TEXT_POSITION

public static final String TOP_TEXT_POSITION
The text is displayed at the top of the image if the tool bar style is IMAGEANDTEXT.

See Also:
Constant Field Values

LEFT_TEXT_POSITION

public static final String LEFT_TEXT_POSITION
The text is displayed to the left of the image if the tool bar style is IMAGEANDTEXT.

See Also:
Constant Field Values

BOTTOM_TEXT_POSITION

public static final String BOTTOM_TEXT_POSITION
The text is displayed at the bottom of the image if the tool bar style is IMAGEANDTEXT.

See Also:
Constant Field Values

RIGHT_TEXT_POSITION

public static final String RIGHT_TEXT_POSITION
The text is displayed to the right of the image if the tool bar style is IMAGEANDTEXT.

See Also:
Constant Field Values

IMAGEANDTEXT_TOOLBAR_STYLE

public static final String IMAGEANDTEXT_TOOLBAR_STYLE
Both image and text are displayed if the toolbar style is IMAGEANDTEXT.

See Also:
Constant Field Values

TEXT_TOOLBAR_STYLE

public static final String TEXT_TOOLBAR_STYLE
Only text is displayed if the toolbar style is TEXTONLY.

See Also:
Constant Field Values

IMAGE_TOOLBAR_STYLE

public static final String IMAGE_TOOLBAR_STYLE
Only Image is displayed if the toolbar style is IMAGEONLY.

See Also:
Constant Field Values
Constructor Detail

ToolbarControl

public ToolbarControl()
Method Detail

getRendersChildren

public boolean getRendersChildren()
Returns a flag indicating whether or not this component is responsible for rendering its child components.

Overrides:
getRendersChildren in class javax.faces.component.UIComponentBase
Returns:
boolean- true always since this control is responsible for rendering its child components

getRenderer

protected javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext context)
Returns a design-time renderer if the component is used in an IDE.

Overrides:
getRenderer in class javax.faces.component.UIComponentBase
Parameters:
context - the FacesContext
Returns:
Renderer- the renderer object

getStyle

public String getStyle()
Returns the style attributes of toolbar control.

Returns:
String- the style attributes

setStyle

public void setStyle(String style)
Sets the default style for the toolbar control.

Parameters:
style - the default style for the toolbar control

getStyleClass

public String getStyleClass()
Returns the file name where the CSS style attributes are defined.

Returns:
String- the CSS class

setStyleClass

public void setStyleClass(String styleClass)
Sets the CSS class name where the CSS style attributes are defined.

Parameters:
styleClass - the CSS class

getOrientation

public String getOrientation()
Returns the orientation of the control.

Returns:
String- the orientation of the control

setOrientation

public void setOrientation(String orientation)
Sets the orientation of the control.

Parameters:
orientation - the orientation of the control

getDefaultStyle

public String getDefaultStyle()
Returns the default style for the child control.

Returns:
String- the default style string

setDefaultStyle

public void setDefaultStyle(String defaultStyle)
Sets the default style for the child control.

Parameters:
defaultStyle - the default style value

getHoverStyle

public String getHoverStyle()
Returns the hover style for the child control.

Returns:
String- the hover style

setHoverStyle

public void setHoverStyle(String hoverStyle)
Sets the hover style for the child control.

Parameters:
hoverStyle - the hover style value

getDisabledStyle

public String getDisabledStyle()
Returns the disabled style for the child control.

Returns:
String- the disabled style

setDisabledStyle

public void setDisabledStyle(String disabledStyle)
Sets the disabled style for the child control.

Parameters:
disabledStyle - the disabled style value

getSelectedStyle

public String getSelectedStyle()
Returns the selected style for the child control.

Returns:
String- the selected style

setSelectedStyle

public void setSelectedStyle(String selectedStyle)
Sets the selected style for the child control.

Parameters:
selectedStyle - the selected style value

getToolbarStyle

public String getToolbarStyle()
Returns the toolbar style for this control. Styles are IMAGEANDTEXT, IMAGEONLY, or TEXTONLY.

Returns:
String- the toolbar style

setToolbarStyle

public void setToolbarStyle(String toolbarStyle)
Sets the toolbar style for this control. Styles are IMAGEANDTEXT, IMAGEONLY or TEXTONLY.

Parameters:
toolbarStyle - the toolbar style

getTextPosition

public String getTextPosition()
Returns the text position for this control. Positions are LEFT, TOP, BOTTOM, or RIGHT.

Returns:
String- the text position for the toolbar control

setTextPosition

public void setTextPosition(String textPosition)
Sets the text position for this control. Positions are LEFT, TOP, BOTTOM, or RIGHT.

Parameters:
textPosition - the text position for the toolbar control

saveState

public Object saveState(javax.faces.context.FacesContext facesContext)
Saves the state of this control.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class UIToolbar
Parameters:
facesContext - the associated FacesContext
Returns:
Object- the object to be saved

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         Object state)
Restores the state of the control.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class UIToolbar
Parameters:
facesContext - the associated FacesContext
state - the object to restore the state of the control from