edu.umd.cs.piccolox.util
Class PSemanticStroke

java.lang.Object
  extended by edu.umd.cs.piccolox.util.PSemanticStroke
All Implemented Interfaces:
Stroke
Direct Known Subclasses:
PFixedWidthStroke

abstract class PSemanticStroke
extends Object
implements Stroke

Version:
1.3
Author:
Marcus Rohrmoser
See Also:
PPath, Stroke

Field Summary
protected  Stroke stroke
           
protected static double THRESHOLD
           
 
Constructor Summary
protected PSemanticStroke(Stroke stroke)
           
 
Method Summary
 Shape createStrokedShape(Shape s)
          Ask getActiveScale(), call newStroke(float) if necessary and delegate to Stroke.createStrokedShape(Shape).
 boolean equals(Object obj)
          Returns true if this stroke is equivalent to the object provided.
protected  float getActiveScale()
          Detect the current scale.
 int hashCode()
           
protected abstract  Stroke newStroke(float activeScale)
          Factory to create a new internal stroke delegate.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

THRESHOLD

protected static final double THRESHOLD
See Also:
Constant Field Values

stroke

protected final Stroke stroke
Constructor Detail

PSemanticStroke

protected PSemanticStroke(Stroke stroke)
Method Detail

createStrokedShape

public Shape createStrokedShape(Shape s)
Ask getActiveScale(), call newStroke(float) if necessary and delegate to Stroke.createStrokedShape(Shape).

Specified by:
createStrokedShape in interface Stroke
Parameters:
s -

equals

public boolean equals(Object obj)
Returns true if this stroke is equivalent to the object provided.

Overrides:
equals in class Object
Parameters:
obj - Object being tested
Returns:
true if object is equivalent

getActiveScale

protected float getActiveScale()
Detect the current scale. Made protected to enable custom re-implementations.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

newStroke

protected abstract Stroke newStroke(float activeScale)
Factory to create a new internal stroke delegate. Made protected to enable custom re-implementations.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 1995-2010 Piccolo2D. All Rights Reserved.