Cytoscape 2.8.0 API

cytoscape.visual.strokes
Class ZeroStroke

java.lang.Object
  extended by java.awt.BasicStroke
      extended by 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.


Field Summary
 
Fields inherited from class java.awt.BasicStroke
CAP_BUTT, CAP_ROUND, CAP_SQUARE, JOIN_BEVEL, JOIN_MITER, JOIN_ROUND
 
Constructor Summary
ZeroStroke(WidthStroke actualStroke)
           
 
Method Summary
 LineStyle getLineStyle()
           
 WidthStroke newInstanceForWidth(float w)
           
 String toString()
           
 
Methods inherited from class java.awt.BasicStroke
createStrokedShape, equals, getDashArray, getDashPhase, getEndCap, getLineJoin, getLineWidth, getMiterLimit, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Stroke
createStrokedShape
 

Constructor Detail

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.
Method Detail

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

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.