|
|||||||||
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.LabelLayer
public class LabelLayer
Paints text label beside node.
Constructor Summary | |
---|---|
LabelLayer()
Default constructor. |
Method Summary | |
---|---|
java.awt.Color |
getColor()
Returns the text color. |
java.awt.Font |
getFont()
Returns the text font. |
protected void |
paint(java.awt.Graphics g)
Paints labels for all on-screen visible nodes. |
protected void |
paintLabel(java.lang.String label,
GanttNode node,
java.awt.Graphics g)
Paints label for given node . |
void |
setColor(java.awt.Color textColor)
Sets the color used to paint text label. |
void |
setFont(java.awt.Font font)
Sets the font used to paint text label. |
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 LabelLayer()
Method Detail |
---|
public java.awt.Color getColor()
public void setColor(java.awt.Color textColor)
textColor
- the text color to setpublic java.awt.Font getFont()
public void setFont(java.awt.Font font)
font
- the font to setprotected void paint(java.awt.Graphics g)
getPaintedNodes()
.
Then it calls for each node GanttModel.getLabel(TimelineObject)
to get label for user object stored in node.
If returned label is not null, it delegates painting to
paintLabel(String, GanttNode, Graphics)
method, otherwise it
does nothing.
paint
in class Layer
g
- - the graphics context to use for paintingprotected void paintLabel(java.lang.String label, GanttNode node, java.awt.Graphics g)
node
. In this implementation is label
painted on the right from node.
label
- - text to paintnode
- - node to which label belongsg
- - the graphics context to use for painting
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |