|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalElement | +--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalShape | +--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalContainer
Abstract graphical container.
Field Summary | |
protected java.awt.Point |
absCentre
|
protected java.awt.Rectangle |
borderBox
|
protected java.awt.Shape |
internalShape
|
protected static int |
minimalHeight
|
protected static int |
minimalWidth
|
protected java.awt.Point |
relCentre
|
protected static int |
resizeGap
|
protected java.awt.Rectangle |
size
|
protected boolean |
validAbsCentre
|
protected boolean |
validBorderBox
|
protected boolean |
validInternalShape
|
protected boolean |
validRelCentre
|
protected boolean |
validSize
|
Fields inherited from class ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalShape |
elementShape, endingArcs, neighbours, precomputedRelElemBox, startingArcs, validElementShape |
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 |
Constructor Summary | |
AbstractGraphicalContainer(GraphicalVisualRenderableGroup parent,
java.lang.String label,
java.lang.String description,
java.lang.Object element,
ContainerAspect aspect,
java.lang.String aspectName,
java.lang.String aspectModule,
AspectMgr aspectMgr,
CoopnEnv env)
Complete constructor. |
Method Summary | |
void |
abortResize()
Abort the resize. |
void |
addComponent(GraphicalVisualElement component)
Add a component. |
java.awt.Point |
centre()
Get a representation of the centre of the container. |
void |
commitResize()
Commit the resize. |
void |
componentChanged(GraphicalVisualElement component)
Notification of the modification of a component BoundingBox. |
GraphicalVisualElement[] |
components()
Get the contained elements. |
void |
deselect()
Deselect the element, along with its label and information field. |
void |
export(GraphicalExporter g)
Exporting method. |
abstract void |
exportShapeInLightGray(GraphicalExporter g)
|
protected java.awt.Point |
getAbsCentre()
|
protected java.awt.Rectangle |
getBorderBox()
|
protected java.awt.Shape |
getInternalShape()
|
protected java.awt.Point |
getRelCentre()
|
boolean |
getShownInternal()
Look if the internal part of the associated element is shown. |
java.awt.Rectangle |
getSize()
Get the size. |
void |
induceSelection()
Induce the selection of the element. |
protected void |
initElement()
Initisalisation of the element, before computing the boxes, before any rendering. |
int |
inside(java.awt.Point here)
Look if a point is "inside" the element, and if the case arises, how the point is "inside" (border, angle, middle, and so on). |
java.awt.Shape |
internalShape()
Get the internal shape. |
protected void |
invalidateAbsCentre()
|
protected void |
invalidateAbsElemBox()
|
protected void |
invalidateAbsLoc()
|
protected void |
invalidateBorderBox()
|
protected void |
invalidateElementShape()
|
protected void |
invalidateInternalShape()
|
protected void |
invalidateRelCentre()
|
protected void |
invalidateSize()
|
void |
paint(java.awt.Graphics2D g,
boolean paintSelection)
Painting method. |
GraphicalVisualRenderable |
pointedElement(java.awt.Point here)
Look if the renderable contains a point. |
void |
print(java.awt.Graphics2D g)
Printing method. |
void |
removeComponent(GraphicalVisualElement component)
Remove a component. |
protected void |
reRendition()
|
boolean |
resize(java.awt.Dimension dim,
int h,
int v)
Try to resize the container. |
boolean |
resize(java.awt.Dimension dim,
int h,
int v,
java.awt.Dimension grid)
Try to resize the container on a grid. |
void |
restoreCompleteState(java.util.Hashtable state)
Store the aspect. |
void |
saveAspect()
Start a save process. |
void |
saveAspectAs(java.lang.String aspectName)
Save the aspect of the renderable as a specified name. |
void |
selectElement()
Select the element. |
protected void |
setAbsCentre()
|
protected void |
setBorderBox()
|
protected void |
setBoundingBox()
|
protected void |
setExternalBox()
|
protected void |
setInternalShape()
|
void |
setLayoutSize(java.awt.Rectangle newSize)
Set the size according to a layout. |
protected void |
setRelCentre()
|
void |
setShownInternal(boolean shown)
Specifiy if the internal part of the associated element is shown. |
protected void |
setSize()
|
void |
storeCompleteState(java.util.Hashtable state)
Store the aspect. |
protected boolean |
verifyChange()
Verify that the a change does not interfere with other elements. |
protected boolean |
verifyResize()
Verify that the a resize does not interfere with other elements. |
Methods inherited from class ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalShape |
addEndingArc, addNeighbour, addStartingArc, endingArcs, getElementShape, neighbours, partOfParent, removeNeighbour, setElementShape, setRelElemBox, shape, startingArcs |
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.GraphicalVisualContainer |
findInterfacePointNear |
Methods inherited from interface ConForM.CoopnTools.CoKer.Visual.GraphicalVisualShape |
addEndingArc, addNeighbour, addStartingArc, endingArcs, findEndingAttachementPointNear, findStartingAttachementPointNear, neighbours, removeNeighbour, shape, startingArcs |
Methods inherited from interface ConForM.CoopnTools.CoKer.Visual.GraphicalVisualElement |
attachToParent, description, externalBox, externalInfoBox, externalLabelBox, getInfo, getLocation, getShown, getShownInfo, getShownLabel, getStringTransfer, getTransferable, inducedSelection, label, parent, parentMoved, partOfParent, selected, setLayoutLocation |
Methods inherited from interface ConForM.CoopnTools.CoKer.Visual.GraphicalVisualEditable |
abortMove, commitMove, inChange, move, move, moveInfo, moveInfo, moveLabel, moveLabel, setColor, setInfo, setShown, setShownInfo, setShownLabel |
Methods inherited from interface javax.swing.undo.StateEditable |
restoreState, storeState |
Methods inherited from interface ConForM.CoopnTools.CoKer.Visual.GraphicalVisualRenderable |
actionOnMultipleClick, boundingBox, saveAspectAsPossible, saveAspectPossible, selectInfo, selectLabel, specificPopup |
Field Detail |
protected static final int resizeGap
protected static final int minimalWidth
protected static final int minimalHeight
protected java.awt.Rectangle size
protected java.awt.Point relCentre
protected java.awt.Point absCentre
protected java.awt.Rectangle borderBox
protected java.awt.Shape internalShape
protected boolean validSize
protected boolean validRelCentre
protected boolean validAbsCentre
protected boolean validBorderBox
protected boolean validInternalShape
Constructor Detail |
public AbstractGraphicalContainer(GraphicalVisualRenderableGroup parent, java.lang.String label, java.lang.String description, java.lang.Object element, ContainerAspect aspect, java.lang.String aspectName, java.lang.String aspectModule, AspectMgr aspectMgr, CoopnEnv env)
Method Detail |
protected void initElement()
initElement
in class AbstractGraphicalShape
protected void reRendition()
reRendition
in class AbstractGraphicalShape
protected void invalidateAbsLoc()
invalidateAbsLoc
in class AbstractGraphicalShape
protected void invalidateElementShape()
invalidateElementShape
in class AbstractGraphicalShape
protected void invalidateAbsElemBox()
invalidateAbsElemBox
in class AbstractGraphicalElement
protected void setExternalBox()
setExternalBox
in class AbstractGraphicalElement
public void componentChanged(GraphicalVisualElement component)
componentChanged
in interface GraphicalVisualRenderableGroup
protected void setBoundingBox()
setBoundingBox
in class AbstractGraphicalElement
protected void invalidateSize()
public final java.awt.Rectangle getSize()
GraphicalVisualContainer
getSize
in interface GraphicalVisualContainer
ConForM.CoopnTools.CoKer.Visual.GraphicalVisualContainer
protected void setSize()
protected void invalidateRelCentre()
protected final java.awt.Point getRelCentre()
protected void setRelCentre()
protected void invalidateAbsCentre()
protected final java.awt.Point getAbsCentre()
protected void setAbsCentre()
protected void invalidateBorderBox()
protected final java.awt.Rectangle getBorderBox()
protected void setBorderBox()
protected void invalidateInternalShape()
protected final java.awt.Shape getInternalShape()
protected void setInternalShape()
public void addComponent(GraphicalVisualElement component)
addComponent
in interface GraphicalVisualRenderableGroup
public void removeComponent(GraphicalVisualElement component)
removeComponent
in interface GraphicalVisualRenderableGroup
public GraphicalVisualElement[] components()
components
in interface GraphicalVisualRenderableGroup
public void storeCompleteState(java.util.Hashtable state)
storeCompleteState
in interface GraphicalVisualEditable
storeCompleteState
in class AbstractGraphicalElement
state
- an hashtable, storing states of elementspublic void restoreCompleteState(java.util.Hashtable state)
restoreCompleteState
in interface GraphicalVisualEditable
restoreCompleteState
in class AbstractGraphicalElement
state
- an hashtable, storing states of elementspublic void selectElement()
selectElement
in interface GraphicalVisualRenderable
selectElement
in class AbstractGraphicalShape
public void induceSelection()
induceSelection
in interface GraphicalVisualElement
induceSelection
in class AbstractGraphicalShape
public void deselect()
deselect
in interface GraphicalVisualRenderable
deselect
in class AbstractGraphicalShape
public boolean getShownInternal()
getShownInternal
in interface GraphicalVisualContainer
public void setShownInternal(boolean shown)
setShownInternal
in interface GraphicalVisualContainer
shown
- true iff the element must be shownpublic void setLayoutSize(java.awt.Rectangle newSize)
setLayoutSize
in interface GraphicalVisualContainer
newSize
- the new size, in absolute coordinatespublic boolean resize(java.awt.Dimension dim, int h, int v)
resize
in interface GraphicalVisualContainer
dim
- the increment in width and height; a positive
value means an inflation of the container, while
a negative value means a compression of the
containerh
- specify if resize at left, right or both part of
component; one of GraphicalVisualEditor.LEFT,
GraphicalVisualEditor.MIDDLE or
GraphicalVisualEditor.RIGHTv
- specify if resize at top, bottom or both part of
component one of GraphicalVisualEditor.TOP,
GraphicalVisualEditor.MIDDLE or
GraphicalVisualEditor.BOTTOMpublic boolean resize(java.awt.Dimension dim, int h, int v, java.awt.Dimension grid)
resize
in interface GraphicalVisualContainer
dim
- the increment in width and height; a positive
value means an inflation of the container, while
a negative value means a compression of the
containerh
- specify if resize at left, right or both part of
component; one of GraphicalVisualEditor.LEFT,
GraphicalVisualEditor.MIDDLE or
GraphicalVisualEditor.RIGHTv
- specify if resize at top, bottom or both part of
component one of GraphicalVisualEditor.TOP,
GraphicalVisualEditor.MIDDLE or
GraphicalVisualEditor.BOTTOMgrid
- grid sizepublic void commitResize()
commitResize
in interface GraphicalVisualContainer
public void abortResize()
abortResize
in interface GraphicalVisualContainer
public java.awt.Point centre()
centre
in interface GraphicalVisualContainer
public java.awt.Shape internalShape()
internalShape
in interface GraphicalVisualContainer
public void saveAspect()
saveAspect
in interface GraphicalVisualRenderable
saveAspect
in class AbstractGraphicalElement
public void saveAspectAs(java.lang.String aspectName)
saveAspectAs
in interface GraphicalVisualRenderable
saveAspectAs
in class AbstractGraphicalElement
aspectName
- the new aspect name to usepublic GraphicalVisualRenderable pointedElement(java.awt.Point here)
pointedElement
in interface GraphicalVisualRenderable
pointedElement
in class AbstractGraphicalElement
point
- the point in logicial coordinates; cannot be nullpublic int inside(java.awt.Point here)
inside
in interface GraphicalVisualElement
inside
in class AbstractGraphicalElement
point
- the point in logicial coordinates; cannot be nulljava.lang.IllegalArgumentException
- the argument is null.public void paint(java.awt.Graphics2D g, boolean paintSelection)
GraphicalVisualRenderable
paint
in interface GraphicalVisualRenderable
paint
in class AbstractGraphicalElement
ConForM.CoopnTools.CoKer.Visual.GraphicalVisualRenderable
g
- the graphics 2D; cannot be nullselected
- if true, the renderable paints only its selected
parts on the graphics; if false, the renderable
paints only its unselected part on the graphicspublic void print(java.awt.Graphics2D g)
GraphicalVisualRenderable
print
in interface GraphicalVisualRenderable
print
in class AbstractGraphicalElement
ConForM.CoopnTools.CoKer.Visual.GraphicalVisualRenderable
g
- the graphics 2D; cannot be nullpublic abstract void exportShapeInLightGray(GraphicalExporter g)
public void export(GraphicalExporter g)
GraphicalVisualRenderable
export
in interface GraphicalVisualRenderable
export
in class AbstractGraphicalElement
ConForM.CoopnTools.CoKer.Visual.GraphicalVisualRenderable
g
- the graphical exporter; cannot be nullGraphicalExporter
protected boolean verifyChange()
verifyChange
in class AbstractGraphicalShape
protected boolean verifyResize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |