|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.Visual.GraphicalVisualElementGroup
Groups of general graphical visual elements. Suchs groups are actually editables. Locations and sizes of elements are given in the so-called logical space, i.e. without zooming, and distances expressed in logical coordinates, like in Aspects (1 inch = 81,92 logical units). When drawing itself, a component may be obliged to transform its coordinates in the so-called PHYSICAL space; this transformation is actually a simple affine transformation (a multiplication by an integer constant and an offset).
Fields inherited from interface javax.swing.undo.StateEditable |
RCSID |
Constructor Summary | |
GraphicalVisualElementGroup()
Creates a new empty group. |
|
GraphicalVisualElementGroup(GraphicalVisualElement element)
Creates a new group with an unique starting element. |
|
GraphicalVisualElementGroup(GraphicalVisualElement[] elements)
Creates a new group with an array of starting elements. |
|
GraphicalVisualElementGroup(GraphicalVisualElement e1,
GraphicalVisualElement e2)
Creates a new group with two starting elements. |
|
GraphicalVisualElementGroup(GraphicalVisualElementGroup g1,
GraphicalVisualElementGroup g2)
Creates a new group by the merging of two groups. |
Method Summary | |
void |
abortMove()
Abort the move. |
void |
addElement(GraphicalVisualElement element)
Add an element to the group. |
void |
commitMove()
Commit the move. |
boolean |
contains(GraphicalVisualElement element)
Look if an element is in the group. |
GraphicalVisualElement[] |
elements()
Get the contained elements. |
boolean |
inChange()
Look if a change of aspect is in progress. |
boolean |
isEmpty()
Look if the group is empty. |
boolean |
move(java.awt.Dimension dim)
Try to move all elements of the group. |
boolean |
move(java.awt.Dimension dim,
java.awt.Dimension grid)
Try to move all elements of the group in a grid |
boolean |
moveInfo(java.awt.Dimension dim)
Try to move the info field of all elements of the group. |
boolean |
moveInfo(java.awt.Dimension dim,
java.awt.Dimension grid)
Try to move the info field of all elements of the group in a grid |
boolean |
moveLabel(java.awt.Dimension dim)
Try to move the label of all elements of the group. |
boolean |
moveLabel(java.awt.Dimension dim,
java.awt.Dimension grid)
Try to move the label of all elements of the group in a grid |
void |
removeAllElements()
Remove all elements in the group. |
void |
removeElement(GraphicalVisualElement element)
Remove an element from the group, if it is a member of the group. |
void |
restoreCompleteState(java.util.Hashtable state)
Restore the complete state, by delegating this op to the elements. |
void |
restoreState(java.util.Hashtable state)
Restore the state, by delegating this op to the elements. |
void |
setColor(java.awt.Color color)
Specifiy the color of the element. |
void |
setInfo(java.lang.String info)
Set the information field. |
void |
setShown(boolean shown)
Specifiy if the associated element is shown. |
void |
setShownInfo(boolean shown)
Specifiy is the information field is shown. |
void |
setShownLabel(boolean shown)
Specifiy is the label is shown. |
void |
storeCompleteState(java.util.Hashtable state)
Store the complete state, by delegating this op to the elements. |
void |
storeState(java.util.Hashtable state)
Store the state, by delegating this op to the elements. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphicalVisualElementGroup()
public GraphicalVisualElementGroup(GraphicalVisualElement element)
public GraphicalVisualElementGroup(GraphicalVisualElement e1, GraphicalVisualElement e2)
public GraphicalVisualElementGroup(GraphicalVisualElementGroup g1, GraphicalVisualElementGroup g2)
public GraphicalVisualElementGroup(GraphicalVisualElement[] elements)
Method Detail |
public void removeAllElements()
public boolean isEmpty()
public void addElement(GraphicalVisualElement element)
public void removeElement(GraphicalVisualElement element)
public boolean contains(GraphicalVisualElement element)
public GraphicalVisualElement[] elements()
public boolean inChange()
inChange
in interface GraphicalVisualEditable
public boolean move(java.awt.Dimension dim)
move
in interface GraphicalVisualEditable
dim
- the difference of positionpublic boolean move(java.awt.Dimension dim, java.awt.Dimension grid)
move
in interface GraphicalVisualEditable
dim
- the difference of positiongrid
- the gridpublic boolean moveLabel(java.awt.Dimension dim)
moveLabel
in interface GraphicalVisualEditable
dim
- the difference of positionpublic boolean moveLabel(java.awt.Dimension dim, java.awt.Dimension grid)
moveLabel
in interface GraphicalVisualEditable
dim
- the difference of positiongrid
- the gridpublic boolean moveInfo(java.awt.Dimension dim)
moveInfo
in interface GraphicalVisualEditable
dim
- the difference of positionpublic boolean moveInfo(java.awt.Dimension dim, java.awt.Dimension grid)
moveInfo
in interface GraphicalVisualEditable
dim
- the difference of positiongrid
- the gridpublic void commitMove()
commitMove
in interface GraphicalVisualEditable
public void abortMove()
abortMove
in interface GraphicalVisualEditable
public void setInfo(java.lang.String info)
setInfo
in interface GraphicalVisualEditable
info
- the information field as a String; if this
parameter is
null, an empty string is used as information
fieldpublic void setShown(boolean shown)
setShown
in interface GraphicalVisualEditable
shown
- true iff the element must be shownpublic void setShownLabel(boolean shown)
setShownLabel
in interface GraphicalVisualEditable
shown
- true iff the label must be shownpublic void setShownInfo(boolean shown)
setShownInfo
in interface GraphicalVisualEditable
shown
- true iff the information field must be shownpublic void setColor(java.awt.Color color)
setColor
in interface GraphicalVisualEditable
color
- the colorpublic void storeState(java.util.Hashtable state)
storeState
in interface javax.swing.undo.StateEditable
public void restoreState(java.util.Hashtable state)
restoreState
in interface javax.swing.undo.StateEditable
public void storeCompleteState(java.util.Hashtable state)
storeCompleteState
in interface GraphicalVisualEditable
ConForM.CoopnTools.CoKer.Visual.GraphicalVisualEditable
state
- an hashtable, storing states of elementspublic void restoreCompleteState(java.util.Hashtable state)
restoreCompleteState
in interface GraphicalVisualEditable
ConForM.CoopnTools.CoKer.Visual.GraphicalVisualEditable
state
- an hashtable, storing states of elements
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |