|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.plaf.basic.BasicGanttEntryRelationPainter
public class BasicGanttEntryRelationPainter
The painter class to paint the relation between entries.
Constructor Summary | |
---|---|
BasicGanttEntryRelationPainter(int width)
The constructor. |
|
BasicGanttEntryRelationPainter(int width,
Shape startShape,
Shape endShape,
Insets entryPadding)
The constructor. |
Method Summary | |
---|---|
protected boolean |
checkValidRange(Range<?> range)
Checks if the range is valid. |
protected Point2D |
getAttachPoint(Graphics2D graphics,
GanttChart<Object,GanttEntry<Object>> ganttChart,
Rectangle entryRect,
int row,
boolean start)
Gets the attach point. |
protected Point2D |
getEndPoint(Graphics2D g2d,
GanttChart<Object,GanttEntry<Object>> ganttChart,
Point2D attachPoint,
boolean fromStart,
double width)
Gets the end point. |
Shape |
getEndShape()
Gets the end shape. |
Paint |
getEndShapeFillPaint()
Gets the end shape fill paint. |
Paint |
getEndShapeOutlinePaint()
Gets the end shape outline paint. |
Stroke |
getEndShapeStroke()
Gets the end shape stroke. |
Insets |
getGroupOffSet()
Gets the group offset. |
protected int |
getIndexOf(GanttChart<Object,GanttEntry<Object>> ganttChart,
GanttEntry<Object> entry)
Gets the index of the entry. |
Paint |
getInvalidLinePaint()
Gets the invalid line paint. |
Stroke |
getInvalidLineStroke()
Gets the invalid line stroke. |
Stroke |
getInvisibleStroke()
Gets the invisible stroke. |
Paint |
getLinePaint()
Gets the line paint. |
Stroke |
getLineStroke()
Gets the line stroke. |
Insets |
getMilestoneOffSet()
Gets the milestone offset. |
protected Point2D |
getRowBoundaryPoint(Graphics2D g2d,
GanttChart<Object,GanttEntry<Object>> ganttChart,
Rectangle fromEntryRect,
int fromRow,
Point2D fromPoint,
Rectangle toEntryRect,
int toRow,
Point2D toPoint,
int type,
boolean forwards)
Gets the boundary point for the row. |
Shape |
getStartShape()
Gets the start shape. |
Paint |
getStartShapeFillPaint()
Gets the start shape fill paint. |
Paint |
getStartShapeOutlinePaint()
Gets the start shape outline paint. |
Stroke |
getStartShapeStroke()
Gets the start shape stroke. |
int |
getWidth()
Gets the width. |
boolean |
isConnectToParent()
Gets the flag indicating if the relation should connect to the parent. |
protected boolean |
isRelationValid(GanttChart<Object,GanttEntry<Object>> ganttChart,
GanttEntryRelation<GanttEntry<Object>> relation)
Checks if the relation is valid. |
protected void |
paintLine(Graphics2D graphics,
Shape path,
boolean valid,
Stroke validStroke,
Paint validPaint,
Stroke invalidStroke,
Paint invalidPaint)
Paints the line. |
void |
paintRelation(Graphics graphics,
GanttChart<Object,GanttEntry<Object>> ganttChart,
GanttEntryRelation<GanttEntry<Object>> relation,
boolean selected,
boolean focused)
|
protected void |
paintShape(Graphics2D graphics,
GanttChart<Object,GanttEntry<Object>> entry,
Point2D attachPoint,
Shape shape,
Stroke shapeOutlineStroke,
Paint shapeOutlinePaint,
Paint shapeFillPaint)
Paints the shape. |
void |
setConnectToParent(boolean connectToParent)
Sets the flag indicating if the relation should connect to the parent. |
void |
setEndShape(Shape endShape)
Sets the end shape. |
void |
setEndShapeFillPaint(Paint endShapeFillPaint)
Sets the end shape fill paint. |
void |
setEndShapeOutlinePaint(Paint endShapeOutlinePaint)
Sets the end shape outline paint. |
void |
setEndShapeStroke(Stroke endShapeStroke)
Sets the end shape stroke. |
void |
setGroupOffset(Insets groupOffset)
Sets the group offset. |
void |
setInvalidLinePaint(Paint invalidLinePaint)
Sets the invalid line paint. |
void |
setInvalidLineStroke(Stroke invalidLineStroke)
Sets the invalid line stroke. |
void |
setInvisibleStroke(Stroke invisibleStroke)
Sets the invisible stroke. |
void |
setLinePaint(Paint linePaint)
Sets the line paint. |
void |
setLineStroke(Stroke lineStroke)
Sets the line stroke. |
void |
setMilestoneOffset(Insets milestoneOffset)
Sets the milestone offset. |
void |
setStartShape(Shape startShape)
Sets the start shape. |
void |
setStartShapeFillPaint(Paint startShapeFillPaint)
Sets the start shape fill paint. |
void |
setStartShapeOutlinePaint(Paint startShapeOutlinePaint)
Sets the start shape outline paint. |
void |
setStartShapeStroke(Stroke startShapeStroke)
Sets the start shape stroke. |
void |
setWidth(int width)
Sets the width. |
protected Shape |
transformShape(Graphics2D g2d,
GanttChart<Object,GanttEntry<Object>> entry,
Shape shape,
boolean forwards)
Transforms shape. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicGanttEntryRelationPainter(int width)
width
- the widthpublic BasicGanttEntryRelationPainter(int width, Shape startShape, Shape endShape, Insets entryPadding)
width
- the widthstartShape
- the start shapeendShape
- the end shapeentryPadding
- the entry paddingMethod Detail |
---|
public void paintRelation(Graphics graphics, GanttChart<Object,GanttEntry<Object>> ganttChart, GanttEntryRelation<GanttEntry<Object>> relation, boolean selected, boolean focused)
paintRelation
in interface GanttEntryRelationPainter
protected void paintLine(Graphics2D graphics, Shape path, boolean valid, Stroke validStroke, Paint validPaint, Stroke invalidStroke, Paint invalidPaint)
graphics
- the Graphics2D instancepath
- the shapevalid
- if the line is validvalidStroke
- the valid strokevalidPaint
- the valid paintinvalidStroke
- the invalid strokeinvalidPaint
- the invalid paintprotected boolean isRelationValid(GanttChart<Object,GanttEntry<Object>> ganttChart, GanttEntryRelation<GanttEntry<Object>> relation)
ganttChart
- the gantt chartrelation
- the relation
protected boolean checkValidRange(Range<?> range)
range
- the range
protected int getIndexOf(GanttChart<Object,GanttEntry<Object>> ganttChart, GanttEntry<Object> entry)
ganttChart
- the gantt chartentry
- the gantt entry
protected void paintShape(Graphics2D graphics, GanttChart<Object,GanttEntry<Object>> entry, Point2D attachPoint, Shape shape, Stroke shapeOutlineStroke, Paint shapeOutlinePaint, Paint shapeFillPaint)
graphics
- the Graphics2D instanceentry
- the gantt entryattachPoint
- the attach pointshape
- the shapeshapeOutlineStroke
- the shape outline strokeshapeOutlinePaint
- the shape outline paintshapeFillPaint
- the shape fill paintprotected Shape transformShape(Graphics2D g2d, GanttChart<Object,GanttEntry<Object>> entry, Shape shape, boolean forwards)
g2d
- the Graphics2D instanceentry
- the gantt entryshape
- the shapeforwards
- the forward/backward flag
protected Point2D getEndPoint(Graphics2D g2d, GanttChart<Object,GanttEntry<Object>> ganttChart, Point2D attachPoint, boolean fromStart, double width)
g2d
- the Graphics2D instanceganttChart
- the gantt chartattachPoint
- the attach pointfromStart
- the from start/end flagwidth
- the width
protected Point2D getRowBoundaryPoint(Graphics2D g2d, GanttChart<Object,GanttEntry<Object>> ganttChart, Rectangle fromEntryRect, int fromRow, Point2D fromPoint, Rectangle toEntryRect, int toRow, Point2D toPoint, int type, boolean forwards)
g2d
- the Graphics2D instanceganttChart
- the gantt chartfromEntryRect
- the from entry rectanglefromRow
- the from rowfromPoint
- the end point of relation line attached to the entrytoEntryRect
- the to entry rectangletoRow
- the to rowtoPoint
- the end point of relation line attached to the opposite entrytype
- the relation typeforwards
- if the row boundary point is to the right of the from attach point
protected Point2D getAttachPoint(Graphics2D graphics, GanttChart<Object,GanttEntry<Object>> ganttChart, Rectangle entryRect, int row, boolean start)
graphics
- the Graphics2D instanceganttChart
- the gantt chartentryRect
- the gantt entryrow
- the rowstart
- the from start/end flag
public void setConnectToParent(boolean connectToParent)
connectToParent
- the flagpublic boolean isConnectToParent()
public Stroke getInvisibleStroke()
public void setInvisibleStroke(Stroke invisibleStroke)
invisibleStroke
- the invisible strokepublic Shape getStartShape()
public void setStartShape(Shape startShape)
startShape
- the start shapepublic Shape getEndShape()
public void setEndShape(Shape endShape)
endShape
- the end shapepublic int getWidth()
public void setWidth(int width)
width
- widthpublic Stroke getLineStroke()
public void setLineStroke(Stroke lineStroke)
lineStroke
- line strokepublic Paint getLinePaint()
public void setLinePaint(Paint linePaint)
linePaint
- the line paintpublic Paint getInvalidLinePaint()
public void setInvalidLinePaint(Paint invalidLinePaint)
invalidLinePaint
- the invalid line paintpublic Stroke getInvalidLineStroke()
public void setInvalidLineStroke(Stroke invalidLineStroke)
invalidLineStroke
- the invalid line strokepublic Stroke getStartShapeStroke()
public void setStartShapeStroke(Stroke startShapeStroke)
startShapeStroke
- the start shape strokepublic Paint getStartShapeOutlinePaint()
public void setStartShapeOutlinePaint(Paint startShapeOutlinePaint)
startShapeOutlinePaint
- the start shape outline paintpublic Paint getStartShapeFillPaint()
public void setStartShapeFillPaint(Paint startShapeFillPaint)
startShapeFillPaint
- the start shape fill paintpublic Stroke getEndShapeStroke()
public void setEndShapeStroke(Stroke endShapeStroke)
endShapeStroke
- end shape strokepublic Paint getEndShapeOutlinePaint()
public void setEndShapeOutlinePaint(Paint endShapeOutlinePaint)
endShapeOutlinePaint
- the end shape outline paintpublic Paint getEndShapeFillPaint()
public void setEndShapeFillPaint(Paint endShapeFillPaint)
endShapeFillPaint
- the end shape fill paintpublic Insets getGroupOffSet()
public void setGroupOffset(Insets groupOffset)
groupOffset
- the group offsetpublic Insets getMilestoneOffSet()
public void setMilestoneOffset(Insets milestoneOffset)
milestoneOffset
- the milestone offset
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |