net.nexttext.property
Class ColorProperty

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

public class ColorProperty
extends Property

A colour property of a TextObject or a Behaviour.


Constructor Summary
ColorProperty()
          Creates a new ColorProperty using java.awt.Color.black by default.
ColorProperty(java.awt.Color color)
          Creates a new ColorProperty from the java.awt.Color object.
 
Method Summary
 ColorProperty clone()
          Get a new property with the same values as this one.
 java.awt.Color get()
          Do not modify the returned value, use set() to make changes instead.
 java.awt.Color getOriginal()
           
 boolean isInherited()
          Returns the inherited status of this ColorProperty.
 void reset()
          Reset interface from superclass.
 void set(java.awt.Color newColor)
          Sets the Color property to the specified value.
 void setInherited(boolean inherited)
          Setting inherited to true on a ColorProperty will cause it to bypass it's current color value in favor of the color value of it's parent.
 void setOriginal(java.awt.Color newColor)
           
 
Methods inherited from class net.nexttext.property.Property
addChangeListener, getName, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorProperty

public ColorProperty()
Creates a new ColorProperty using java.awt.Color.black by default.


ColorProperty

public ColorProperty(java.awt.Color color)
Creates a new ColorProperty from the java.awt.Color object.

This color property is no longer inherited by default.

Method Detail

get

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


set

public void set(java.awt.Color newColor)
Sets the Color property to the specified value. Also sets the Inherited property to false.


getOriginal

public java.awt.Color getOriginal()

setOriginal

public void setOriginal(java.awt.Color newColor)

setInherited

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


isInherited

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


reset

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

Specified by:
reset in class Property

clone

public ColorProperty clone()
Description copied from class: Property
Get a new property with the same values as this one.

The name is copied because that's what makes it a Property and not just a value.

PropertyChangeListeners are not copied to the new Property.

Overrides:
clone in class Property