com.mindfusion.diagramming
Class Layer

java.lang.Object
  extended by com.mindfusion.diagramming.Layer
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class Layer
extends java.lang.Object
implements java.io.Externalizable

The Layer class represents a layer in the diagram. The visibility, z order and lock status of items in a layer can be controlled via properties of the respective Layer object.

See Also:
Serialized Form

Constructor Summary
Layer()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Registers listener so that it will receive events when the properties of this layer change.
 boolean getLocked()
          Gets a value indicating whether the layer is locked.
 java.lang.String getTitle()
          Gets a title associated with the layer.
 boolean getVisible()
          Gets a value indicating whether the layer is visible.
 int getZIndex()
          Gets the z-index of the layer.
 void readExternal(java.io.ObjectInput in)
          Implements Externalizable.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Unregisters listener so that it will no longer receive layer events.
 void setLocked(boolean value)
          Sets a value indicating whether the layer is locked.
 void setTitle(java.lang.String value)
          Sets a title associated with the layer.
 void setVisible(boolean value)
          Sets a value indicating whether the layer is visible.
 void setZIndex(int value)
          Sets the z-index of the layer.
 void writeExternal(java.io.ObjectOutput out)
          Implements Externalizable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Layer

public Layer()
Method Detail

getZIndex

public int getZIndex()
Gets the z-index of the layer.

Returns:
An integer value specifying the position of the layer within the diagram Z order.

setZIndex

public void setZIndex(int value)
Sets the z-index of the layer.

Parameters:
value - An integer value specifying the position of the layer within the diagram Z order.

getVisible

public boolean getVisible()
Gets a value indicating whether the layer is visible. Items associated with hidden layers are not displayed, regardless of their own Visible property.

Returns:
A boolean value specifying if the layer is visible.

setVisible

public void setVisible(boolean value)
Sets a value indicating whether the layer is visible. Items associated with hidden layers are not displayed, regardless of their own Visible property.

Parameters:
value - A boolean value specifying if the layer is visible.

getLocked

public boolean getLocked()
Gets a value indicating whether the layer is locked. Items associated with locked layers cannot be modified interactively, regardless of their own Locked property.

Returns:
A boolean value specifying if the layer is locked.

setLocked

public void setLocked(boolean value)
Sets a value indicating whether the layer is locked. Items associated with locked layers cannot be modified interactively, regardless of their own Locked property.

Parameters:
value - A boolean value specifying if the layer is locked.

getTitle

public java.lang.String getTitle()
Gets a title associated with the layer.

Returns:
A String containing the layer's title.

setTitle

public void setTitle(java.lang.String value)
Sets a title associated with the layer.

Parameters:
value - A String containing the layer's title.

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implements Externalizable.

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Implements Externalizable.

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Registers listener so that it will receive events when the properties of this layer change.

Parameters:
listener - An object implementing the PropertyChangeListener interface.

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Unregisters listener so that it will no longer receive layer events.

Parameters:
listener - An object implementing the PropertyChangeListener interface.