net.nexttext.property
Class StrokeProperty

java.lang.Object
  extended by net.nexttext.property.Property
      extended by net.nexttext.property.StrokeProperty
All Implemented Interfaces:
java.lang.Cloneable

public class StrokeProperty
extends Property

A stroke property for a TextObject (using the BasicStroke implementation). Allows to draw outlines of glyphs in NextText.

The stroke is centered on the control points of a glyph, which means that for larger strokes, the control points will be inside of the stroke. Thus, large strokes will exceed the bounding polygon.


Constructor Summary
StrokeProperty()
          Creates a new StrokeProperty using a stroke of width 1.
StrokeProperty(java.awt.BasicStroke stroke)
          Creates a new StrokeProperty from the java.awt.BasicStroke object.
 
Method Summary
 java.awt.BasicStroke get()
          Do not modify the returned value, use set() to make changes instead.
 java.awt.BasicStroke getOriginal()
          Returns the original stroke.
 boolean isInherited()
          Returns the inherited status of this StrokeProperty.
 void reset()
          Reset interface from superclass.
 void set(java.awt.BasicStroke newStroke)
          Sets the Stroke property to the specified value.
 void setInherited(boolean inherited)
          Setting inherited to true on a StrokeProperty will cause it to bypass it's current stroke value in favor of the stroke value of its parent.
 void setOriginal(java.awt.BasicStroke newStroke)
          Modifies the original stroke value.
 
Methods inherited from class net.nexttext.property.Property
addChangeListener, clone, getName, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrokeProperty

public StrokeProperty()
Creates a new StrokeProperty using a stroke of width 1. The default attributes are a solid line of width 1.0, CAP_BUTT, JOIN_ROUND, which give the best rendering with most glyphs.

The stroke property is inherited by default.


StrokeProperty

public StrokeProperty(java.awt.BasicStroke stroke)
Creates a new StrokeProperty from the java.awt.BasicStroke object.

The stroke property is not inherited by default.

Method Detail

get

public java.awt.BasicStroke get()
Do not modify the returned value, use set() to make changes instead.


set

public void set(java.awt.BasicStroke newStroke)
Sets the Stroke property to the specified value. Also sets the Inherited property to false.


getOriginal

public java.awt.BasicStroke getOriginal()
Returns the original stroke.


setOriginal

public void setOriginal(java.awt.BasicStroke newStroke)
Modifies the original stroke value.


setInherited

public void setInherited(boolean inherited)
Setting inherited to true on a StrokeProperty will cause it to bypass it's current stroke value in favor of the stroke value of its parent. By default a StrokeProperty is not inherited.


isInherited

public boolean isInherited()
Returns the inherited status of this StrokeProperty.


reset

public void reset()
Reset interface from superclass. Resets the stroke to its original value.

Specified by:
reset in class Property