data
public class Cluster extends java.lang.Object implements java.io.Serializable
Design
s 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.
Constructor and Description |
---|
Cluster(java.lang.String name,
int uniqueIdentificationNumber)
Instantiates a new cluster.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public Cluster(java.lang.String name, int uniqueIdentificationNumber)
name
- the Cluster nameuniqueIdentificationNumber
- the unique identification numberpublic java.awt.Color getActiveDesignColor()
public void setActiveDesignColor(java.awt.Color activeDesignColor)
activeDesignColor
- the new color in which Designs belonging to this Cluster are displayed.public int getLineThickness()
public void setLineThickness(int lineThickness)
lineThickness
- the new line thicknesspublic java.lang.String getName()
public void setName(java.lang.String name)
name
- the new Cluster namepublic boolean isActive()
public void setActive(boolean active)
active
- Specifies whether Designs belonging to this Cluster should be displayedpublic Cluster duplicate()
ClusterSet
public void copySettingsTo(Cluster cluster)
cluster
- the Cluster to which the settings of this Cluster should be copied.public int getUniqueIdentificationNumber()