cytoscape.visual.strokes
Class ZeroStroke
java.lang.Object
java.awt.BasicStroke
cytoscape.visual.strokes.ZeroStroke
- All Implemented Interfaces:
- WidthStroke, Stroke
public class ZeroStroke
- extends BasicStroke
- implements WidthStroke
Rather than handle strokes of width 0 for all implementations of WidthStroke,
use this wrapper class that, when the width is less than or equal to 0 a
BasicStroke is returned, whereas when the width is greater than 0, return the
specified actual WidthStroke.
ZeroStroke
public ZeroStroke(WidthStroke actualStroke)
- Parameters:
actualStroke
- The actual WidthStroke that this ZeroStroke represents. This
object will be used whenever the width for a new instance is greater than 0.
newInstanceForWidth
public WidthStroke newInstanceForWidth(float w)
- Specified by:
newInstanceForWidth
in interface WidthStroke
- Returns:
- A new instance of this WidthStroke with the specified width.
getLineStyle
public LineStyle getLineStyle()
- Specified by:
getLineStyle
in interface WidthStroke
- Returns:
- the LineStyle associated with this particular WidthStroke.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright 2010 Cytoscape Consortium. All rights reserved.