LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.struts
Class LyStrutsToolBar

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.web.LyWebObject
          extended by leon.view.web.struts.LyStrutsToolBar
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalToolBar, LyViewComponent, LyFreeInterface, LySetColorInterface, LySetImageInterface, LyWebComponent

public class LyStrutsToolBar
extends LyWebObject
implements LyGraphicalToolBar

This class implements the ToolBar object (as described in the dtd) for web viewer.

TOOLBAR: Tool Bar
A tool bar allows displaying a set of action buttons. A tool bar can itself contain tool bars, which allows to group together the action buttons into logical groups and sub-groups.


Field Summary
static java.lang.String __VERSION
           
static boolean EXPAND_DASHBOARD
          Indicates if dashboards may be expanded.
static boolean HORIZONTAL_DASHBOARD
          Indicates if dashboards must be horizontal.
static boolean LABEL_WRAP
          Indicates if labels in the dashboards must be nowrap.
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Constructor Summary
LyStrutsToolBar(LyToolBar toolBar)
          Constructor.
 
Method Summary
 void addComponent(LyComponent component, int pos)
          (non-Javadoc).
 int[] computeSize()
          Computes the toolbar size.
 boolean containsLabel()
          Indicates if at least one of the tools of the toolbar contains a label.
 boolean isExpandable()
          Indicates if the toolbar is expandable or not.
 boolean isHorizontal()
          Indicates if the toolbar is horizontal or not.
 boolean isWrap()
          Indicates if the toolbar is wrapped or not.
 void refresh()
          (non-Javadoc).
 void removeComponent(LyComponent component)
          (non-Javadoc).
 void setColor(java.lang.String color)
          (non-Javadoc).
 void setImage(java.lang.String image)
          (non-Javadoc).
 void setOpen(boolean open)
          (non-Javadoc).
 void writeHtml(LyWebPageWriter pw)
          (non-Javadoc).
 
Methods inherited from class leon.view.web.LyWebObject
addFileScript, decodeUrl, displayUpPage, encodeUrl, encodeUrlXhtml, expandUrl, free, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, getScrollHeightForSplitter, getUrl, getWebViewManager, replaceUrl, replaceUrl, setUpdating, updateRefreshInfo, writeJson
 
Methods inherited from class leon.view.graphic.LyGraphicalObject
expand, getBounds, getChildrenBounds, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, getResource, getString, getString, getString, getViewComponent, getViewManager, isFreed, isFreeing, isImageAnimated, processDemand, processDemand, testResource, translate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface leon.view.graphic.LyGraphicalComponent
free, getViewComponent
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

HORIZONTAL_DASHBOARD

public static boolean HORIZONTAL_DASHBOARD
Indicates if dashboards must be horizontal.


EXPAND_DASHBOARD

public static boolean EXPAND_DASHBOARD
Indicates if dashboards may be expanded.


LABEL_WRAP

public static boolean LABEL_WRAP
Indicates if labels in the dashboards must be nowrap.

Constructor Detail

LyStrutsToolBar

public LyStrutsToolBar(LyToolBar toolBar)
Constructor.

Parameters:
toolBar - the tool bar component
Method Detail

writeHtml

public void writeHtml(LyWebPageWriter pw)
(non-Javadoc).

Specified by:
writeHtml in interface LyWebComponent
Parameters:
pw - the page writer
See Also:
LyWebComponent.writeHtml(leon.view.web.LyWebPageWriter)

setColor

public void setColor(java.lang.String color)
(non-Javadoc).

Specified by:
setColor in interface LyGraphicalToolBar
Specified by:
setColor in interface LySetColorInterface
Parameters:
color - New value of color.
See Also:
LySetColorInterface.setColor(java.lang.String)

isExpandable

public boolean isExpandable()
Indicates if the toolbar is expandable or not.

Returns:
false if dashboards can't be expanded id EXPAND_DASHBOARD is set to false or if the toolbar is horizontal or if its parent is a form field, true otherwise.

isHorizontal

public boolean isHorizontal()
Indicates if the toolbar is horizontal or not.

Returns:
true if the toolbar is horizontal, false otherwise

isWrap

public boolean isWrap()
Indicates if the toolbar is wrapped or not.

Returns:
true if the toolbar is wrapped, false otherwise.

containsLabel

public boolean containsLabel()
Indicates if at least one of the tools of the toolbar contains a label.

Returns:
true if at least one of the tools of the toolbar contains a label, false otherwise

computeSize

public int[] computeSize()
Computes the toolbar size.

Returns:
an array where width is at position 0 and height at position 1

setOpen

public void setOpen(boolean open)
(non-Javadoc).

Specified by:
setOpen in interface LyGraphicalToolBar
Parameters:
open - Boolean indicating if attribute open is set or unset.
See Also:
LyGraphicalToolBar.setOpen(boolean)

setImage

public void setImage(java.lang.String image)
(non-Javadoc).

Specified by:
setImage in interface LyGraphicalToolBar
Specified by:
setImage in interface LySetImageInterface
Parameters:
image - New value of image.
See Also:
LySetImageInterface.setImage(java.lang.String)

addComponent

public void addComponent(LyComponent component,
                         int pos)
(non-Javadoc).

Specified by:
addComponent in interface LyGraphicalToolBar
Parameters:
component - The components to add to components list.
pos - Position where the sub-component is inserted.
See Also:
LyGraphicalToolBar.addComponent(leon.view.LyComponent, int)

removeComponent

public void removeComponent(LyComponent component)
(non-Javadoc).

Specified by:
removeComponent in interface LyGraphicalToolBar
Parameters:
component - The components to remove to components list.
See Also:
LyGraphicalToolBar.removeComponent(leon.view.LyComponent)

refresh

public void refresh()
(non-Javadoc).

Overrides:
refresh in class LyWebObject
See Also:
LyWebObject.refresh()

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com