|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.dlsc.flexgantt.swing.layer.AbstractLayer com.dlsc.flexgantt.swing.layer.system.AbstractSystemLayer com.dlsc.flexgantt.swing.layer.system.CrosshairLayer
public class CrosshairLayer
The crosshair layer renders the crosshair cursor, which can be used to take a
closer look at the timeline objects. The crosshair can be customized via the
ICrosshairPolicy
, which returns labels that are shown in the four
corners of the crosshair.
Field Summary |
---|
Fields inherited from class com.dlsc.flexgantt.swing.layer.AbstractLayer |
---|
alpha, changeSupport, ganttChart, layerContainer, PROPERTY_ALPHA, PROPERTY_VISIBLE |
Constructor Summary | |
---|---|
CrosshairLayer(LayerContainer lc)
Constructs a new crosshair layer. |
Method Summary | |
---|---|
int |
getCircleRadius()
Returns the radius / size used for drawing the crosshair circle. |
java.awt.Color |
getFillColor()
Returns the color that will be used to fill out the crosshair circle. |
java.awt.Color |
getLineColor()
Returns the color used to draw the horizontal and vertical crosshair lines. |
java.awt.BasicStroke |
getStroke()
Returns the stroke used to draw the crosshair lines. |
java.awt.Color |
getTextColor()
Returns the color used to draw the text in the four corners of the crosshair. |
boolean |
isHorizontalLineVisible()
Determines whether the horizontal line will be drawn. |
boolean |
isVerticalLineVisible()
Determines whether the vertical line will be drawn. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
|
protected void |
paintLayer(java.awt.Graphics g)
|
void |
setCircleRadius(int radius)
Sets the radius / size for drawing the crosshair circle. |
void |
setFillColor(java.awt.Color color)
Sets the color that will be used to fill out the crosshair circle. |
void |
setHorizontalLineVisible(boolean visible)
Specifies whether the horizontal crosshair line will be drawn or not. |
void |
setLineColor(java.awt.Color color)
Sets the color used to draw the vertical and horizontal crosshair lines. |
void |
setStroke(java.awt.BasicStroke stroke)
Sets the stroke used to draw the crosshair lines. |
void |
setTextColor(java.awt.Color color)
Sets the color used to draw the text in the four corners of the crosshair. |
void |
setVerticalLineVisible(boolean visible)
Specifies whether the vertical crosshair line will be drawn or not. |
void |
setVisible(boolean visible)
Overriden to add / remove mouse listeners to / from the layer container. |
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, isVisible, removePropertyChangeListener, repaint, repaint, repaint, setAlpha, tearDown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CrosshairLayer(LayerContainer lc)
lc
- the layer container to which the layer belongsMethod Detail |
---|
public void setVisible(boolean visible)
setVisible
in class AbstractLayer
visible
- if TRUE the layer will be visibleAbstractLayer.isVisible()
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
protected void paintLayer(java.awt.Graphics g)
paintLayer
in class AbstractLayer
public java.awt.BasicStroke getStroke()
public void setStroke(java.awt.BasicStroke stroke)
stroke
- the stroke used for drawing the crosshair linespublic boolean isHorizontalLineVisible()
public void setHorizontalLineVisible(boolean visible)
visible
- if TRUE the horizontal line will be drawnpublic boolean isVerticalLineVisible()
public void setVerticalLineVisible(boolean visible)
visible
- if TRUE the vertical line will be drawnpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public int getCircleRadius()
public void setCircleRadius(int radius)
radius
- the size of the crosshair circlepublic java.awt.Color getFillColor()
public void setFillColor(java.awt.Color color)
color
- the crosshair circle fill colorpublic java.awt.Color getLineColor()
public void setLineColor(java.awt.Color color)
color
- the crosshair line colorpublic java.awt.Color getTextColor()
public void setTextColor(java.awt.Color color)
color
- the crosshair text color
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |