Package org.jfree.beans
Class KeyedPaint
- java.lang.Object
-
- org.jfree.beans.KeyedPaint
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,org.jfree.util.PublicCloneable
public class KeyedPaint extends java.lang.Object implements java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
A (key, paint) pair for use by theJPieChartclass (and possibly others later).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description KeyedPaint(java.lang.Comparable key, java.awt.Paint paint)Creates a new (key, paint) pair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Returns a clone of this object.booleanequals(java.lang.Object obj)Tests if this object is equal to another.java.lang.ComparablegetKey()Returns the key.java.awt.PaintgetPaint()Returns the paint.voidsetPaint(java.awt.Paint paint)Sets the paint.
-
-
-
Constructor Detail
-
KeyedPaint
public KeyedPaint(java.lang.Comparable key, java.awt.Paint paint)
Creates a new (key, paint) pair.- Parameters:
key- the key.paint- the paint (nullpermitted).
-
-
Method Detail
-
getKey
public java.lang.Comparable getKey()
Returns the key.- Returns:
- The key.
-
getPaint
public java.awt.Paint getPaint()
Returns the paint.- Returns:
- The paint (possibly
null).
-
setPaint
public void setPaint(java.awt.Paint paint)
Sets the paint.- Parameters:
paint- the paint (nullpermitted).
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Returns a clone of this object. It is assumed that the key is an immutable object, so it is not deep-cloned. The object is deep-cloned if it implementsPublicCloneable, otherwise a shallow clone is made.- Specified by:
clonein interfaceorg.jfree.util.PublicCloneable- Overrides:
clonein classjava.lang.Object- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException- if there is a problem cloning.
-
equals
public boolean equals(java.lang.Object obj)
Tests if this object is equal to another.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the other object.- Returns:
- A boolean.
-
-