edu.rit.slides.items
Class SolidOutline

java.lang.Object
  extended by edu.rit.slides.items.SolidOutline
All Implemented Interfaces:
Outline, Externalizable, Serializable

public class SolidOutline
extends Object
implements Outline

Class SolidOutline provides an object that outlines an area in a SlideItem with a square-cornered solid stroke in a solid color.

See Also:
Serialized Form

Field Summary
static Fill NORMAL_FILL
          The normal solid outline fill paint (black).
static SolidOutline NORMAL_OUTLINE
          The normal solid outline (width = 1, fill paint = black).
static float NORMAL_WIDTH
          The normal solid outline width (1).
 
Fields inherited from interface edu.rit.slides.items.Outline
NONE
 
Constructor Summary
SolidOutline()
          Construct a new solid outline object with the normal width (1) and the normal fill paint (black).
SolidOutline(Fill theFill)
          Construct a new solid outline object with the normal width (1) and the given fill paint.
SolidOutline(float theWidth)
          Construct a new solid outline object with the given width and the normal fill paint (black).
SolidOutline(float theWidth, Fill theFill)
          Construct a new solid outline object with the given width and the given fill paint.
 
Method Summary
 float getStrokeWidth()
          Returns the stroke width of this outline.
 void readExternal(ObjectInput in)
          Read this solid outline object from the given object input stream.
 void setGraphicsContext(Graphics2D g2d)
          Set the given graphics context's stroke and paint attributes as specified by this outline object.
 void writeExternal(ObjectOutput out)
          Write this solid outline object to the given object output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL_WIDTH

public static final float NORMAL_WIDTH
The normal solid outline width (1).

See Also:
Constant Field Values

NORMAL_FILL

public static final Fill NORMAL_FILL
The normal solid outline fill paint (black).


NORMAL_OUTLINE

public static final SolidOutline NORMAL_OUTLINE
The normal solid outline (width = 1, fill paint = black).

Constructor Detail

SolidOutline

public SolidOutline()
Construct a new solid outline object with the normal width (1) and the normal fill paint (black).


SolidOutline

public SolidOutline(float theWidth)
Construct a new solid outline object with the given width and the normal fill paint (black).

Parameters:
theWidth - Width.
Throws:
IllegalArgumentException - (unchecked exception) Thrown if theWidth is less than or equal to 0.

SolidOutline

public SolidOutline(Fill theFill)
Construct a new solid outline object with the normal width (1) and the given fill paint.

Parameters:
theFill - Fill paint.
Throws:
NullPointerException - (unchecked exception) Thrown if theFill is null.

SolidOutline

public SolidOutline(float theWidth,
                    Fill theFill)
Construct a new solid outline object with the given width and the given fill paint.

Parameters:
theWidth - Width.
theFill - Fill paint.
Throws:
IllegalArgumentException - (unchecked exception) Thrown if theWidth is less than or equal to 0.
NullPointerException - (unchecked exception) Thrown if theFill is null.
Method Detail

getStrokeWidth

public float getStrokeWidth()
Returns the stroke width of this outline.

Specified by:
getStrokeWidth in interface Outline

setGraphicsContext

public void setGraphicsContext(Graphics2D g2d)
Set the given graphics context's stroke and paint attributes as specified by this outline object.

Specified by:
setGraphicsContext in interface Outline
Parameters:
g2d - 2-D graphics context.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Write this solid outline object to the given object output stream.

Specified by:
writeExternal in interface Externalizable
Parameters:
out - Object output stream.
Throws:
IOException - Thrown if an I/O error occurred.

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Read this solid outline object from the given object input stream.

Specified by:
readExternal in interface Externalizable
Parameters:
in - Object input stream.
Throws:
IOException - Thrown if an I/O error occurred.
ClassNotFoundException - Thrown if any class needed to deserialize this solid outline object cannot be found.


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.