|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.beesoft.gantt.chart.Layer
public abstract class Layer
A layer is an object having a graphical representation that can be displayed in the gantt chart and that can interact with the user.
The Layer class is the abstract superclass of the each gantt chart layer.
Gantt ChartComponent
holds a stack of user-defined layers. When the
method paint()
on ChartComponent is
invoked, it walks through this stack (in order the layers were added) and if
the layer is visible (method isVisible()
return true) calls method
paint()
on it.
Constructor Summary | |
---|---|
Layer()
Default constructor |
Method Summary | |
---|---|
protected JGantt |
getGantt()
Returns instance of JGantt to which this Layer belongs. |
protected GanttModel |
getGanttModel()
Returns GanttModel for this gantt chart. |
protected int |
getHeaderHeight()
Returns height of tree-table header. |
protected ChartComponent |
getChartComponent()
Returns gantt ChartComponent for this Layer. |
protected GanttNode |
getNodeAt(int x,
int y)
Returns the gantt node at the specified location of ChartComponent . |
protected java.util.List<GanttNode> |
getPaintedNodes()
Returns list of currently on-screen visible and painted gantt nodes. |
protected int |
getPosition(java.util.Date date)
Returns x-coordinate for given date. |
boolean |
isVisible()
Returns value of property 'visible'. |
protected void |
mouseClicked(java.awt.event.MouseEvent e)
Invoked when the mouse has been clicked on a component. |
protected void |
mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. |
protected void |
mouseEntered(java.awt.event.MouseEvent e)
Invoked when the mouse enters a component. |
protected void |
mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component. |
protected void |
mouseMoved(java.awt.event.MouseEvent e)
Invoked when the mouse button has been moved on a component (with no buttons no down). |
protected void |
mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component. |
protected void |
mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component. |
protected abstract void |
paint(java.awt.Graphics g)
Paints this layer. |
void |
setVisible(boolean visible)
Sets new value for property 'visible'. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Layer()
Method Detail |
---|
protected JGantt getGantt()
JGantt
to which this Layer belongs.
protected GanttModel getGanttModel()
GanttModel
for this gantt chart.
protected ChartComponent getChartComponent()
ChartComponent
for this Layer.
public boolean isVisible()
public void setVisible(boolean visible)
visible
- - new value for property 'visible'protected int getHeaderHeight()
protected java.util.List<GanttNode> getPaintedNodes()
protected int getPosition(java.util.Date date)
protected abstract void paint(java.awt.Graphics g)
Method is called from JComponent.paint(Graphics)
after all
node parameters are set.
Subclasses must implement this method to paint layer.
g
- - the graphics context to use for paintingprotected void mouseClicked(java.awt.event.MouseEvent e)
protected void mouseEntered(java.awt.event.MouseEvent e)
protected void mouseExited(java.awt.event.MouseEvent e)
protected void mousePressed(java.awt.event.MouseEvent e)
protected void mouseReleased(java.awt.event.MouseEvent e)
protected void mouseMoved(java.awt.event.MouseEvent e)
protected void mouseDragged(java.awt.event.MouseEvent e)
protected GanttNode getNodeAt(int x, int y)
ChartComponent
.
x
- - an integer giving the number of pixels horizontally from the
left edge of the ChartComponenty
- - an integer giving the number of pixels vertically from the
top of the ChartComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |