LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web.jquery.component.gantt
Class LyJQGantt

java.lang.Object
  extended by leon.view.graphic.LyGraphicalObject
      extended by leon.view.web.LyWebObject
          extended by leon.view.web.jquery.component.LyJQInternalView
              extended by leon.view.web.jquery.component.fieldItem.LyJQFieldItem
                  extended by leon.view.web.jquery.component.panel.LyJQPanel
                      extended by leon.view.web.jquery.component.gantt.LyJQGantt
All Implemented Interfaces:
LyGraphicalComponent, LyGraphicalFieldItem, LyGraphicalGantt, LyGraphicalPanel, LyViewComponent, LyFreeInterface, LyResetContentInterface, LySetIdleInterface, LySetLabelInterface, LySetPopupMenuInterface, LySetVisibleInterface, LyWebComponent

public class LyJQGantt
extends LyJQPanel
implements LyGraphicalGantt, LySetVisibleInterface, LyResetContentInterface, LySetIdleInterface


Nested Class Summary
static class LyJQGantt._LySpecialDay
          Internal class representing a special day for the planning.
 
Field Summary
static short SCALE_DAY
          Scale (in day).
static short SCALE_HOUR
          Scale (in hour).
static short SCALE_MINUTE
          Scale (in minute).
static short SCALE_MONTH
          Scale (in month).
static short SCALE_SECOND
          Scale (in second).
static short SCALE_WEEK
          Scale (in week).
static short SCALE_YEAR
          Scale (in year).
 
Fields inherited from class leon.view.web.jquery.component.fieldItem.LyJQFieldItem
__VERSION
 
Fields inherited from class leon.view.web.LyWebObject
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID
 
Fields inherited from interface leon.view.graphic.LyGraphicalGantt
__VERSION
 
Fields inherited from interface leon.view.setinterface.LySetVisibleInterface
__VERSION
 
Fields inherited from interface leon.view.setinterface.LyResetContentInterface
__VERSION
 
Fields inherited from interface leon.view.setinterface.LySetIdleInterface
__VERSION
 
Fields inherited from interface leon.view.setinterface.LySetPopupMenuInterface
__VERSION
 
Constructor Summary
LyJQGantt(LyGantt gantt)
          Class constructor of a Map object for the struts target.
 
Method Summary
 void addDay(LyDay daies, int pos)
          Inserts a sub-component daies at given position.
 void addLine(LyLine lineToAdd, int position)
          Inserts a sub-component lines at given position.
 java.util.Date getBeginDate()
          Gets the begin date of the planning (first date visible).
 float getBeginDatePosition()
          get the begin date of the visible part of the gantt planning
 java.awt.Color getColor(java.lang.String key)
          Retrieves a Color from the current environment.
 java.lang.String getDateForGivenXPosition(float xPosition)
          Retrieves the String value of the date which corresponds to the given xPosition
 java.text.DateFormat getDateFormat()
          Gets the date format of the component.
 java.text.DateFormat getDateTimeFormat()
          Gets the date and time format of the component.
 java.util.Date getEndDate()
          Gets the end date of the planning (last date visible).
 float getEndDatePosition()
          get the end date of the visible part of the gantt planning
 java.awt.Font getFont(java.lang.String key)
          Retrieves a Font from the current environment.
 java.util.List<LyLine> getGanttLines()
          get gantt lines
 java.util.Date getInitialBeginDate()
          Gets the initial begin date.
 java.util.Date getInitialEndDate()
          Gets the initial end date.
 java.lang.String getMonthNameAndYear(java.util.Calendar calendar)
          Retrieves month name and year for a given calendar
 java.util.ArrayList<java.lang.Object> getPlanningDownScaleElements()
          getPlanningDownScaleElements build a list which be used to display the down scale part of the gantt
 java.lang.String getReloadScript()
          this method is to be implemented by internal views to get the reload script for the page element
 java.lang.String getShortDayName(java.util.Calendar tempCalendar)
          Retrieves the short day name for a given calendar
 long getStepWidthInMilliSecond()
          Gets the number of milli second representing a step on the down scale.
 java.util.ArrayList<java.lang.Object> getUpperScaleElements()
          getUpperScaleElements build a list which be used to display the upper scale part of the gantt
 int getVisibleLineCount(LyLine line)
           
 float getXPositionOfGivenDate(java.util.Calendar intervaleCalendar)
          Retrieves the position float value for a given calendar
 void init()
          Initialization method.
 boolean isGantt()
           
 void refresh()
          Refresh frame containing this web object.
 void removeDay(LyDay daies)
          Removes a sub-component daies.
 void removeLine(LyLine lineToRemove)
          Removes a sub-component lines.
 void resetContent()
          Reset the view for a new XML Structure.
 void resetContent(boolean full)
          Reset the view for a new XML Structure.
 void setBeginDate(java.lang.String beginDate)
          Updates attribute beginDate to the given value.
 void setBigScale(short scale)
          Sets the big scale of the planning.
 void setContent()
          Sets the content of the gantt planning.
 void setCurrentDateRefreshPeriod(int currentDateRefreshPeriod)
          Updates attribute currentDateRefreshPeriod to the given value.
 void setEndDate(java.lang.String endDate)
          Updates attribute endDate to the given value.
 void setHCenteredLine(java.lang.String hCenteredLine)
          Updates attribute hCenteredLine to the given value.
 void setIdle(boolean status)
          Sets or unset the idle mode on the component/node.
 void setScale(short scale)
          Sets the scale type of the planning.
 void setSpecialDays(java.util.Vector<LyJQGantt._LySpecialDay> days)
          Sets the list of special days for this planning.
 void setVCenteredLine(java.lang.String vCenteredLine)
          Updates attribute vCenteredLine to the given value.
 void setVisible(boolean status)
          Sets the visibility status of this component.
 void setZoomFactor(LyGantt.ZoomFactor scale)
          Updates attribute zoomFactor to the given value.
 void writeHtml(LyWebPageWriter pw)
          Write HTML description corresponding to this component.
 
