LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.struts
Class LyStrutsTool

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.web.LyWebObject
          extended by leon.view.web.struts.LyStrutsTool
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalPanel, LyGraphicalTool, LyViewComponent, LyFreeInterface, LySetEnabledInterface, LySetImageInterface, LySetLabelInterface, LyWebComponent

public class LyStrutsTool
extends LyWebObject
implements LyGraphicalTool

This class implements the Tool object (as described in the dtd) for struts viewer.

TOOL: Action Button
An action button allows executing an action. In the case where the button contains an area (AREA), this area is displayed in a new window when launching the action.


Field Summary
static java.lang.String __VERSION
           
static boolean GENERATE_HREF
          Indicates whether an hyperlink element must be generated around tool.
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Constructor Summary
LyStrutsTool(LyTool tool)
          Constructor.
 
Method Summary
 void initialize()
          Initialization method.
 boolean isEnabled()
          Indicates if the tool is enabele or not.
 void refresh()
          (non-Javadoc).
 void setEnabled(boolean status)
          (non-Javadoc).
 void setImage(java.lang.String key)
          (non-Javadoc).
 void setLabel(java.lang.String label)
          (non-Javadoc).
 void setPressed(boolean pressed)
          Updates attribute pressed to the given value.
 void setTooltip(java.lang.String tooltip)
          Sets the tool tooltip.
 void writeHtml(LyWebPageWriter pw)
          (non-Javadoc).
 void writeHtml(LyWebPageWriter pw, boolean writeDiv)
          Write HTML description corresponding to this tool.
 
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

GENERATE_HREF

public static boolean GENERATE_HREF
Indicates whether an hyperlink element must be generated around tool. This hyperlink is used to launch tool action with the keyboard by using tab and Enter keys.

Constructor Detail

LyStrutsTool

public LyStrutsTool(LyTool tool)
Constructor.

Parameters:
tool - the tool component
Method Detail

initialize

public void initialize()
Initialization method.
Sets the font name and size with default values or with values defined in resources (LY_BUTTON_FONT) Sets the tool font background color with resource value (LY_TOOL_LABEL_COLOR).
Sets the on mouse over label color with the value defined in resources files (LY_TOOL_LABEL_HIGHLIGHT_COLOR).


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)

writeHtml

public void writeHtml(LyWebPageWriter pw,
                      boolean writeDiv)
Write HTML description corresponding to this tool.

Parameters:
pw - the page writer.
writeDiv - indicates whether div tags must be generated or not.
See Also:
writeHtml(leon.view.web.LyWebPageWriter)

refresh

public void refresh()
(non-Javadoc).

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

isEnabled

public boolean isEnabled()
Indicates if the tool is enabele or not.

Returns:
true if the tool is enable, false otherwise.

setLabel

public void setLabel(java.lang.String label)
(non-Javadoc).

Specified by:
setLabel in interface LyGraphicalTool
Specified by:
setLabel in interface LySetLabelInterface
Parameters:
label - New value of label.
See Also:
LySetLabelInterface.setLabel(java.lang.String)

setEnabled

public void setEnabled(boolean status)
(non-Javadoc).

Specified by:
setEnabled in interface LyGraphicalTool
Specified by:
setEnabled in interface LySetEnabledInterface
Parameters:
status - Boolean indicating if attribute enabled is set or unset.
See Also:
LySetEnabledInterface.setEnabled(boolean)

setImage

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

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

setPressed

public void setPressed(boolean pressed)
Updates attribute pressed to the given value.

Specified by:
setPressed in interface LyGraphicalTool
Parameters:
pressed - Boolean indicating if attribute pressed is set or unset.

setTooltip

public void setTooltip(java.lang.String tooltip)
Sets the tool tooltip.

Specified by:
setTooltip in interface LyGraphicalTool
Parameters:
tooltip - the new tooltip

(c) January 2013 - W4 S.A.

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