eu.beesoft.gantt.chart
Class GridLayer

java.lang.Object
  extended by eu.beesoft.gantt.chart.Layer
      extended by eu.beesoft.gantt.chart.GridLayer

public class GridLayer
extends Layer

Paints grid (horizontal and vertical lines) in gantt chart component.


Constructor Summary
GridLayer()
          Default constructor.
 
Method Summary
 java.awt.Color getHorizontalLineColor()
          Returns color used to paint horizontal lines.
 java.awt.Color getMajorLineColor()
          Returns color used to paint major vertical lines.
 java.awt.Color getMinorLineColor()
          Returns color used to paint minor vertical lines.
 boolean isHorizontalLineVisible()
          Returns true if horizontal lines should be painted.
 boolean isMajorLineThick()
          Returns true if major vertical lines are painted thick (2 points).
 boolean isMajorLineVisible()
          Returns true if major vertical lines should be painted.
 boolean isMinorLineVisible()
          Returns true if minor vertical lines should be painted.
protected  void paint(java.awt.Graphics g)
          Paints a grid.
 void setHorizontalLineColor(java.awt.Color horizontalLineColor)
          Sets the color used to paint horizontal lines.
 void setHorizontalLineVisible(boolean horizontalLineVisible)
          Sets new state of horizontal lines visible property.
 void setMajorLineColor(java.awt.Color majorLineColor)
          Sets the color used to paint major vertical lines.
 void setMajorLineThick(boolean majorLineThick)
          Sets major vertical lines thickness.
 void setMajorLineVisible(boolean majorLineVisible)
          Sets new state of major vertical lines visible property.
 void setMinorLineColor(java.awt.Color minorLineColor)
          Sets the color used to paint minor vertical lines.
 void setMinorLineVisible(boolean minorLineVisible)
          Sets new state of minor vertical lines visible property.
 
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

GridLayer

public GridLayer()
Default constructor.

Method Detail

isHorizontalLineVisible

public boolean isHorizontalLineVisible()
Returns true if horizontal lines should be painted.

Returns:
state of horizontal line visible property

setHorizontalLineVisible

public void setHorizontalLineVisible(boolean horizontalLineVisible)
Sets new state of horizontal lines visible property. If true, horizontal lines will be painted.

Parameters:
horizontalLineVisible - - new value for property 'horizontal line visible'

getHorizontalLineColor

public java.awt.Color getHorizontalLineColor()
Returns color used to paint horizontal lines.

Returns:
horizontal line color

setHorizontalLineColor

public void setHorizontalLineColor(java.awt.Color horizontalLineColor)
Sets the color used to paint horizontal lines.

Parameters:
horizontalLineColor - - horizontal line color to set

isMajorLineVisible

public boolean isMajorLineVisible()
Returns true if major vertical lines should be painted.

Returns:
state of major line visible property

setMajorLineVisible

public void setMajorLineVisible(boolean majorLineVisible)
Sets new state of major vertical lines visible property. If true, major vertical lines will be painted.

Parameters:
majorLineVisible - - new value for property 'major line visible'

getMajorLineColor

public java.awt.Color getMajorLineColor()
Returns color used to paint major vertical lines.

Returns:
major vertical line color

setMajorLineColor

public void setMajorLineColor(java.awt.Color majorLineColor)
Sets the color used to paint major vertical lines.

Parameters:
majorLineColor - - major vertical line color to set

isMajorLineThick

public boolean isMajorLineThick()
Returns true if major vertical lines are painted thick (2 points).

Returns:
state of major line thick property

setMajorLineThick

public void setMajorLineThick(boolean majorLineThick)
Sets major vertical lines thickness. If true, major lines are painted thick (2 points).

Parameters:
majorLineThick - - new value for property majorLineThick

isMinorLineVisible

public boolean isMinorLineVisible()
Returns true if minor vertical lines should be painted.

Returns:
state of minor line visible property

setMinorLineVisible

public void setMinorLineVisible(boolean minorLineVisible)
Sets new state of minor vertical lines visible property. If true, minor vertical lines will be painted.

Parameters:
minorLineVisible - - new value for property 'minor line visible'

getMinorLineColor

public java.awt.Color getMinorLineColor()
Returns color used to paint minor vertical lines.

Returns:
minor vertical line color

setMinorLineColor

public void setMinorLineColor(java.awt.Color minorLineColor)
Sets the color used to paint minor vertical lines.

Parameters:
minorLineColor - - minor vertical line color to set

paint

protected void paint(java.awt.Graphics g)
Paints a grid.

Specified by:
paint in class Layer
Parameters:
g - - the graphics context to use for painting