LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.win.swing.component
Interface LyGanttElement

All Known Implementing Classes:
LyGanttElementImpl

public interface LyGanttElement

This interface defines an object than can draw itself in a Gantt planning.

See Also:
LyGantt

Field Summary
static java.lang.String __VERSION
           
static short POINT_INTERVAL
          Constant for point interval type (interval with no end date).
static short REAL_INTERVAL
          Constant for real interval type (interval with both begin and end date).
static short SUPER_LINE
          Constant for super line type.
 
Method Summary
 void draw(LyAbstractGanttPanelManager c, java.awt.Graphics gc, java.awt.Color background, int beginX, int endX, int beginY, int endY)
          Draws the Gantt element in an instance of LyGanttCanvas.
 java.util.Date getBeginDate()
          Returns the begin date of the Gantt element.
 java.util.Vector<LyGanttElement> getDependencies()
          Returns the dependencies of the Gantt element.
 java.awt.Rectangle getElementBounds(LyAbstractGanttPanelManager canvas, java.awt.Graphics g)
          Returns the bounds of the Gantt representation.
 java.util.Date getEndDate()
          Returns the end date of the Gantt element.
 java.awt.Point getGanttImageSize()
          Returns the size of the Gantt representation (only for point interval).
 java.lang.String getId()
          Returns the id of the Gantt element.
 int getIndex()
          Returns the index of the Gantt element in the parent line.
 java.lang.String getTooltip()
          Returns the tooltip of the element.
 short getType()
          Returns the type of the Gantt element.
 boolean isLeftResizable()
          Indicates if the element is resizable from its left extremity.
 boolean isMovable()
          Indicates if the element is movable.
 boolean isRightResizable()
          Indicates if the element is resizable from its right extremity.
 boolean moveDates(java.util.Date beginDate, java.util.Date endDate)
          Changes the begin and end date of a Gantt element.
 void selectParentLine(boolean select)
          Selects or unselects the parent line of the Gantt element.
 void setColor(java.awt.Color color)
          Sets the color of the Gantt element.
 void setDependencies(java.util.Vector<LyGanttElement> dependencies)
          Sets the dependencies of the Gantt element.
 void setDrawingComponent(java.awt.Component c)
          Sets the drawing component used to draw the Gantt element.
 void setLabel(java.lang.String label)
          Sets the label of the Gantt element.
 

Field Detail

__VERSION

static final java.lang.String __VERSION
See Also:
Constant Field Values

SUPER_LINE

static final short SUPER_LINE
Constant for super line type.

See Also:
Constant Field Values

REAL_INTERVAL

static final short REAL_INTERVAL
Constant for real interval type (interval with both begin and end date).

See Also:
Constant Field Values

POINT_INTERVAL

static final short POINT_INTERVAL
Constant for point interval type (interval with no end date).

See Also:
Constant Field Values
Method Detail

getId

java.lang.String getId()
Returns the id of the Gantt element.

Returns:
the id of the Gantt element

getBeginDate

java.util.Date getBeginDate()
Returns the begin date of the Gantt element.

Returns:
the begin date of the Gantt element

getEndDate

java.util.Date getEndDate()
Returns the end date of the Gantt element.

Returns:
the end date of the Gantt element

moveDates

boolean moveDates(java.util.Date beginDate,
                  java.util.Date endDate)
Changes the begin and end date of a Gantt element.

Parameters:
beginDate - new begin date of the element
endDate - new end date of the element
Returns:
true if at least one date has changed, false otherwise

isMovable

boolean isMovable()
Indicates if the element is movable.

Returns:
true if the element is movable, false otherwise

isLeftResizable

boolean isLeftResizable()
Indicates if the element is resizable from its left extremity.

Returns:
true if the element is resizable from its left extremity, false otherwise

isRightResizable

boolean isRightResizable()
Indicates if the element is resizable from its right extremity.

Returns:
true if the element is resizable from its right extremity, false otherwise

getTooltip

java.lang.String getTooltip()
Returns the tooltip of the element.

Returns:
the tooltip of the element

setDependencies

void setDependencies(java.util.Vector<LyGanttElement> dependencies)
Sets the dependencies of the Gantt element.

Parameters:
dependencies - new dependencies value
See Also:
getDependencies()

setLabel

void setLabel(java.lang.String label)
Sets the label of the Gantt element.

Parameters:
label - new label value

setColor

void setColor(java.awt.Color color)
Sets the color of the Gantt element.

Parameters:
color - new dependencies value

selectParentLine

void selectParentLine(boolean select)
Selects or unselects the parent line of the Gantt element.

Parameters:
select - indicates if parent line must be selected or unselected

getType

short getType()
Returns the type of the Gantt element.

Returns:
the type of the element: it may be SUPER_LINE, REAL_INTERVAL or POINT_INTERVAL

getDependencies

java.util.Vector<LyGanttElement> getDependencies()
Returns the dependencies of the Gantt element.

Returns:
a list of Gantt Element
See Also:
setDependencies(Vector)

getGanttImageSize

java.awt.Point getGanttImageSize()
Returns the size of the Gantt representation (only for point interval).

Returns:
the dimension of the image used to represent the Gantt element

getElementBounds

java.awt.Rectangle getElementBounds(LyAbstractGanttPanelManager canvas,
                                    java.awt.Graphics g)
Returns the bounds of the Gantt representation.

Parameters:
canvas - the canvas containing the element
g - the graphics context
Returns:
the bounds of the Gantt element representation

setDrawingComponent

void setDrawingComponent(java.awt.Component c)
Sets the drawing component used to draw the Gantt element.

Parameters:
c - the drawing component

getIndex

int getIndex()
Returns the index of the Gantt element in the parent line.

Returns:
the index of the Gantt element

draw

void draw(LyAbstractGanttPanelManager c,
          java.awt.Graphics gc,
          java.awt.Color background,
          int beginX,
          int endX,
          int beginY,
          int endY)
Draws the Gantt element in an instance of LyGanttCanvas.

Parameters:
c - the instance of LyGanttCanvas
gc - the graphics context
background - the background color
beginX - begin X coordinate
endX - end X coordinate
beginY - begin Y coordinate
endY - end Y coordinate

(c) January 2013 - W4 S.A.

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