|
JavaGantt 2011.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.beesoft.gantt.chart.Layer
eu.beesoft.gantt.chart.DependencyLayer
public class DependencyLayer
Paints dependencies between gantt nodes.
Constructor Summary | |
---|---|
DependencyLayer()
Default constructor. |
Method Summary | |
---|---|
java.awt.Color |
getColor()
Returns color used to paint dependencies. |
protected void |
paint(java.awt.Graphics g)
Paints the dependencies between gantt nodes .This method simply checks for
each Dependency if it is visible on screen and if so, it delegates the painting to
the method paintDependency() . |
protected void |
paintDependency(Dependency dependency,
java.awt.Graphics g,
GanttNode dependant,
GanttNode dependsOn)
Paints the dependency between dependant node and
node on it depends . |
protected void |
paintLine(int x1,
int y1,
int x2,
int y2,
DependencyType type,
java.awt.Graphics g)
Paints a line between start point (x1, y1) and end point (x2, y2). |
void |
setColor(java.awt.Color dependencyColor)
Sets color used to paint dependencies. |
Methods inherited from class eu.beesoft.gantt.chart.Layer |
---|
getGantt, getGanttModel, getHeaderHeight, getChartComponent, getNodeAt, getPaintedNodes, getPosition, isVisible, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DependencyLayer()
Method Detail |
---|
public java.awt.Color getColor()
public void setColor(java.awt.Color dependencyColor)
dependencyColor
- the dependency color to setprotected void paint(java.awt.Graphics g)
gantt nodes
.This method simply checks for
each Dependency
if it is visible on screen and if so, it delegates the painting to
the method paintDependency()
.
paint
in class Layer
g
- - the graphics context to use for paintingprotected void paintDependency(Dependency dependency, java.awt.Graphics g, GanttNode dependant, GanttNode dependsOn)
dependency
between dependant node
and
node on it depends
. Method determines coordinates of dependency start and
end points and calls paintLine()
to paint dependency.
dependency
- - the Dependency to paintg
- - the graphics context to use for paintingdependant
- - the node that depends on another node (by dependant is painted an arrow)dependsOn
- - the node on which the dependant dependsprotected void paintLine(int x1, int y1, int x2, int y2, DependencyType type, java.awt.Graphics g)
x1
- - x-coordinate of start pointy1
- - y-coordinate of start pointx2
- - x-coordinate of end pointy2
- - y-coordinate of end pointtype
- - type of dependency, one of constants from Dependency
.g
- - the graphics context to use for painting
|
JavaGantt 2011.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |