LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.struts
Class LyStrutsLine

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.web.LyWebObject
          extended by leon.view.web.struts.LyStrutsLine
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalLine, LyViewComponent, LyFreeInterface, LySetColorInterface, LySetFontInterface, LySetHiddenInterface, LySetImageInterface, LySetLabelInterface, LySetSelectedInterface, LyWebComponent

public class LyStrutsLine
extends LyWebObject
implements LyGraphicalLine

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

LINE: Line of a planning

See Also:
LyTreeNode

Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Constructor Summary
LyStrutsLine(LyLine line)
          Class constructor of a Line object for the Struts target.
 
Method Summary
 void addComponent(LyComponent component, int pos)
          Inserts a sub-component components at given position.
 int computeHeight()
          Computes the height of the line.
 void computeLineBounds()
          Compute line bounds and send it to the Gantt component.
 void drawLine(java.awt.Graphics g, java.awt.Rectangle bounds, int scaleHeight)
          Draws the line on the planning.
 java.lang.String getBeginning()
          Gets the begining of the HTML representation : the parent line HTML representation.
 java.util.Date getLimitDate(boolean max)
          Gets the limit date for this line (minimum or maximum).
 boolean hasChildSelected()
          Looks for selected children inside this line.
 void prepareBeginning(LyStrutsLine parent, boolean isLast)
          Prepare the beginnining : builds the given parent line string representation.
 void removeComponent(LyComponent component)
          Removes a sub-component components.
 void setColor(java.lang.String color)
          Updates attribute color to the given value.
 void setFont(java.lang.String font)
          Updates attribute font to the given value.
 void setForegroundColor(java.lang.String color)
           
 void setHidden(boolean hidden)
          Updates attribute hidden to the given value.
 void setImage(java.lang.String key)
          Updates attribute image to the given value.
 void setLabel(java.lang.String label)
          Updates attribute label to the given value.
 void setOpen(boolean open)
          Updates attribute open to the given value.
 void setSelected(boolean status)
          Updates attribute selected to the given value.
 void setSuperLineColor(java.lang.String superLineColor)
          Updates attribute superLineColor to the given value.
 void setSuperLineHidden(boolean superLineHidden)
          Updates attribute superLineHidden to the given value.
 void setSuperLineLabel(java.lang.String label)
          Updates attribute superLineLabel to the given value.
 void setTooltip(java.lang.String tooltip)
          Updates attribute tooltip to the given value.
 void writeHtml(LyWebPageWriter pw)
          Write HTML description corresponding to this component.
 void writeLine(LyWebPageWriter pw, LyStrutsLine parent, boolean isLast)
          Write HTML description corresponding to this line.
 
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, refresh, 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
Constructor Detail

LyStrutsLine

public LyStrutsLine(LyLine line)
Class constructor of a Line object for the Struts target.

Parameters:
treeNode - the generic Tree Node defined for every type of view targets
Method Detail

writeHtml

public void writeHtml(LyWebPageWriter pw)
Description copied from interface: LyWebComponent
Write HTML description corresponding to this component.

Specified by:
writeHtml in interface LyWebComponent
Parameters:
pw - the page writer

getBeginning

public java.lang.String getBeginning()
Gets the begining of the HTML representation : the parent line HTML representation.

Returns:
the parent line String representation

prepareBeginning

public void prepareBeginning(LyStrutsLine parent,
                             boolean isLast)
Prepare the beginnining : builds the given parent line string representation.

Parameters:
parent - the parent line
isLast - true if the line is the last

computeHeight

public int computeHeight()
Computes the height of the line.

Returns:
the line height

computeLineBounds

public void computeLineBounds()
Compute line bounds and send it to the Gantt component.


writeLine

public void writeLine(LyWebPageWriter pw,
                      LyStrutsLine parent,
                      boolean isLast)
Write HTML description corresponding to this line.

Parameters:
pw - the page writer
parent - the parent line
isLast - true if this line is the last one

drawLine

public void drawLine(java.awt.Graphics g,
                     java.awt.Rectangle bounds,
                     int scaleHeight)
Draws the line on the planning.

Parameters:
g - the graphic context
bounds - the bounds of place reserved for the line
scaleHeight - scale height

hasChildSelected

public boolean hasChildSelected()
Looks for selected children inside this line.

