ConForM.CoopnTools.CoKer.Visual
Class AbstractGraphicalShape
java.lang.Object
|
+--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalElement
|
+--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalShape
- All Implemented Interfaces:
- GraphicalVisualEditable, GraphicalVisualElement, GraphicalVisualRenderable, GraphicalVisualShape, javax.swing.undo.StateEditable
- Direct Known Subclasses:
- AbstractGraphicalContainer, AbstractGraphicalNode
- public abstract class AbstractGraphicalShape
- extends AbstractGraphicalElement
- implements GraphicalVisualShape
Abstract graphical shape.
Fields inherited from class ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalElement |
absElemBox, absInfoBox, absLabelBox, absLoc, aspect, aspectMgr, boundingBox, delta, description, env, externalBox, externalInfoBox, externalLabelBox, fontRenderContext, inducedSelection, inducedSelectionColor, infoFont, infoLayout, infoLoc, label, labelColor, labelFont, labelLayout, labelLoc, normalColor, objectElement, parent, relElemBox, relInfoBox, relLabelBox, relLoc, savedAspect, selectedColor, selectedElem, selectedInfo, selectedInfoColor, selectedLabel, selectedLabelColor, unconstrained, validAbsElemBox, validAbsInfoBox, validAbsLabelBox, validAbsLoc, validBoundingBox, validColor, validExternalBox, validExternalInfoBox, validExternalLabelBox, validInfoLoc, validLabelLoc, validRelElemBox, validRelInfoBox, validRelLabelBox, validRelLoc |
Fields inherited from interface javax.swing.undo.StateEditable |
RCSID |
Methods inherited from class ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalElement |
abortMove, acceptAspect, actionOnMultipleClick, addPopupItem, aspectMgr, aspectName, attachToParent, boundingBox, clonedAspect, commitMove, description, export, externalBox, externalInfoBox, externalLabelBox, getAbsElemBox, getAbsInfoBox, getAbsLabelBox, getAbsLoc, getBoundingBox, getCol, getColor, getExternalBox, getExternalInfoBox, getExternalLabelBox, getInfo, getInfoLoc, getLabelLoc, getLocation, getRelElemBox, getRelInfoBox, getRelLabelBox, getRelLoc, getShown, getShownInfo, getShownLabel, getStringTransfer, getTransferable, inChange, inducedSelection, inside, internalDrawInfo, internalDrawLabel, internalExport, internalExportInfo, internalExportLabel, internalPaint, internalPrint, invalidateAbsElemBox, invalidateAbsInfoBox, invalidateAbsLabelBox, invalidateBoundingBox, invalidateColor, invalidateExternalBox, invalidateExternalInfoBox, invalidateExternalLabelBox, invalidateInfoLoc, invalidateLabelLoc, invalidateRelElemBox, invalidateRelInfoBox, invalidateRelLabelBox, invalidateRelLoc, label, move, move, moveInfo, moveInfo, moveLabel, moveLabel, objectElement, paint, parent, parentMoved, pointedElement, print, restoreAspect, restoreCompleteState, restoreState, saveAspect, saveAspectAs, saveAspectAsPossible, saveAspectPossible, saveIntAspect, selected, selectInfo, selectLabel, setAbsElemBox, setAbsInfoBox, setAbsLabelBox, setAbsLoc, setBoundingBox, setColor, setColor, setExternalBox, setExternalInfoBox, setExternalLabelBox, setInfo, setInfoLoc, setLabelLoc, setLayoutLocation, setRelInfoBox, setRelLabelBox, setRelLoc, setShown, setShownInfo, setShownLabel, specificPopup, storeCompleteState, storeState, toAbsolute, toRelative |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ConForM.CoopnTools.CoKer.Visual.GraphicalVisualElement |
attachToParent, description, externalBox, externalInfoBox, externalLabelBox, getInfo, getLocation, getShown, getShownInfo, getShownLabel, getStringTransfer, getTransferable, inducedSelection, inside, label, parent, parentMoved, selected, setLayoutLocation |
Methods inherited from interface ConForM.CoopnTools.CoKer.Visual.GraphicalVisualEditable |
abortMove, commitMove, inChange, move, move, moveInfo, moveInfo, moveLabel, moveLabel, restoreCompleteState, setColor, setInfo, setShown, setShownInfo, setShownLabel, storeCompleteState |
Methods inherited from interface javax.swing.undo.StateEditable |
restoreState, storeState |
Methods inherited from interface ConForM.CoopnTools.CoKer.Visual.GraphicalVisualRenderable |
actionOnMultipleClick, boundingBox, export, paint, pointedElement, print, saveAspect, saveAspectAs, saveAspectAsPossible, saveAspectPossible, selectInfo, selectLabel, specificPopup |
neighbours
protected java.util.Vector neighbours
startingArcs
protected java.util.Vector startingArcs
endingArcs
protected java.util.Vector endingArcs
elementShape
protected java.awt.Shape elementShape
validElementShape
protected boolean validElementShape
precomputedRelElemBox
protected java.awt.Rectangle precomputedRelElemBox
AbstractGraphicalShape
public AbstractGraphicalShape(GraphicalVisualRenderableGroup parent,
java.lang.String label,
java.lang.String description,
java.lang.Object element,
Aspect aspect,
java.lang.String aspectName,
java.lang.String aspectModule,
AspectMgr aspectMgr,
CoopnEnv env)
- Complete constructor.
initElement
protected void initElement()
- Overrides:
initElement
in class AbstractGraphicalElement
reRendition
protected void reRendition()
- Overrides:
reRendition
in class AbstractGraphicalElement
invalidateAbsLoc
protected void invalidateAbsLoc()
- Overrides:
invalidateAbsLoc
in class AbstractGraphicalElement
invalidateElementShape
protected void invalidateElementShape()
getElementShape
protected final java.awt.Shape getElementShape()
setElementShape
protected void setElementShape()
setRelElemBox
protected void setRelElemBox()
- Overrides:
setRelElemBox
in class AbstractGraphicalElement
partOfParent
public boolean partOfParent()
- Specify if the element is part of its parent or not. An element which
is part of its parent must be phisically enclosed in its parent, and
cannot intersect its brothers. Standard shapes are part of their parent,
with the exception of (at least) CoopnGraphicalGenericClassSyncOp.
- Specified by:
partOfParent
in interface GraphicalVisualElement
- Returns:
- true.
addNeighbour
public void addNeighbour(GraphicalVisualShape element)
- Add a neighbour. If the parameter is this element, it is not added.
- Specified by:
addNeighbour
in interface GraphicalVisualShape
removeNeighbour
public void removeNeighbour(GraphicalVisualShape element)
- Remove a neighbour. If the parameter is not a neighbour, it is not removed.
- Specified by:
removeNeighbour
in interface GraphicalVisualShape
neighbours
public GraphicalVisualShape[] neighbours()
- Get the neighbours shaped elements. The neighbours shapes elements are
the elements (with shape, i.e. not arcs) which are included into
the same container, or which are at the top level if this element is
at the top-level too.
- Specified by:
neighbours
in interface GraphicalVisualShape
- Returns:
- an array, possibly empty, of the neighbour shapes of
this element. Never null.
addStartingArc
public void addStartingArc(GraphicalVisualArc element)
- Add a starting arc.
- Specified by:
addStartingArc
in interface GraphicalVisualShape
startingArcs
public GraphicalVisualArc[] startingArcs()
- Get the starting arcs. A shape can be bound to another shape by arcs,
which have a start and an end. This method returns all arcs starting
from this shape.
- Specified by:
startingArcs
in interface GraphicalVisualShape
- Returns:
- an array, possibly empty, of the starting arcs from
this element. Never null.
addEndingArc
public void addEndingArc(GraphicalVisualArc element)
- Add an ending arc.
- Specified by:
addEndingArc
in interface GraphicalVisualShape
endingArcs
public GraphicalVisualArc[] endingArcs()
- Get the ending arcs. A shape can be bound to another shape by arcs,
which have a start and an end. This method returns all arcs ending
to this shape.
- Specified by:
endingArcs
in interface GraphicalVisualShape
- Returns:
- an array, possibly empty, of the ending arcs from
this element. Never null.
selectElement
public void selectElement()
- Select the element.
- Specified by:
selectElement
in interface GraphicalVisualRenderable
- Overrides:
selectElement
in class AbstractGraphicalElement
induceSelection
public void induceSelection()
- Induce the selection of the element.
- Specified by:
induceSelection
in interface GraphicalVisualElement
- Overrides:
induceSelection
in class AbstractGraphicalElement
deselect
public void deselect()
- Deselect the element, along with its label and information field.
- Specified by:
deselect
in interface GraphicalVisualRenderable
- Overrides:
deselect
in class AbstractGraphicalElement
shape
public java.awt.Shape shape()
- Get the bounding shape of the element.
- Specified by:
shape
in interface GraphicalVisualShape
- Returns:
- the shape of the element, as a shape in the
logical coordinate space. The shape is located
on the origin of this element. The shape includes
exactly the element itself (not its label, nor info).
verifyChange
protected boolean verifyChange()
- Verify that the a change does not interfere with other elements.
- Overrides:
verifyChange
in class AbstractGraphicalElement