edu.rit.slides.items
Class OutlinedItem

java.lang.Object
  extended by edu.rit.slides.items.SlideItem
      extended by edu.rit.slides.items.OutlinedItem
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
ArcItem, FilledItem, LineItem

public abstract class OutlinedItem
extends SlideItem
implements Externalizable

Class OutlinedItem is the abstract base class for a SlideItem that has an outline. Specify Outline.NONE for the outline to omit drawing a slide item's outline.

The static setDefaultOutline() method is provided to set the default outline. If the outline is not specified when constructing an outlined item, the current default outline is used.

See Also:
Serialized Form

Field Summary
static Outline NORMAL_OUTLINE
          The normal outline: Solid, square corners, 1 point wide, black.
 
Constructor Summary
OutlinedItem()
          Construct a new empty outlined item.
OutlinedItem(Outline theOutline)
          Construct a new outlined item.
 
Method Summary
 void readExternal(ObjectInput in)
          Read this outlined item from the given object input stream.
static void setDefaultOutline(Outline theOutline)
          Set the default outline.
 void writeExternal(ObjectOutput out)
          Write this outlined item to the given object output stream.
 
Methods inherited from class edu.rit.slides.items.SlideItem
draw
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NORMAL_OUTLINE

public static final Outline NORMAL_OUTLINE
The normal outline: Solid, square corners, 1 point wide, black.

Constructor Detail

OutlinedItem

public OutlinedItem()
Construct a new empty outlined item.


OutlinedItem

public OutlinedItem(Outline theOutline)
Construct a new outlined item. The given outline is used.

Parameters:
theOutline - Outline, or Outline.NONE.
Method Detail

setDefaultOutline

public static void setDefaultOutline(Outline theOutline)
Set the default outline. Before calling this method the first time, the default outline is solid, square corners, 1 point wide, black.

Parameters:
theOutline - Default outline, or Outline.NONE.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Write this outlined item 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 outlined item 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 outlined item cannot be found.


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