com.dlsc.flexgantt.swing.layer.system
Class DatelineLayer

java.lang.Object
  extended by com.dlsc.flexgantt.swing.layer.AbstractLayer
      extended by com.dlsc.flexgantt.swing.layer.system.AbstractSystemLayer
          extended by com.dlsc.flexgantt.swing.layer.system.DatelineLayer
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class DatelineLayer
extends AbstractSystemLayer
implements java.beans.PropertyChangeListener

The dateline layer visualizes the time span that currently has the focus in the dateline so that the user can more easily identify the timeline objects that intersect with this span. The focused time span is the time span between two major or minor grid locations, depending on whether the mouse cursor hovers over the upper or the lower part of the dateline. The dateline layer will draw a semi-transparent rectangle from the top to the bottom of the layer container. The transparency of the rectangle can be controlled with the layer's alpha value. The layer will draw the same rectangle when the user performs a time span selection in the dateline.

Since:
1.0
Author:
Dirk Lemmermann

Field Summary
 
Fields inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer
alpha, changeSupport, ganttChart, layerContainer, PROPERTY_ALPHA, PROPERTY_VISIBLE
 
Constructor Summary
DatelineLayer(LayerContainer lc)
          Constructs a new dateline layer.
 
Method Summary
 java.awt.Paint getFocusedTimeSpanFillPaint()
          Returns the paint object used for filling the focused time span rectangle.
 java.awt.Paint getFocusedTimeSpanLinePaint()
          Returns the paint object used for drawing the lines of the focused time span rectangle.
 boolean isFocusedTimeVisible()
          Determines whether the focused time span will be shown or not.
 boolean isVisible()
          Determines whether the layer is currently visible or not.
protected  void paintLayer(java.awt.Graphics g)
           
 void propertyChange(java.beans.PropertyChangeEvent evt)
           
 void setFocusedTimeSpanFillPaint(java.awt.Paint fillPaint)
          Sets the paint object used for filling the focused time span rectangle.
 void setFocusedTimeSpanLinePaint(java.awt.Paint color)
          Sets the paint object used for drawing the lines of the focused time span rectangle.
 void setFocusedTimeVisible(boolean visible)
          Specifies whether the focused time span will be shown or not.
 
Methods inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer
addPropertyChangeListener, getAlpha, getDateline, getEventline, getGanttChart, getLayerContainer, getLayerPolicyProvider, getModel, getName, getStartRow, getTimeAt, getTimeline, getTimeLocation, getTimeSpanUsed, getToolTipText, getTreeTable, getTreeTablePolicyProvider, removePropertyChangeListener, repaint, repaint, repaint, setAlpha, setVisible, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatelineLayer

public DatelineLayer(LayerContainer lc)
Constructs a new dateline layer.

Parameters:
lc - the layer container to which the layer belongs
Since:
1.0
Method Detail

isVisible

public boolean isVisible()
Description copied from class: AbstractLayer
Determines whether the layer is currently visible or not.

Overrides:
isVisible in class AbstractLayer
Returns:
TRUE if the layer is currently visible
See Also:
AbstractLayer.setVisible(boolean)

paintLayer

protected void paintLayer(java.awt.Graphics g)
Overrides:
paintLayer in class AbstractLayer

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent evt)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

getFocusedTimeSpanFillPaint

public java.awt.Paint getFocusedTimeSpanFillPaint()
Returns the paint object used for filling the focused time span rectangle.

Returns:
the paint used for filling the focused time span rectangle
Since:
1.0

setFocusedTimeSpanFillPaint

public void setFocusedTimeSpanFillPaint(java.awt.Paint fillPaint)
Sets the paint object used for filling the focused time span rectangle.

Parameters:
fillPaint - the paint used for filling the focused time span rectangle
Since:
1.0

getFocusedTimeSpanLinePaint

public java.awt.Paint getFocusedTimeSpanLinePaint()
Returns the paint object used for drawing the lines of the focused time span rectangle.

Returns:
the focused time span line paint
Since:
1.0

setFocusedTimeSpanLinePaint

public void setFocusedTimeSpanLinePaint(java.awt.Paint color)
Sets the paint object used for drawing the lines of the focused time span rectangle.

Parameters:
color - the focused time span line paint
Since:
1.0

isFocusedTimeVisible

public boolean isFocusedTimeVisible()
Determines whether the focused time span will be shown or not.

Returns:
TRUE if the focused time span gets shown
Since:
1.0

setFocusedTimeVisible

public void setFocusedTimeVisible(boolean visible)
Specifies whether the focused time span will be shown or not.

Parameters:
visible - if TRUE the focused time span gets shown
Since:
1.0