|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.view.graphic.LyGraphicalObject
leon.view.web.LyWebObject
leon.view.web.LyWebPageWriter
leon.view.web.struts.LyStrutsGantt
public class LyStrutsGantt
This class implements the Gantt object (as described in the dtd) for web viewer.
GANTT: GANTT planning
A Gantt planning is a graphical component that generally allows to represent the planning of a
project by visualizing the different tasks that compose it. It is constituted by two distinct
parts : a planning on the right and a tree view on the left. To each node of the tree corresponds
a representation on the planning, horizontally aligned with this node (the node and its
representation make what we will call a line). This representation may be a segment, a filled
rectangle or a point.
A Gantt planning has a begin date and an end date that represent the limits of the visible part
of the planning. The full size of the planning is automatically computed with the dates of the
intervals. It also has a date format used to represent the dates of the intervals and a zoom
factor indicating the steps of the vertical grid of the planning (months, weeks, days, hours or
minutes).
The tree view allows to visualize the different lines with the capacity of hiding or showing the
sub-lines. Each node of the tree has a label, an image, a background color, a foreground color
and a font. The planning allows to visualize the time intervals associated to the nodes of the
tree. If a line contains intervals it is represented in the planning by points or filled
rectangles (depending on the begin and end dates). If a line contains sub-lines it is represented
by a segment starting from the minimum date of its sub-intervals and going to the maximum date of
its sub-intervals. It is also possible to indicate particular days that must appear with a color
on the planning. Those days may be of three types : days of week (for example Saturday and
Sunday), days of year (for example May the 1st) and special days (for example 24th December
2004). Remark: a generic Leonardi action « _gantt » is added with its controller, builder and
behavior.
LyMap
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static boolean |
CLEAR_GANTT_FILES
Force the gantt to keep the ten last gantt files and to destroy the oldest. |
static int |
GANTT_HEIGHT
The Gantt height. |
static int |
GANTT_WIDTH
The Gantt width. |
Fields inherited from class leon.view.web.LyWebPageWriter |
---|
FORCE_AJAX, MAIN_BUFFER |
Fields inherited from class leon.view.web.LyWebObject |
---|
WEB_COMPONENT_ID, WEB_CONTROLLER_ID, WEB_SESSION_ID |
Constructor Summary | |
---|---|
LyStrutsGantt(LyGantt gantt)
Class constructor of a Map object for the struts target. |
Method Summary | |
---|---|
void |
addDay(LyDay day,
int pos)
Inserts a sub-component daies at given position. |
void |
addLine(LyLine line,
int pos)
Inserts a sub-component lines at given position. |
void |
addSensitiveItem(java.awt.Rectangle rect,
java.lang.String id,
java.lang.String tooltip)
Adds a sensitive item to the planning. |
java.util.Date |
getBeginDate()
Gets the begin date of the planning (first date visible). |
java.awt.Color |
getColor(java.lang.String key)
Retrieves a Color from the current environment. |
java.text.DateFormat |
getDateFormat()
Gets the date format of the component. |
java.text.DateFormat |
getDateTimeFormat()
Gets the date and time format of the component. |
static java.awt.Frame |
getDefaultFrame()
Gets the default frame. |
java.util.Date |
getEndDate()
Gets the end date of the planning (last date visible). |
java.awt.Font |
getFont(java.lang.String key)
Retrieves a Font from the current environment. |
LyStrutsGanttCanvas |
getGanttCanvas()
Gets the Gantt canvas. |
static java.lang.String |
getHexString(java.awt.Color color)
Gets the hexadecimal string representing the given color. |
java.lang.String |
getId()
(non-Javadoc). |
java.util.Hashtable<LyStrutsLine,java.awt.Rectangle> |
getLinesBounds()
Gets the positions of the lines. |
java.util.Vector<LyWebPageWriter> |
getPageWriters()
(non-Javadoc). |
java.lang.String |
getRedirect(java.lang.String frame)
Gets the url for an alternate Web page. |
int |
getScrollHeightForSplitter(LyWebPageWriter pw)
Indicates whether this component needs scrollbars when inserted in a splitter. |
java.text.DateFormat |
getTimeFormat()
Gets the time format of the component. |
void |
init()
Initialization method. |
boolean |
isFrameSet()
(non-Javadoc). |
void |
preparePage(java.lang.String frame,
java.lang.String targetWindow)
(non-Javadoc). |
void |
refreshGanttImage()
Refresh the image of the planning. |
void |
removeDay(LyDay day)
Removes a sub-component daies. |
void |
removeLine(LyLine line)
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 |
setContent()
Sets the content of the gantt planning. |
void |
setCurrentDateRefreshPeriod(int period)
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 line)
Updates attribute hCenteredLine to the given value. |
void |
setIdle(boolean status)
Sets or unset the idle mode on the component/node. |
void |
setSelectedLine(LyLine line)
Sets the selected line. |
void |
setVCenteredLine(java.lang.String line)
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. |
void |
writePlanning(LyWebPageWriter pw)
Write the planning part of the Gantt. |
void |
writeTree(LyWebPageWriter pw)
Writes the tree part of the Gantt. |
Methods inherited from class leon.view.web.LyWebObject |
---|
addFileScript, decodeUrl, displayUpPage, encodeUrl, encodeUrlXhtml, expandUrl, getDisabledImageUrl, getFontSize, getFontString, getFontString, getFontString, getHexColor, getHexColor, getHtmlEntitiesString, getHtmlString, getImageSize, getImageSize, getImageUrl, getJavascriptString, getLastFrameName, getLyFont, getMessage, getRootUrl, getRootURL, 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 |
---|
public static final java.lang.String __VERSION
public static int GANTT_WIDTH
public static int GANTT_HEIGHT
public static boolean CLEAR_GANTT_FILES
Constructor Detail |
---|
public LyStrutsGantt(LyGantt gantt)
map
- the generic Map defined for every type of view targets.Method Detail |
---|
public static java.awt.Frame getDefaultFrame()
public static java.lang.String getHexString(java.awt.Color color)
color
- The color to convert.
public boolean isFrameSet()
LyWebPageWriter
isFrameSet
in class LyWebPageWriter
LyWebPageWriter.isFrameSet()
public int getScrollHeightForSplitter(LyWebPageWriter pw)
LyWebObject
getScrollHeightForSplitter
in class LyWebObject
pw
- current page writer
public void init()
init
in class LyWebPageWriter
leon.view.web.LyWebPage#init()
public void setContent()
public java.util.Date getBeginDate()
setBeginDate(String)
public java.util.Date getEndDate()
setEndDate(String)
public java.text.DateFormat getDateFormat()
setDateFormat(String, String)
public java.text.DateFormat getTimeFormat()
public java.text.DateFormat getDateTimeFormat()
public java.util.Hashtable<LyStrutsLine,java.awt.Rectangle> getLinesBounds()
public void writeHtml(LyWebPageWriter pw)
LyWebComponent
writeHtml
in interface LyWebComponent
pw
- the page writerpublic void preparePage(java.lang.String frame, java.lang.String targetWindow)
LyWebPageWriter
preparePage
in class LyWebPageWriter
LyWebPageWriter.preparePage(java.lang.String, java.lang.String)
public void writeTree(LyWebPageWriter pw)
pw
- current page writerpublic void writePlanning(LyWebPageWriter pw)
pw
- current page writerpublic void addSensitiveItem(java.awt.Rectangle rect, java.lang.String id, java.lang.String tooltip)
rect
- the rectangle where to add the elementid
- the item idtooltip
- the tooltippublic void setVisible(boolean status)
LySetVisibleInterface
setVisible
in interface LySetVisibleInterface
setVisible
in class LyWebPageWriter
status
- new visibility status, if true the component will be shown, if false it will be
hidenpublic void resetContent()
LyResetContentInterface
resetContent
in interface LyResetContentInterface
public void resetContent(boolean full)
LyResetContentInterface
resetContent
in interface LyResetContentInterface
full
- indicates whether old components must be removed from graphical view.public LyStrutsGanttCanvas getGanttCanvas()
public java.lang.String getId()
LyWebPageWriter
getId
in class LyWebPageWriter
LyWebPageWriter.getId()
public final java.awt.Color getColor(java.lang.String key)
key
- The ressource name (key) of the Color.
LyEnvironment.getColor(String)
public final java.awt.Font getFont(java.lang.String key)
key
- The ressource name (key) of the font.
LyEnvironment.getFont(String)
public void addLine(LyLine line, int pos)
LyGraphicalGantt
addLine
in interface LyGraphicalGantt
line
- The lines to add to lines list.pos
- Position where the sub-component is inserted.public void removeLine(LyLine line)
LyGraphicalGantt
removeLine
in interface LyGraphicalGantt
line
- The lines to remove to lines list.public void addDay(LyDay day, int pos)
LyGraphicalGantt
addDay
in interface LyGraphicalGantt
day
- The daies to add to daies list.pos
- Position where the sub-component is inserted.public void removeDay(LyDay day)
LyGraphicalGantt
removeDay
in interface LyGraphicalGantt
day
- The daies to remove to daies list.public void setBeginDate(java.lang.String beginDate)
LyGraphicalGantt
setBeginDate
in interface LyGraphicalGantt
beginDate
- New value of beginDate.public void setEndDate(java.lang.String endDate)
LyGraphicalGantt
setEndDate
in interface LyGraphicalGantt
endDate
- New value of endDate.public void setCurrentDateRefreshPeriod(int period)
LyGraphicalGantt
setCurrentDateRefreshPeriod
in interface LyGraphicalGantt
period
- New value of currentDateRefreshPeriod.public void setHCenteredLine(java.lang.String line)
LyGraphicalGantt
setHCenteredLine
in interface LyGraphicalGantt
line
- New value of hCenteredLine.public void setVCenteredLine(java.lang.String line)
LyGraphicalGantt
setVCenteredLine
in interface LyGraphicalGantt
line
- New value of vCenteredLine.public void setZoomFactor(LyGantt.ZoomFactor scale)
LyGraphicalGantt
setZoomFactor
in interface LyGraphicalGantt
scale
- New value of zoomFactor.public void setSelectedLine(LyLine line)
line
- the new selected linepublic void setIdle(boolean status)
LySetIdleInterface
setIdle
in interface LySetIdleInterface
status
- new idle status (LySetIdleInterface interface)public void refreshGanttImage()
public java.util.Vector<LyWebPageWriter> getPageWriters()
LyWebPageWriter
getPageWriters
in class LyWebPageWriter
LyWebPageWriter.getPageWriters()
public java.lang.String getRedirect(java.lang.String frame)
LyWebPageWriter
getRedirect
in class LyWebPageWriter
frame
- the frame to redirect
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |