data
Class Cluster

java.lang.Object
  extended by data.Cluster
All Implemented Interfaces:
java.io.Serializable

public class Cluster
extends java.lang.Object
implements java.io.Serializable

A group of Designs that can be displayed in a userspecified different color or removed from the display altogether, irrespective of the Filter settings.

Clusters enable the user to regroup the designs in logical subsets. This achieved by storing a reference to a Cluster in the Design instance. Whenever the Design is asked to which Cluster it belongs, it returns this reference. The Cluster then provides the information whether it is active (which determines whether the design should be displayed) and, if so, in which color the Design is displayed.

See Also:
Serialized Form

Constructor Summary
Cluster(java.lang.String name, int uniqueIdentificationNumber)
          Instantiates a new cluster.
 
Method Summary
 void copySettingsTo(Cluster cluster)
          Copies settings of this Cluster to a given Cluster.
 Cluster duplicate()
          Returns a duplicated instance of this Cluster for use in an editing Buffer.
 java.awt.Color getActiveDesignColor()
          Gets the color in which Designs belonging to this Cluster are displayed.
 int getLineThickness()
          Gets the line thickness.
 java.lang.String getName()
          Gets the Cluster name.
 int getUniqueIdentificationNumber()
          Gets the unique identification number.
 boolean isActive()
          Checks whether Designs belonging to this Cluster should be displayed
 void setActive(boolean active)
          Specifies whether Designs belonging to this Cluster should be displayed
 void setActiveDesignColor(java.awt.Color activeDesignColor)
          Sets the color in which Designs belonging to this Cluster are displayed.
 void setLineThickness(int lineThickness)
          Sets the line thickness.
 void setName(java.lang.String name)
          Sets the Cluster name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cluster

public Cluster(java.lang.String name,
               int uniqueIdentificationNumber)
Instantiates a new cluster.

Parameters:
name - the Cluster name
uniqueIdentificationNumber - the unique identification number
Method Detail

getActiveDesignColor

public java.awt.Color getActiveDesignColor()
Gets the color in which Designs belonging to this Cluster are displayed.

Returns:
the color in which Designs belonging to this Cluster are displayed.

setActiveDesignColor

public void setActiveDesignColor(java.awt.Color activeDesignColor)
Sets the color in which Designs belonging to this Cluster are displayed.

Parameters:
activeDesignColor - the new color in which Designs belonging to this Cluster are displayed.

getLineThickness

public int getLineThickness()
Gets the line thickness.

Returns:
the line thickness

setLineThickness

public void setLineThickness(int lineThickness)
Sets the line thickness.

Parameters:
lineThickness - the new line thickness

getName

public java.lang.String getName()
Gets the Cluster name.

Returns:
the Cluster name

setName

public void setName(java.lang.String name)
Sets the Cluster name.

Parameters:
name - the new Cluster name

isActive

public boolean isActive()
Checks whether Designs belonging to this Cluster should be displayed

Returns:
true, if Designs belonging to this Cluster should be displayed

setActive

public void setActive(boolean active)
Specifies whether Designs belonging to this Cluster should be displayed

Parameters:
active - Specifies whether Designs belonging to this Cluster should be displayed

duplicate

public Cluster duplicate()
Returns a duplicated instance of this Cluster for use in an editing Buffer.

Returns:
the cluster
See Also:
ClusterSet

copySettingsTo

public void copySettingsTo(Cluster cluster)
Copies settings of this Cluster to a given Cluster.

Parameters:
cluster - the Cluster to which the settings of this Cluster should be copied.

getUniqueIdentificationNumber

public int getUniqueIdentificationNumber()
Gets the unique identification number.

Returns:
the unique identification number