Methods inherited from class leon.view.web.jquery.component.panel.LyJQPanel
isChart, isForm, isGantt, isMap, isNotice, isPanel, isTable, isTree, setPopupMenu
 
Methods inherited from class leon.view.web.jquery.component.fieldItem.LyJQFieldItem
canDisabled, getCaption, getController, getFieldItem, getForm, getFormField, getTarget, isEditable, isEnabled, isLabelInstance, isMail, isNetscape, isOptional, isPrintMode, isUrl, isUrlRecurse, needCheck, setLabel
 
Methods inherited from class leon.view.web.jquery.component.LyJQInternalView
getConvertedHTML, getEncoding, getId, getJavascriptStrId, getJSWithoutTranslateString, getTreatedInternalId, isIE, setProperty
 
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, 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

SCALE_SECOND

public static final short SCALE_SECOND
Scale (in second).

See Also:
Constant Field Values

SCALE_MINUTE

public static final short SCALE_MINUTE
Scale (in minute).

See Also:
Constant Field Values

SCALE_HOUR

public static final short SCALE_HOUR
Scale (in hour).

See Also:
Constant Field Values

SCALE_DAY

public static final short SCALE_DAY
Scale (in day).

See Also:
Constant Field Values

SCALE_WEEK

public static final short SCALE_WEEK
Scale (in week).

See Also:
Constant Field Values

SCALE_MONTH

public static final short SCALE_MONTH
Scale (in month).

See Also:
Constant Field Values

SCALE_YEAR

public static final short SCALE_YEAR
Scale (in year).

See Also:
Constant Field Values
Constructor Detail

LyJQGantt

public LyJQGantt(LyGantt gantt)
Class constructor of a Map object for the struts target.

Parameters:
map - the generic Map defined for every type of view targets.
Method Detail

getVisibleLineCount

public int getVisibleLineCount(LyLine line)

writeHtml

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

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

setZoomFactor

public void setZoomFactor(LyGantt.ZoomFactor scale)
Description copied from interface: LyGraphicalGantt
Updates attribute zoomFactor to the given value.

Specified by:
setZoomFactor in interface LyGraphicalGantt
Parameters:
scale - New value of zoomFactor.
See Also:
LyGraphicalGantt.setZoomFactor(leon.view.LyGantt.ZoomFactor)

setScale

public void setScale(short scale)
Sets the scale type of the planning.

Parameters:
scale - the new scale, can be LyJQGanttCanvas#SCALE_DAY, LyJQGanttCanvas#SCALE_HOUR, LyJQGanttCanvas#SCALE_MINUTE, LyJQGanttCanvas#SCALE_MONTH, LyJQGanttCanvas#SCALE_SECOND, LyJQGanttCanvas#SCALE_WEEK or LyJQGanttCanvas#SCALE_YEAR

