|
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.win.swing.component.LyGanttElementImpl
public class LyGanttElementImpl
Implementation of a LyGanttElement.
LyGanttElement
Nested Class Summary | |
---|---|
static class |
LyGanttElementImpl._LyPeriod
Handles periods specified by 2 dates. |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static int |
DEFAULT_INTERVAL_HEIGHT
Default height of the interval. |
static int |
DEPENDENCIES_DELTA
Size of the dependency arrows. |
Fields inherited from interface leon.view.win.swing.component.LyGanttElement |
---|
POINT_INTERVAL, REAL_INTERVAL, SUPER_LINE |
Constructor Summary | |
---|---|
LyGanttElementImpl()
Default constructor. |
|
LyGanttElementImpl(LyComponent component)
Class constructor for a specified component. |
Method Summary | |
---|---|
void |
draw(LyAbstractGanttPanelManager canvas,
java.awt.Graphics g,
java.awt.Color background,
int beginX,
int endX,
int beginY,
int endY)
(non-Javadoc). |
java.util.Date |
getBeginDate()
(non-Javadoc). |
java.util.Vector<LyGanttElement> |
getDependencies()
Returns the dependencies of the Gantt element as a list of LyGanttElement. |
java.awt.Rectangle |
getElementBounds(LyAbstractGanttPanelManager canvas,
java.awt.Graphics g)
(non-Javadoc). |
java.util.Date |
getEndDate()
(non-Javadoc). |
java.awt.Point |
getGanttImageSize()
(non-Javadoc). |
java.lang.String |
getId()
(non-Javadoc). |
int |
getIndex()
(non-Javadoc). |
java.lang.String |
getTooltip()
(non-Javadoc). |
short |
getType()
(non-Javadoc). |
boolean |
isDrawVerticalLines()
Indicates if vertical lines must be draws at the extremities of the Gantt element. |
boolean |
isLeftResizable()
(non-Javadoc). |
boolean |
isMovable()
(non-Javadoc). |
boolean |
isRightResizable()
(non-Javadoc). |
boolean |
moveDates(java.util.Date beginDate,
java.util.Date endDate)
Updates the dates of the component associated with the Gantt element (only if the component is an interval). |
void |
refreshCanvas()
Refreshs the drawing component. |
void |
selectParentLine(boolean select)
(non-Javadoc). |
void |
setBeginDate(java.util.Date beginDate)
Sets the begin date of the Gantt element. |
void |
setCenterLabel(java.lang.String label)
Sets the center label of the Gantt element. |
void |
setColor(java.awt.Color color)
(non-Javadoc). |
void |
setComponent(LyComponent component)
Sets the component associated with the Gantt element. |
void |
setDateFormat(java.text.DateFormat format)
Sets the date format used to format date in the Gantt component. |
void |
setDependencies(java.util.Vector<LyGanttElement> dependencies)
(non-Javadoc). |
void |
setDependencyColor(java.awt.Color color)
Sets the color used to draw the dependencies. |
void |
setDrawingComponent(java.awt.Component c)
Sets the drawing component reference to repaint when label/select has changed. |
void |
setDrawVerticalLines(boolean draw)
Sets the draw vertical lines parameter of the Gantt element. |
void |
setEndDate(java.util.Date endDate)
Sets the end date of the Gantt element. |
void |
setFont(java.awt.Font font)
Sets the font. |
void |
setGanttImage(java.awt.Image image)
Sets the image used to draw the Gantt element (only for LyGanttElement.POINT_INTERVAL type). |
void |
setHidden(boolean hidden)
Sets the hidden parameter of the Gantt element. |
void |
setId(java.lang.String id)
Sets the id of the Gantt element. |
void |
setLabel(java.lang.String label)
(non-Javadoc). |
void |
setLabelColor(java.awt.Color color)
Sets the color of the label. |
void |
setLeftResizable(boolean resizable)
Sets the left resizable parameter of the Gantt element. |
void |
setMovable(boolean movable)
Sets the movable parameter of the Gantt element. |
void |
setPeriods(java.util.Vector<LyGanttElementImpl._LyPeriod> periods)
Sets the periods of the Gantt element. |
void |
setRightResizable(boolean resizable)
Sets the right resizable parameter of the Gantt element. |
void |
setTooltip(java.lang.String tooltip)
Sets the tooltip of the Gantt element. |
void |
setType(short type)
Sets the type of the Gantt element (SUPER_LINE, REAL_INTERVAL, POINT_INTERVAL). |
void |
setVerticalLinesColor(java.awt.Color color)
Sets the color of the vertical lines. |
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 int DEFAULT_INTERVAL_HEIGHT
public static final int DEPENDENCIES_DELTA
Constructor Detail |
---|
public LyGanttElementImpl()
public LyGanttElementImpl(LyComponent component)
component
- the component to associateMethod Detail |
---|
public void setColor(java.awt.Color color)
setColor
in interface LyGanttElement
color
- new dependencies valueLyGanttElement.setColor(java.awt.Color)
public void setLabelColor(java.awt.Color color)
color
- new color of the labelpublic void setVerticalLinesColor(java.awt.Color color)
color
- new color of the vertical linespublic void setFont(java.awt.Font font)
font
- new fontpublic void setDependencyColor(java.awt.Color color)
color
- the new color of the dependenciespublic void setId(java.lang.String id)
id
- the new id of the Gantt elementgetId()
public void setDrawingComponent(java.awt.Component c)
setDrawingComponent
in interface LyGanttElement
c
- the drawing componentLyGanttElement.setDrawingComponent(Component)
public void setComponent(LyComponent component)
component
- the component associated with the Gantt elementpublic void setDateFormat(java.text.DateFormat format)
format
- new date formatpublic void setLabel(java.lang.String label)
setLabel
in interface LyGanttElement
label
- new label valueLyGanttElement.setLabel(java.lang.String)
public void setTooltip(java.lang.String tooltip)
tooltip
- the new tooltip textgetTooltip()
public java.lang.String getTooltip()
getTooltip
in interface LyGanttElement
LyGanttElement.getTooltip()
public void setCenterLabel(java.lang.String label)
label
- the new center labelpublic void setBeginDate(java.util.Date beginDate)
beginDate
- new begin dategetBeginDate()
public void setEndDate(java.util.Date endDate)
endDate
- new end dategetEndDate()
public void setDependencies(java.util.Vector<LyGanttElement> dependencies)
setDependencies
in interface LyGanttElement
dependencies
- new dependencies valueLyGanttElement.setDependencies(java.util.Vector)
public void setPeriods(java.util.Vector<LyGanttElementImpl._LyPeriod> periods)
periods
- the list of element periodpublic void setMovable(boolean movable)
movable
- indicates if the Gantt element is movable or notpublic void setLeftResizable(boolean resizable)
resizable
- indicates if the Gantt element is left resizable or notpublic void setRightResizable(boolean resizable)
resizable
- indicates if the Gantt element is right resizable or notpublic void setDrawVerticalLines(boolean draw)
draw
- indicates if vertical lines must be drawnpublic void setHidden(boolean hidden)
hidden
- indicates element is hiddenpublic void setGanttImage(java.awt.Image image)
LyGanttElement.POINT_INTERVAL
type).
image
- the new imagepublic void setType(short type)
type
- the new typegetType()
public void refreshCanvas()
public void selectParentLine(boolean select)
selectParentLine
in interface LyGanttElement
select
- indicates if parent line must be selected or unselectedLyGanttElement.selectParentLine(boolean)
public boolean moveDates(java.util.Date beginDate, java.util.Date endDate)
moveDates
in interface LyGanttElement
beginDate
- new begin date of the elementendDate
- new end date of the element
LyGanttElement.moveDates(Date, Date)
public java.lang.String getId()
getId
in interface LyGanttElement
LyGanttElement.getId()
public short getType()
getType
in interface LyGanttElement
LyGanttElement.SUPER_LINE
, LyGanttElement.REAL_INTERVAL
or
LyGanttElement.POINT_INTERVAL
LyGanttElement.getType()
public java.util.Vector<LyGanttElement> getDependencies()
getDependencies
in interface LyGanttElement
setDependencies(Vector)
,
LyGanttElement.getDependencies()
public java.util.Date getBeginDate()
getBeginDate
in interface LyGanttElement
LyGanttElement.getBeginDate()
public java.util.Date getEndDate()
getEndDate
in interface LyGanttElement
LyGanttElement.getEndDate()
public boolean isMovable()
isMovable
in interface LyGanttElement
LyGanttElement.isMovable()
public boolean isLeftResizable()
isLeftResizable
in interface LyGanttElement
LyGanttElement.isLeftResizable()
public boolean isRightResizable()
isRightResizable
in interface LyGanttElement
LyGanttElement.isRightResizable()
public boolean isDrawVerticalLines()
public int getIndex()
getIndex
in interface LyGanttElement
LyGanttElement.getIndex()
public java.awt.Point getGanttImageSize()
getGanttImageSize
in interface LyGanttElement
LyGanttElement.getGanttImageSize()
public java.awt.Rectangle getElementBounds(LyAbstractGanttPanelManager canvas, java.awt.Graphics g)
getElementBounds
in interface LyGanttElement
canvas
- the canvas containing the elementg
- the graphics context
LyGanttElement.getElementBounds(leon.view.win.swing.component.LyAbstractGanttPanelManager,
java.awt.Graphics)
public void draw(LyAbstractGanttPanelManager canvas, java.awt.Graphics g, java.awt.Color background, int beginX, int endX, int beginY, int endY)
draw
in interface LyGanttElement
canvas
- the instance of LyGanttCanvasg
- the graphics contextbackground
- the background colorbeginX
- begin X coordinateendX
- end X coordinatebeginY
- begin Y coordinateendY
- end Y coordinateLyGanttElement.draw(leon.view.win.swing.component.LyAbstractGanttPanelManager,
java.awt.Graphics, java.awt.Color, int, int, int, int)
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |