|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.mff.mirovsky.trees.ReferencePattern
public class ReferencePattern
A class for keeping one pattern of references in trees.
Field Summary | |
---|---|
static int |
SHAPE_DASHES_DARC
an arc shape - a dashed arc, curved downwards |
Constructor Summary | |
---|---|
ReferencePattern()
Creates an empty pattern. |
|
ReferencePattern(ShowMessagesAble p_mess)
Creates an empty pattern. |
Method Summary | |
---|---|
void |
addEndNodeIgnoreValue(java.lang.String value)
Adds a value that should be ignored at the end node. |
void |
addStartNodeIgnoreValue(java.lang.String value)
Adds a value that should be ignored at the start node. |
void |
addValueDependentRule(java.lang.String value,
java.awt.Color color,
int shape)
Adds a rule to influence the way of displaying the reference. |
void |
clearEndNodeIgnoreValues()
Clears the list of values to be ignored at the end node. |
void |
clearStartNodeIgnoreValues()
Clears the list of values to be ignored at the start node. |
void |
clearValueDependentValues()
Clears the rules of displaying the reference according to a value of another attribute. |
ReferencePattern |
getClone()
Returns a deep copy of the reference pattern |
boolean |
getDisplay()
Returns true iff the reference should be displayed. |
java.lang.String |
getDisplayMode()
Returns the display mode for the reference. |
java.lang.String |
getEndAttrNodeName()
Returns the name of an attribute that contains an identifier of a node refered to in the reference. |
javax.swing.DefaultListModel |
getEndNodeIgnoreValues()
Returns the list of values that should be ignored at the end node. |
boolean |
getEndNodeNilArrow()
Returns true iff an arrow should be displayed if no ending node matches the starting node in the actual tree. |
java.awt.Color |
getGeneralColor()
Returns a general color for the reference arrow. |
int |
getGeneralShape()
Returns the general shape for the reference arrow. |
java.lang.String |
getName()
Returns the name of the reference pattern. |
java.lang.String |
getStartAttrNodeName()
Returns the name of an attribute that can contain a reference to a node in this reference pattern. |
javax.swing.DefaultListModel |
getStartNodeIgnoreValues()
Returns the list of values that should be ignored at the start node. |
boolean |
getStartNodeNilArrow()
Returns true iff an arrow should be displayed if no starting node matches the ending node in the actual tree. |
java.lang.String |
getValueDependentAttrName()
Returns the name of an attribute that controlls the shape and color of the reference. |
java.awt.Color |
getValueDependentColor(java.lang.String value)
Gives a color to be used with a value of the value dependent attribute. |
int |
getValueDependentShape(java.lang.String value)
Gives a shape to be used with a value of the value dependent attribute. |
javax.swing.DefaultListModel |
getValueDependentValues()
Gets a list of all values that sets the way of displaying the reference. |
boolean |
changeDisplay()
Changes the state of displaying the reference if editable. |
boolean |
isEditable()
Informs whether the reference pattern allows changing its state |
void |
readPatternFromString(java.lang.String line)
Reads a pattern from String. |
boolean |
setDisplay(boolean display)
Sets whether the reference should be displayed (if editable). |
void |
setDisplayMode(java.lang.String display)
Sets the display mode of the reference. |
void |
setEndAttrNodeName(java.lang.String name)
Sets the name of an attribute that contains an identifier of a node refered to in the reference. |
void |
setEndNodeNilArrow(boolean display)
Sets whether an arrow should be displayed if no ending node matches the starting node in the actual tree. |
void |
setGeneralColor(java.awt.Color color)
Sets a general color for the reference arrow. |
void |
setGeneralShape(int shape)
Sets a general shape for the reference arrow. |
void |
setName(java.lang.String name)
Sets the name of the reference pattern. |
void |
setStartAttrNodeName(java.lang.String name)
Sets the name of an attribute that can contain a reference to a node in this reference pattern. |
void |
setStartNodeNilArrow(boolean display)
Sets whether an arrow should be displayed if no starting node matches the ending node in the actual tree. |
void |
setValueDependentAttrName(java.lang.String name)
Sets a name of an attribute that controlls the shape and color of the reference. |
java.lang.String |
toString()
Returns a String representation of the reference pattern. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int SHAPE_DASHES_DARC
Constructor Detail |
---|
public ReferencePattern()
public ReferencePattern(ShowMessagesAble p_mess)
p_mess
- an object capable of displaying messagesMethod Detail |
---|
public ReferencePattern getClone()
public java.lang.String toString()
toString
in class java.lang.Object
public void setName(java.lang.String name)
name
- the name of the reference patternpublic java.lang.String getName()
public void setDisplayMode(java.lang.String display)
display
- the display modepublic java.lang.String getDisplayMode()
public boolean setDisplay(boolean display)
display
- true means that it should be displayed
public boolean getDisplay()
public boolean changeDisplay()
public boolean isEditable()
public void setStartNodeNilArrow(boolean display)
display
- true iff it should be displayedpublic boolean getStartNodeNilArrow()
public void setEndNodeNilArrow(boolean display)
display
- true iff it should be displayedpublic boolean getEndNodeNilArrow()
public void setStartAttrNodeName(java.lang.String name)
name
- the name of the attributepublic java.lang.String getStartAttrNodeName()
public void setEndAttrNodeName(java.lang.String name)
name
- the name of the attributepublic java.lang.String getEndAttrNodeName()
public void addStartNodeIgnoreValue(java.lang.String value)
value
- the value to be ignoredpublic void clearStartNodeIgnoreValues()
public javax.swing.DefaultListModel getStartNodeIgnoreValues()
public void addEndNodeIgnoreValue(java.lang.String value)
value
- the value to be ignoredpublic void clearEndNodeIgnoreValues()
public javax.swing.DefaultListModel getEndNodeIgnoreValues()
public void setGeneralColor(java.awt.Color color)
color
- a general color for the reference arrowpublic java.awt.Color getGeneralColor()
public void setGeneralShape(int shape)
shape
- a general shape for the reference arrowpublic int getGeneralShape()
public void setValueDependentAttrName(java.lang.String name)
name
- a name of an attribute that controlls the shape and color of the referencepublic java.lang.String getValueDependentAttrName()
public void addValueDependentRule(java.lang.String value, java.awt.Color color, int shape)
value
- a value that sets a certain way of displaying the referencecolor
- this color will be used with the valueshape
- this shape will be used with the valuepublic javax.swing.DefaultListModel getValueDependentValues()
public java.awt.Color getValueDependentColor(java.lang.String value)
value
of the value dependent attribute.
If no such rule exists, the general color is given.
value
- String
public int getValueDependentShape(java.lang.String value)
value
of the value dependent attribute.
If no such rule exists, the general shape is given.
value
- String
public void clearValueDependentValues()
public void readPatternFromString(java.lang.String line)
line
- a pattern
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |