|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.mff.mirovsky.trees.Attribute
public class Attribute
Class Attribute keeps general properties of an attribute of nodes in trees.
Constructor Summary | |
---|---|
Attribute()
Creates an attribute with default properties. |
|
Attribute(java.lang.String p_name)
Creates an attribute with a given name and default properties. |
|
Attribute(java.lang.String p_name,
int p_type)
Creates an attribute with given properties. |
|
Attribute(java.lang.String p_name,
int p_type,
java.lang.String p_values)
Creates an attribute with given properties. |
|
Attribute(java.lang.String p_name,
int p_type,
java.lang.String p_values,
boolean p_displayed)
Creates an attribute with given properties. |
|
Attribute(java.lang.String p_name,
int p_type,
java.lang.String p_values,
boolean p_displayed,
java.awt.Color p_color)
Creates an attribute with given properties. |
Method Summary | |
---|---|
Attribute |
getClone()
Returns a deep copy of the Attribute |
java.awt.Color |
getColor()
Returns the color in which the attribute should be displayd in the trees. |
boolean |
getDisplayed()
Returns true iff the attribute should be displayed in the trees. |
javax.swing.DefaultListModel |
getListOfValues()
Gets a list of possible values for this attribute. |
java.lang.String |
getName()
Returns the name of the attribute. |
int |
getType()
Returns the type of the attribute. |
java.lang.String |
getValue()
Returns the value of the attribute. |
java.lang.String |
getValues()
Returns possible values of the attribute (space-separated). |
void |
setColor(java.awt.Color p_color)
Sets the color in which the attribute should be displayd in the trees. |
void |
setDisplayed(boolean p_displayed)
Sets if the attribute should be displayed in trees. |
void |
setName(java.lang.String p_name)
Sets the name of the attribute. |
void |
setValue(java.lang.String p_value)
Sets the value of the attribute. |
java.lang.String |
toFSString()
Returns the FS representation of the attribute for the FS head. |
java.lang.String |
toFSString(boolean[] set_attributes)
Returns the FS representation of the attribute for the FS head. |
java.lang.String |
toString()
Returns the String representation of the attribute. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Attribute()
public Attribute(java.lang.String p_name)
p_name
- the name of the attributepublic Attribute(java.lang.String p_name, int p_type)
p_name
- the name of the attributep_type
- a type of the attribute. Individual bits have the following meaning:
some values have a special meaning:
0 - K (key attribute - not used in Netgraph; can only be set once in the head)
public Attribute(java.lang.String p_name, int p_type, java.lang.String p_values)
p_name
- the name of the attributep_type
- a type of the attribute. Individual bits have the following meaning:
some values have a special meaning:
0 - K (key attribute - not used in Netgraph; can only be set once in the head)
p_values
- possible values of the attribute, separated by a spacepublic Attribute(java.lang.String p_name, int p_type, java.lang.String p_values, boolean p_displayed)
p_name
- the name of the attributep_type
- a type of the attribute. Individual bits have the following meaning:
some values have a special meaning:
0 - K (key attribute - not used in Netgraph; can only be set once in the head)
p_values
- possible values of the attribute, separated by a spacep_displayed
- says if the attribute should be displayed at nodes in the treepublic Attribute(java.lang.String p_name, int p_type, java.lang.String p_values, boolean p_displayed, java.awt.Color p_color)
p_name
- the name of the attributep_type
- a type of the attribute. Individual bits have the following meaning:
some values have a special meaning:
0 - K (key attribute - not used in Netgraph; can only be set once in the head)
p_values
- possible values of the attribute, separated by a spacep_displayed
- says if the attribute should be displayed at nodes in the treep_color
- color of the attribute (not used in Netgraph)Method Detail |
---|
public Attribute getClone()
public java.lang.String toFSString()
public java.lang.String toFSString(boolean[] set_attributes)
set_attributes
- an array of attribute types that can only be set once in the head. The array signals whether the
attributes have already been set in the head. Their order is: N, V, W, H, K
public java.lang.String getName()
public void setName(java.lang.String p_name)
p_name
- the name of the attributepublic int getType()
public java.lang.String getValues()
public java.lang.String getValue()
public void setValue(java.lang.String p_value)
p_value
- the value of the attributepublic boolean getDisplayed()
public java.awt.Color getColor()
public void setColor(java.awt.Color p_color)
p_color
- the colorpublic void setDisplayed(boolean p_displayed)
p_displayed
- true iff it should be displayedpublic java.lang.String toString()
toString
in class java.lang.Object
public javax.swing.DefaultListModel getListOfValues()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |