|
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.web.struts.gantt.LyStrutsGanttElement
public class LyStrutsGanttElement
This class represents an element on a Gantt planning.
Nested Class Summary | |
---|---|
static class |
LyStrutsGanttElement._LyPeriod
This class implements the common behavior for Period objects for the struts viewer. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
DEFAULT_INTERVAL_HEIGHT
Default height of the interval. |
static int |
DEPENDENCIES_DELTA
Dependencies delta. |
static short |
TYPE_POINT_INTERVAL
Point interval type (interval with no end date). |
static short |
TYPE_REAL_INTERVAL
Real interval type (interval with both begin and end date). |
static short |
TYPE_SUPER_LINE
Super line type. |
Constructor Summary | |
---|---|
LyStrutsGanttElement(short type)
Constructor. |
Method Summary | |
---|---|
void |
draw(java.awt.Graphics g,
LyStrutsGanttCanvas ganttCanvas,
int beginX,
int endX,
int beginY,
int endY)
Draws the Gantt Element. |
void |
drawTube(java.awt.Graphics g,
int beginX,
int beginY,
int endX,
int endY,
java.awt.Color color)
Draws a tube-style line. |
java.awt.Point |
getGanttImageSize()
Gets the size of the image used to draw the Gantt element (only for TYPE_POINT_INTERVAL ). |
java.awt.Color |
getLighterColor(java.awt.Color color,
int value)
Calculates a color that is value % lighter than the current color . |
short |
getType()
Gets the element type. |
void |
setCenterLabel(java.lang.String label)
Sets the center label of the Gantt element. |
void |
setColor(java.awt.Color color)
Sets the element color. |
void |
setDependencies(java.util.Vector<LyInterval> dependencies)
Sets the element dependencies. |
void |
setDependencyColor(java.awt.Color color)
Sets the dependencies color. |
void |
setDrawVerticalLines(boolean draw)
Sets the draw vertical lines parameter of the Gantt element. |
void |
setFont(java.awt.Font font)
Sets the element font. |
void |
setId(java.lang.String id)
Sets the element id. |
void |
setLabel(java.lang.String label)
Sets the element label. |
void |
setLabelColor(java.awt.Color color)
Sets the color of the label. |
void |
setPeriods(java.util.Vector<LyStrutsGanttElement._LyPeriod> periods)
Sets the periods of the Gantt element. |
void |
setTooltip(java.lang.String tooltip)
Sets the element tooltip. |
void |
setVerticalLinesColor(java.awt.Color color)
Sets the vertical lines color. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final short TYPE_SUPER_LINE
public static final short TYPE_REAL_INTERVAL
public static final short TYPE_POINT_INTERVAL
public static final int DEFAULT_INTERVAL_HEIGHT
public static final int DEPENDENCIES_DELTA
Constructor Detail |
---|
public LyStrutsGanttElement(short type)
type
- the element typeMethod Detail |
---|
public short getType()
public void setId(java.lang.String id)
id
- new element idpublic void setLabel(java.lang.String label)
setLabel
in interface LySetLabelInterface
label
- new element labelpublic void setTooltip(java.lang.String tooltip)
tooltip
- new element tooltippublic void setCenterLabel(java.lang.String label)
label
- new element center labelpublic void setDrawVerticalLines(boolean draw)
draw
- indicates if vertical lines must be drawn or notpublic void setFont(java.awt.Font font)
font
- new element fontpublic void setColor(java.awt.Color color)
color
- new element colorpublic void setLabelColor(java.awt.Color color)
color
- new color of the labelpublic void setVerticalLinesColor(java.awt.Color color)
color
- new vertical lines colorpublic void setDependencyColor(java.awt.Color color)
color
- new dependencies colorpublic void setDependencies(java.util.Vector<LyInterval> dependencies)
dependencies
- the list of dependenciespublic void setPeriods(java.util.Vector<LyStrutsGanttElement._LyPeriod> periods)
periods
- the list of periodspublic java.awt.Point getGanttImageSize()
TYPE_POINT_INTERVAL
).
public void draw(java.awt.Graphics g, LyStrutsGanttCanvas ganttCanvas, int beginX, int endX, int beginY, int endY)
g
- the graphic contextganttCanvas
- the canvas containing the elementbeginX
- the begin x coordonate of the elementendX
- the end x coordonate of the elementbeginY
- the begin y coordonate of the elementendY
- the end y coordonate of the elementpublic void drawTube(java.awt.Graphics g, int beginX, int beginY, int endX, int endY, java.awt.Color color)
g
- the graphic contextbeginX
- the begin x positionbeginY
- the begin y positionendX
- the end x positionendY
- the end y positioncolor
- the color used for the border of the linepublic java.awt.Color getLighterColor(java.awt.Color color, int value)
value
% lighter than the current color
.
color
- the current colorvalue
- the lightness percentage
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |