org.jfree.util
Class StrokeTable

java.lang.Object
  extended by org.jfree.util.ObjectTable
      extended by org.jfree.util.StrokeTable
All Implemented Interfaces:
java.io.Serializable

public class StrokeTable
extends ObjectTable
implements java.io.Serializable

A lookup table for Stroke objects.

See Also:
Serialized Form

Constructor Summary
StrokeTable()
          Creates a new stroke table.
 
Method Summary
 boolean equals(java.lang.Object o)
          Tests this stroke table for equality with another object (typically also a stroke table).
 java.awt.Stroke getStroke(int row, int column)
          Returns the stroke object from a particular cell in the table.
 int hashCode()
          Returns a hash code value for the object.
protected  java.lang.Object readSerializedData(java.io.ObjectInputStream stream)
          Handles the deserialization of a single element of the table.
 void setStroke(int row, int column, java.awt.Stroke stroke)
          Sets the stroke for an item.
protected  void writeSerializedData(java.io.ObjectOutputStream stream, java.lang.Object o)
          Handles the serialization of an single element of this table.
 
Methods inherited from class org.jfree.util.ObjectTable
clear, ensureCapacity, ensureRowCapacity, getColumnCount, getColumnIncrement, getObject, getRowCount, getRowIncrement, setObject
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrokeTable

public StrokeTable()
Creates a new stroke table.

Method Detail

getStroke

public java.awt.Stroke getStroke(int row,
                                 int column)
Returns the stroke object from a particular cell in the table.

Parameters:
row - the row index (zero-based).
column - the column index (zero-based).
Returns:
The stroke.

setStroke

public void setStroke(int row,
                      int column,
                      java.awt.Stroke stroke)
Sets the stroke for an item.

Parameters:
row - the row index (zero-based).
column - the column index (zero-based).
stroke - the stroke.

equals

public boolean equals(java.lang.Object o)
Tests this stroke table for equality with another object (typically also a stroke table).

Overrides:
equals in class ObjectTable
Parameters:
o - the other object.
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class ObjectTable
Returns:
the hashcode

readSerializedData

protected java.lang.Object readSerializedData(java.io.ObjectInputStream stream)
                                       throws java.lang.ClassNotFoundException,
                                              java.io.IOException
Handles the deserialization of a single element of the table.

Overrides:
readSerializedData in class ObjectTable
Parameters:
stream - the object input stream from which to read the object.
Returns:
the deserialized object
Throws:
java.lang.ClassNotFoundException - Class of a serialized object cannot be found.
java.io.IOException - Any of the usual Input/Output related exceptions.

writeSerializedData

protected void writeSerializedData(java.io.ObjectOutputStream stream,
                                   java.lang.Object o)
                            throws java.io.IOException
Handles the serialization of an single element of this table.

Overrides:
writeSerializedData in class ObjectTable
Parameters:
stream - the stream which should write the object
o - the object that should be serialized
Throws:
java.io.IOException - if an IO error occured