setBigScale

public void setBigScale(short scale)
Sets the big scale of the planning.

Parameters:
scale - the new big scale

setContent

public void setContent()
Sets the content of the gantt planning.


getDateTimeFormat

public java.text.DateFormat getDateTimeFormat()
Gets the date and time format of the component.

Returns:
the date and time format

setSpecialDays

public void setSpecialDays(java.util.Vector<LyJQGantt._LySpecialDay> days)
Sets the list of special days for this planning.

Parameters:
days - the list of _LySpecialDay instances

getBeginDate

public java.util.Date getBeginDate()
Gets the begin date of the planning (first date visible).

Returns:
the begin planning date
See Also:
setBeginDate(String)

getEndDate

public java.util.Date getEndDate()
Gets the end date of the planning (last date visible).

Returns:
the end planning date
See Also:
setEndDate(String)

init

public void init()
Initialization method.
values defined in resources files.

See Also:
leon.view.web.LyWebPage#init()

getColor

public final java.awt.Color getColor(java.lang.String key)
Retrieves a Color from the current environment.

Parameters:
key - The ressource name (key) of the Color.
Returns:
A reference to the requested Color, or null if it could not be found.
See Also:
LyEnvironment#getColor(String)

getFont

public final java.awt.Font getFont(java.lang.String key)
Retrieves a Font from the current environment.

Parameters:
key - The ressource name (key) of the font.
Returns:
A reference to the requested Font, or a default font if it could not be found.
See Also:
LyEnvironment#getFont(String)

getDateFormat

public java.text.DateFormat getDateFormat()
Gets the date format of the component.

Returns:
the date format
See Also:
setDateFormat(String, String)

getGanttLines

public java.util.List<LyLine> getGanttLines()
get gantt lines

Returns:
lines list

setIdle

public void setIdle(boolean status)
Description copied from interface: LySetIdleInterface
Sets or unset the idle mode on the component/node.

Specified by:
setIdle in interface LySetIdleInterface
Parameters:
status - new idle status (LySetIdleInterface interface)
See Also:
LySetIdleInterface.setIdle(boolean)

resetContent

public void resetContent()
Description copied from interface: LyResetContentInterface
Reset the view for a new XML Structure. Reinitialization.

Specified by:
resetContent in interface LyResetContentInterface
See Also:
LyResetContentInterface.resetContent()

resetContent

public void resetContent(boolean full)
Description copied from interface: LyResetContentInterface
Reset the view for a new XML Structure. Reinitialization.

Specified by:
resetContent in interface LyResetContentInterface
Parameters:
full - indicates whether old components must be removed from graphical view.
See Also:
LyResetContentInterface.resetContent(boolean)

setVisible

public void setVisible(boolean status)
Description copied from interface: LySetVisibleInterface
Sets the visibility status of this component.

Specified by:
setVisible in interface LySetVisibleInterface
Parameters:
status - new visibility status, if true the component will be shown, if false it will be hiden
See Also:
LySetVisibleInterface.setVisible(boolean)

setBeginDate

public void setBeginDate(java.lang.String beginDate)
Description copied from interface: LyGraphicalGantt
Updates attribute beginDate to the given value.

Specified by:
setBeginDate in interface LyGraphicalGantt
Parameters:
beginDate - New value of beginDate.
See Also:
LyGraphicalGantt.setBeginDate(java.lang.String)

setEndDate

public void setEndDate(java.lang.String endDate)
Description copied from interface: LyGraphicalGantt
Updates attribute endDate to the given value.

Specified by:
setEndDate in interface LyGraphicalGantt
Parameters:
endDate - New value of endDate.
See Also:
LyGraphicalGantt.setEndDate(java.lang.String)

refresh

public void refresh()
Description copied from class: LyWebObject
Refresh frame containing this web object.

Overrides:
refresh in class LyWebObject

setHCenteredLine

public void setHCenteredLine(java.lang.String hCenteredLine)
Description copied from interface: LyGraphicalGantt
Updates attribute hCenteredLine to the given value.

Specified by:
setHCenteredLine in interface LyGraphicalGantt
Parameters:
hCenteredLine - New value of hCenteredLine.
See Also:
LyGraphicalGantt.setHCenteredLine(java.lang.String)

setVCenteredLine

public void setVCenteredLine(java.lang.String vCenteredLine)
Description copied from interface: LyGraphicalGantt
Updates attribute vCenteredLine to the given value.

