diva.sketch
Class StrokeSymbol

java.lang.Object
  extended by diva.sketch.StrokeSymbol
All Implemented Interfaces:
Symbol

public class StrokeSymbol
extends Object
implements Symbol

A visual symbol derived from sketch input. It is derived from a stroke, and it keeps the outline/fill color and pen width information of the stroke.

Version:
$Revision: 1.2 $
Author:
Michael Shilman (michaels@eecs.berkeley.edu), Heloise Hse (hwawen@eecs.berkeley.edu)

Field Summary
 
Fields inherited from interface diva.sketch.Symbol
MIXED_COLOR, MIXED_LINEWIDTH
 
Constructor Summary
StrokeSymbol(TimedStroke stroke, Color outline, Color fill, float lineWidth)
          Create a symbol for the given stroke with the outline/fill color and line width information.
 
Method Summary
 Color getFill()
          Return the fill color of this symbol.
 float getLineWidth()
          Return the line width used to draw this symbol.
 Color getOutline()
          Return the outline color of this symbol.
 TimedStroke getStroke()
          Return the stroke that's wrapped by this symbol.
 void setFill(Color c)
          Set the fill color of this symbol.
 void setLineWidth(float w)
          Set the line width used to draw this symbol.
 void setOutline(Color c)
          Set the outline color of this symbol.
 void setStroke(TimedStroke stroke)
          Set the timed stroke of this symbol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrokeSymbol

public StrokeSymbol(TimedStroke stroke,
                    Color outline,
                    Color fill,
                    float lineWidth)
Create a symbol for the given stroke with the outline/fill color and line width information.

Method Detail

getStroke

public TimedStroke getStroke()
Return the stroke that's wrapped by this symbol.


getOutline

public Color getOutline()
Return the outline color of this symbol.

Specified by:
getOutline in interface Symbol

getFill

public Color getFill()
Return the fill color of this symbol. NULL denotes no fill.

Specified by:
getFill in interface Symbol

getLineWidth

public float getLineWidth()
Return the line width used to draw this symbol.

Specified by:
getLineWidth in interface Symbol

setOutline

public void setOutline(Color c)
Set the outline color of this symbol.

Specified by:
setOutline in interface Symbol

setFill

public void setFill(Color c)
Set the fill color of this symbol. NULL denotes no fill

Specified by:
setFill in interface Symbol

setLineWidth

public void setLineWidth(float w)
Set the line width used to draw this symbol.

Specified by:
setLineWidth in interface Symbol

setStroke

public void setStroke(TimedStroke stroke)
Set the timed stroke of this symbol. Note, this method is not intended for general use.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.