Returns:
true if at least one children is selected, false otherwise

getLimitDate

public java.util.Date getLimitDate(boolean max)
Gets the limit date for this line (minimum or maximum). Browse all line sub-components and retrieve their minimum (or maximum) dates.

Parameters:
max - indicate if maximum or minimum date must be returned and if end date is null, we consider begin date instead.
Returns:
the maximum date if max is true and if the end date is not null, the minimum date otherwise

setLabel

public void setLabel(java.lang.String label)
Description copied from interface: LyGraphicalLine
Updates attribute label to the given value.

Specified by:
setLabel in interface LyGraphicalLine
Specified by:
setLabel in interface LySetLabelInterface
Parameters:
label - New value of label.

setTooltip

public void setTooltip(java.lang.String tooltip)
Description copied from interface: LyGraphicalLine
Updates attribute tooltip to the given value.

Specified by:
setTooltip in interface LyGraphicalLine
Parameters:
tooltip - New value of tooltip.

setSelected

public void setSelected(boolean status)
Description copied from interface: LyGraphicalLine
Updates attribute selected to the given value.

Specified by:
setSelected in interface LyGraphicalLine
Specified by:
setSelected in interface LySetSelectedInterface
Parameters:
status - Boolean indicating if attribute selected is set or unset.

setHidden

public void setHidden(boolean hidden)
Description copied from interface: LyGraphicalLine
Updates attribute hidden to the given value.

Specified by:
setHidden in interface LyGraphicalLine
Specified by:
setHidden in interface LySetHiddenInterface
Parameters:
hidden - Boolean indicating if attribute hidden is set or unset.

setImage

public void setImage(java.lang.String key)
Description copied from interface: LyGraphicalLine
Updates attribute image to the given value.

Specified by:
setImage in interface LyGraphicalLine
Specified by:
setImage in interface LySetImageInterface
Parameters:
key - New value of image.

setOpen

public void setOpen(boolean open)
Description copied from interface: LyGraphicalLine
Updates attribute open to the given value.

Specified by:
setOpen in interface LyGraphicalLine
Parameters:
open - Boolean indicating if attribute open is set or unset.

setColor

public void setColor(java.lang.String color)
Description copied from interface: LyGraphicalLine
Updates attribute color to the given value.

Specified by:
setColor in interface LyGraphicalLine
Specified by:
setColor in interface LySetColorInterface
Parameters:
color - New value of color.

setFont

public void setFont(java.lang.String font)
Description copied from interface: LyGraphicalLine
Updates attribute font to the given value.

Specified by:
setFont in interface LyGraphicalLine
Specified by:
setFont in interface LySetFontInterface
Parameters:
font - New value of font.

setForegroundColor

public void setForegroundColor(java.lang.String color)

addComponent

public void addComponent(LyComponent component,
                         int pos)
Description copied from interface: LyGraphicalLine
Inserts a sub-component components at given position.

Specified by:
addComponent in interface LyGraphicalLine
Parameters:
component - The components to add to components list.
pos - Position where the sub-component is inserted.

removeComponent

public void removeComponent(LyComponent component)
Description copied from interface: LyGraphicalLine
Removes a sub-component components.

Specified by:
removeComponent in interface LyGraphicalLine
Parameters:
component - The components to remove to components list.

setSuperLineColor

public void setSuperLineColor(java.lang.String superLineColor)
Description copied from interface: LyGraphicalLine
Updates attribute superLineColor to the given value.

Specified by:
setSuperLineColor in interface LyGraphicalLine
Parameters:
superLineColor - New value of superLineColor.

setSuperLineLabel

public void setSuperLineLabel(java.lang.String label)
Description copied from interface: LyGraphicalLine
Updates attribute superLineLabel to the given value.

Specified by:
setSuperLineLabel in interface LyGraphicalLine
Parameters:
label - New value of superLineLabel.

setSuperLineHidden

public void setSuperLineHidden(boolean superLineHidden)
Description copied from interface: LyGraphicalLine
Updates attribute superLineHidden to the given value.

Specified by:
setSuperLineHidden in interface LyGraphicalLine
Parameters:
superLineHidden - Boolean indicating if attribute superLineHidden is set or unset.

(c) January 2013 - W4 S.A.

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