Specified by:
setVCenteredLine in interface LyGraphicalGantt
Parameters:
vCenteredLine - New value of vCenteredLine.
See Also:
LyGraphicalGantt.setVCenteredLine(java.lang.String)

addLine

public void addLine(LyLine lineToAdd,
                    int position)
Description copied from interface: LyGraphicalGantt
Inserts a sub-component lines at given position.

Specified by:
addLine in interface LyGraphicalGantt
Parameters:
lineToAdd - The lines to add to lines list.
position - Position where the sub-component is inserted.
See Also:
LyGraphicalGantt.addLine(leon.view.LyLine, int)

removeLine

public void removeLine(LyLine lineToRemove)
Description copied from interface: LyGraphicalGantt
Removes a sub-component lines.

Specified by:
removeLine in interface LyGraphicalGantt
Parameters:
lineToRemove - The lines to remove to lines list.
See Also:
LyGraphicalGantt.removeLine(leon.view.LyLine)

addDay

public void addDay(LyDay daies,
                   int pos)
Description copied from interface: LyGraphicalGantt
Inserts a sub-component daies at given position.

Specified by:
addDay in interface LyGraphicalGantt
Parameters:
daies - The daies to add to daies list.
pos - Position where the sub-component is inserted.
See Also:
LyGraphicalGantt.addDay(leon.view.LyDay, int)

removeDay

public void removeDay(LyDay daies)
Description copied from interface: LyGraphicalGantt
Removes a sub-component daies.

Specified by:
removeDay in interface LyGraphicalGantt
Parameters:
daies - The daies to remove to daies list.
See Also:
LyGraphicalGantt.removeDay(leon.view.LyDay)

isGantt

public boolean isGantt()

getReloadScript

public java.lang.String getReloadScript()
Description copied from class: LyJQInternalView
this method is to be implemented by internal views to get the reload script for the page element

Overrides:
getReloadScript in class LyJQFieldItem
Returns:
reload component script

getInitialBeginDate

public java.util.Date getInitialBeginDate()
Gets the initial begin date.

Returns:
the begin date

getInitialEndDate

public java.util.Date getInitialEndDate()
Gets the initial end date.

Returns:
the end date

setCurrentDateRefreshPeriod

public void setCurrentDateRefreshPeriod(int currentDateRefreshPeriod)
Description copied from interface: LyGraphicalGantt
Updates attribute currentDateRefreshPeriod to the given value.

Specified by:
setCurrentDateRefreshPeriod in interface LyGraphicalGantt
Parameters:
currentDateRefreshPeriod - New value of currentDateRefreshPeriod.

getMonthNameAndYear

public java.lang.String getMonthNameAndYear(java.util.Calendar calendar)
Retrieves month name and year for a given calendar

Parameters:
calendar - to check
Returns:
month name and year

getShortDayName

public java.lang.String getShortDayName(java.util.Calendar tempCalendar)
Retrieves the short day name for a given calendar

Parameters:
calendar - to check
Returns:
short day name

getUpperScaleElements

public java.util.ArrayList<java.lang.Object> getUpperScaleElements()
getUpperScaleElements build a list which be used to display the upper scale part of the gantt

Returns:
scaleValuesList : upper scale element list

getPlanningDownScaleElements

public java.util.ArrayList<java.lang.Object> getPlanningDownScaleElements()
getPlanningDownScaleElements build a list which be used to display the down scale part of the gantt

Returns:
scaleValuesList : down scale element list

getStepWidthInMilliSecond

public long getStepWidthInMilliSecond()
Gets the number of milli second representing a step on the down scale.

Returns:
step width in milli second

getXPositionOfGivenDate

public float getXPositionOfGivenDate(java.util.Calendar intervaleCalendar)
Retrieves the position float value for a given calendar

Parameters:
the - calendar to check.
Returns:
float position : indicates the float number of scales from the first date.

getDateForGivenXPosition

public java.lang.String getDateForGivenXPosition(float xPosition)
Retrieves the String value of the date which corresponds to the given xPosition

Parameters:
xPosition - :indicates the float number of scales from the first date.
Returns:
begin date value

getBeginDatePosition

public float getBeginDatePosition()
get the begin date of the visible part of the gantt planning

Returns:
begin date value

getEndDatePosition

public float getEndDatePosition()
get the end date of the visible part of the gantt planning

Returns:
end date value

(c) January 2013 - W4 S.A.

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