|
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.win.swing.LySwingObject
leon.view.win.swing.LySwingFieldItem
leon.view.win.swing.LySwingPanel
leon.view.win.swing.LySwingGantt
public class LySwingGantt
This class implements the Gantt object (as described in the dtd) for swing viewer.
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).
LyGantt
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LySwingGantt(LyGantt gantt)
Class constructor of a Gantt object for the Swing target. |
Method Summary | |
---|---|
void |
actionPerformed(LyActionEvent actionEvent)
(non-Javadoc). |
void |
addDay(LyDay day,
int pos)
Inserts the specified day to the special days list. |
void |
addLine(LyLine line,
int pos)
Computes the tree content again and resets the Gantt intervals dependencies. |
void |
centerOnDate(java.util.Date date)
(non-Javadoc). |
void |
displayTimeFrame()
(non-Javadoc). |
void |
fitSize(boolean fitView)
Updates the planning with the Gantt minimum and maximum size. |
void |
free()
Free resources allocated to this component. |
LyActionTransmitter |
getActionTransmitter()
(non-Javadoc). |
java.util.Date |
getBeginDate()
Returns the begin date of the planning (first visible date). |
java.util.Date |
getCenterDate()
(non-Javadoc). |
java.awt.Component |
getComponent()
(non-Javadoc). |
java.text.DateFormat |
getDateFormat()
Returns the date format of this component. |
java.text.DateFormat |
getDateTimeFormat()
Returns the date and time format of this component. |
java.util.Date |
getEndDate()
Returns the end date of the planning (last visible date). |
java.lang.Object |
getLock()
Get a lock on the table to prevent concurrent access on rows. |
java.util.Date |
getMaximumDate()
Returns the maximum date of this Gantt component. |
java.util.Date |
getMinimumDate()
Returns the minimum date of this Gantt component. |
LySelectionTransmitter |
getSelectionTransmitter()
(non-Javadoc). |
java.text.DateFormat |
getTimeFormat()
Returns the time format of this component. |
float |
getVerticalZoom()
(non-Javadoc). |
void |
removeDay(LyDay day)
Removes the specified day from the special days list. |
void |
removeLine(LyLine line)
Computes the tree content again and resets the Gantt intervals dependencies. |
void |
resetLinesDates()
Retrieves the Gantt lines of this planning and resets their minimum and maximum dates to this Gantt's dates values. |
void |
selectionPerformed(LySelectionEvent selectionEvent)
(non-Javadoc). |
void |
setBeginDate(java.lang.String date)
Not implemented. |
void |
setContent()
Sets the Gantt planning dates for this component. |
void |
setCurrentDateRefreshPeriod(int period)
Updates attribute currentDateRefreshPeriod to the given value. |
void |
setEndDate(java.lang.String date)
Not implemented. |
void |
setGanttElements(java.lang.Object treeElement,
java.util.Vector<LyGanttElement> ganttElements)
Sets the association between a tree element and Gantt elements of the planning. |
void |
setHCenteredLine(java.lang.String line)
(non-Javadoc). |
void |
setIdle(boolean status)
(non-Javadoc). |
void |
setVCenteredLine(java.lang.String lineId)
(non-Javadoc). |
void |
setVisible(boolean status)
Shows or hides the Gantt planning panel. |
void |
setZoomFactor(LyGantt.ZoomFactor scale)
Updates attribute zoomFactor to the given value. |
void |
startDivideInterval()
(non-Javadoc). |
void |
verticalZoomIn()
(non-Javadoc). |
void |
verticalZoomOut()
(non-Javadoc). |
Methods inherited from class leon.view.win.swing.LySwingPanel |
---|
setPopupMenu |
Methods inherited from class leon.view.win.swing.LySwingObject |
---|
getBounds, getChildrenBounds, getDefaultFrame |
Methods inherited from class leon.view.graphic.LyGraphicalObject |
---|
expand, getController, getEnv, getEnvironment, getIdCode, getIntResource, getMessage, 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 |
---|
getViewComponent |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LySwingGantt(LyGantt gantt)
gantt
- a GANTT component defined for every type of view targets. This gantt is
initialized specificaly for the Swing view.Method Detail |
---|
public void setIdle(boolean status)
setIdle
in interface LySetIdleInterface
status
- new idle status (LySetIdleInterface interface)LySetIdleInterface.setIdle(boolean)
public java.awt.Component getComponent()
getComponent
in interface LySwingComponent
getComponent
in class LySwingObject
LySwingComponent.getComponent()
public void setContent()
public void fitSize(boolean fitView)
fitView
- Indicates if the view rectangle must be updated.public void setHCenteredLine(java.lang.String line)
setHCenteredLine
in interface LyGraphicalGantt
line
- New value of hCenteredLine.LyGraphicalGantt.setHCenteredLine(java.lang.String)
public void setVCenteredLine(java.lang.String lineId)
setVCenteredLine
in interface LyGraphicalGantt
lineId
- New value of vCenteredLine.LyGraphicalGantt.setVCenteredLine(java.lang.String)
public java.util.Date getCenterDate()
getCenterDate
in interface LyGanttInterface
LyGanttInterface.getCenterDate()
public void centerOnDate(java.util.Date date)
centerOnDate
in interface LyGanttInterface
LyGanttInterface.centerOnDate(java.util.Date)
public void verticalZoomIn()
verticalZoomIn
in interface LyGanttInterface
LyGanttInterface.verticalZoomIn()
public void verticalZoomOut()
verticalZoomOut
in interface LyGanttInterface
LyGanttInterface.verticalZoomOut()
public float getVerticalZoom()
getVerticalZoom
in interface LyGanttInterface
LyGanttInterface.getVerticalZoom()
public void displayTimeFrame()
displayTimeFrame
in interface LyGanttInterface
LyGanttInterface.displayTimeFrame()
public void startDivideInterval()
startDivideInterval
in interface LyGanttInterface
LyGanttInterface.startDivideInterval()
public void resetLinesDates()
public void setZoomFactor(LyGantt.ZoomFactor scale)
LyGantt#ZoomFactor.MONTH_DAY
LyGantt#ZoomFactor.WEEK_DAY
LyGantt#ZoomFactor.DAY_2HOURS
LyGantt#ZoomFactor.DAY_HOUR
LyGantt#ZoomFactor.HOUR_15MINUTES
LyGantt#ZoomFactor.HOUR_5MINUTES
setZoomFactor
in interface LyGraphicalGantt
scale
- New value of zoomFactor.leon.view.graphic.LyGraphicalGantt#setZoomFactor(short)
public void setGanttElements(java.lang.Object treeElement, java.util.Vector<LyGanttElement> ganttElements)
treeElement
- the tree elementganttElements
- the Gantt elemnt to associate with the treeLyJGanttScrollPane.setGanttElements(Object, Vector)
public void addLine(LyLine line, int pos)
addLine
in interface LyGraphicalGantt
line
- Gantt line to add, not used in this implementationpos
- position of the line to add, not used in this implementationLyGraphicalGantt.addLine(leon.view.LyLine, int)
public void removeLine(LyLine line)
removeLine
in interface LyGraphicalGantt
line
- Gantt line to remove, not used in this implementationLyGraphicalGantt.removeLine(leon.view.LyLine)
public void actionPerformed(LyActionEvent actionEvent)
actionPerformed
in interface LyActionListener
LyActionListener.actionPerformed(leon.view.event.LyActionEvent)
public void selectionPerformed(LySelectionEvent selectionEvent)
selectionPerformed
in interface LySelectionListener
selectionEvent
- description of the selection which has occuredLySelectionListener.selectionPerformed(leon.view.event.LySelectionEvent)
public void setVisible(boolean status)
status
- new visibility statuspublic java.text.DateFormat getDateFormat()
setDateFormat(String, String)
public java.text.DateFormat getTimeFormat()
public java.text.DateFormat getDateTimeFormat()
public java.util.Date getMinimumDate()
public java.util.Date getMaximumDate()
public java.util.Date getBeginDate()
setBeginDate(String)
public java.util.Date getEndDate()
setEndDate(String)
public void setBeginDate(java.lang.String date)
setBeginDate
in interface LyGraphicalGantt
date
- not used in this implementationLyGraphicalGantt.setBeginDate(java.lang.String)
,
getBeginDate()
public void setEndDate(java.lang.String date)
setEndDate
in interface LyGraphicalGantt
date
- not used in this implementationLyGraphicalGantt.setEndDate(java.lang.String)
,
getEndDate()
public void setCurrentDateRefreshPeriod(int period)
LyGraphicalGantt
setCurrentDateRefreshPeriod
in interface LyGraphicalGantt
period
- New value of currentDateRefreshPeriod.LyGraphicalGantt.setCurrentDateRefreshPeriod(int)
public void addDay(LyDay day, int pos)
addDay
in interface LyGraphicalGantt
day
- the day to add to days listpos
- Position where the sub-component is inserted.LyGraphicalGantt.addDay(LyDay, int)
public void removeDay(LyDay day)
removeDay
in interface LyGraphicalGantt
day
- the day to removeLyGraphicalGantt.removeDay(LyDay)
public LyActionTransmitter getActionTransmitter()
getActionTransmitter
in interface LyEventTransmitter
getActionTransmitter
in class LySwingFieldItem
LyEventTransmitter.getActionTransmitter()
public LySelectionTransmitter getSelectionTransmitter()
getSelectionTransmitter
in interface LyEventTransmitter
getSelectionTransmitter
in class LySwingFieldItem
null
LyEventTransmitter.getSelectionTransmitter()
public void free()
free
in interface LyGraphicalComponent
free
in interface LyFreeInterface
free
in class LyGraphicalObject
LyFreeInterface.free()
public java.lang.Object getLock()
getLock
in interface LyGetLockInterface
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |