|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.Cluster
public class Cluster
A group of 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.
Field Summary | |
---|---|
private boolean |
active
Specifies whether Designs belonging to this Cluster should be displayed. |
private java.awt.Color |
activeDesignColor
The color in which Designs belonging to this Cluster are displayed. |
private java.lang.String |
name
The Cluster name. |
(package private) static boolean |
printLog
Flag to enable debug message printing for this class. |
(package private) static long |
serialVersionUID
The version tracking unique identifier for Serialization. |
private int |
uniqueIdentificationNumber
The unique identification number for tracking purposes in the ClusterSet . |
private UserPreferences |
userPreferences
The user preferences. |
Constructor Summary | |
---|---|
Cluster(UserPreferences userPreferences,
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. |
java.lang.String |
getName()
Gets the Cluster name. |
int |
getUniqueIdentificationNumber()
Gets the unique identification number. |
UserPreferences |
getUserPreferences()
Gets the user preferences. |
boolean |
isActive()
Checks whether Designs belonging to this Cluster should be displayed |
private void |
log(java.lang.String message)
Prints debug information to stdout when printLog is set to true. |
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 |
setName(java.lang.String name)
Sets the Cluster name. |
void |
setUserPreferences(UserPreferences userPreferences)
Sets the user preferences. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
static final boolean printLog
private UserPreferences userPreferences
private java.lang.String name
private java.awt.Color activeDesignColor
private boolean active
private int uniqueIdentificationNumber
ClusterSet
.
Constructor Detail |
---|
public Cluster(UserPreferences userPreferences, java.lang.String name, int uniqueIdentificationNumber)
userPreferences
- the user preferencesname
- the Cluster nameuniqueIdentificationNumber
- the unique identification numberMethod Detail |
---|
private void log(java.lang.String message)
message
- the messagepublic 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 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 UserPreferences getUserPreferences()
public void setUserPreferences(UserPreferences userPreferences)
userPreferences
- the new user preferencespublic int getUniqueIdentificationNumber()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |