ConForM.CoopnTools.CoKer.Visual
Class AbstractGraphicalRotatableNode
java.lang.Object
|
+--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalElement
|
+--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalShape
|
+--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalNode
|
+--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalRotatableNode
- All Implemented Interfaces:
- GraphicalVisualEditable, GraphicalVisualElement, GraphicalVisualNode, GraphicalVisualRenderable, GraphicalVisualRotatableNode, GraphicalVisualShape, javax.swing.undo.StateEditable
- Direct Known Subclasses:
- CoopnGraphicalRotatableNode
- public abstract class AbstractGraphicalRotatableNode
- extends AbstractGraphicalNode
- implements GraphicalVisualRotatableNode
Abstract graphical rotatable node.
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.AbstractGraphicalShape |
addEndingArc, addNeighbour, addStartingArc, deselect, endingArcs, getElementShape, induceSelection, initElement, invalidateAbsLoc, invalidateElementShape, neighbours, partOfParent, removeNeighbour, selectElement, setElementShape, setRelElemBox, shape, startingArcs |
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, 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, 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, induceSelection, inside, label, parent, parentMoved, partOfParent, 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, deselect, export, paint, pointedElement, print, saveAspect, saveAspectAs, saveAspectAsPossible, saveAspectPossible, selectElement, selectInfo, selectLabel, specificPopup |
angle
protected int angle
rotationMatrix
protected java.awt.geom.AffineTransform rotationMatrix
validAngle
protected boolean validAngle
AbstractGraphicalRotatableNode
public AbstractGraphicalRotatableNode(GraphicalVisualRenderableGroup parent,
java.lang.String label,
java.lang.String description,
java.lang.Object element,
boolean isInterface,
RotatableNodeAspect aspect,
java.lang.String aspectName,
java.lang.String aspectModule,
AspectMgr aspectMgr,
CoopnEnv env)
- Complete constructor.
reRendition
protected void reRendition()
- Overrides:
reRendition
in class AbstractGraphicalShape
invalidateRelLoc
protected void invalidateRelLoc()
- Overrides:
invalidateRelLoc
in class AbstractGraphicalElement
setRelLoc
protected void setRelLoc()
- Overrides:
setRelLoc
in class AbstractGraphicalNode
invalidateAngle
protected void invalidateAngle()
getAngle
public int getAngle()
- Get the angle.
- Specified by:
getAngle
in interface GraphicalVisualRotatableNode
- Returns:
- The angle, ans an integer between 0 and 360. The angle is
express in degree, with 0 degree representing an horizontal left to right * line, and increasing following the trigonometric sense.
setAngle
protected void setAngle()
setLayoutAngle
public void setLayoutAngle(int newAngle)
- Set the angle according to a layout. This method is intended to be
used by layouters only; it should not be called by external objects.
- Specified by:
setLayoutAngle
in interface GraphicalVisualRotatableNode
- Parameters:
newAngle
- the new angle
rotate
public boolean rotate(int angle)
- Try to rotate the element.
- Specified by:
rotate
in interface GraphicalVisualRotatableNode
- Parameters:
angle
- the angle as a integer; this parameter is evaluated
module 360.
rotate
public boolean rotate(int angle,
int grid)
- Try to rotate the element on an angular grid.
- Specified by:
rotate
in interface GraphicalVisualRotatableNode
- Parameters:
angle
- the angle as a integer; this parameter is evaluated
module 360.grid
- the angular grid
commitRotation
public void commitRotation()
- Commit the rotation.
- Specified by:
commitRotation
in interface GraphicalVisualRotatableNode
abortRotation
public void abortRotation()
- Abort the rotation.
- Specified by:
abortRotation
in interface GraphicalVisualRotatableNode
setRotatedLocation
protected void setRotatedLocation(java.awt.geom.Point2D p,
int x,
int y)
- Rotation routine. Set a point to the location corresponding to the
rotation of a logical point given by the parameter.
- Parameters:
p
- the point to set; cannot be nullx
- the x-coordidate before rotationy
- the y-coordinate before rotation