|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.Visual.AbstractGraphicalElement
abstract graphical element.
Field Summary | |
protected java.awt.Rectangle |
absElemBox
|
protected java.awt.Rectangle |
absInfoBox
|
protected java.awt.Rectangle |
absLabelBox
|
protected java.awt.Point |
absLoc
|
protected Aspect |
aspect
|
protected AspectMgr |
aspectMgr
|
protected java.awt.Rectangle |
boundingBox
|
protected int |
delta
|
protected java.lang.String |
description
|
protected CoopnEnv |
env
|
protected java.awt.Rectangle |
externalBox
|
protected java.awt.Rectangle |
externalInfoBox
|
protected java.awt.Rectangle |
externalLabelBox
|
protected java.awt.font.FontRenderContext |
fontRenderContext
|
protected boolean |
inducedSelection
|
protected java.awt.Color |
inducedSelectionColor
|
protected java.awt.Font |
infoFont
|
protected java.awt.font.TextLayout |
infoLayout
|
protected java.awt.Point |
infoLoc
|
protected java.lang.String |
label
|
protected java.awt.Color |
labelColor
|
protected java.awt.Font |
labelFont
|
protected java.awt.font.TextLayout |
labelLayout
|
protected java.awt.Point |
labelLoc
|
protected java.awt.Color |
normalColor
|
protected java.lang.Object |
objectElement
|
protected GraphicalVisualRenderableGroup |
parent
|
protected java.awt.Rectangle |
relElemBox
|
protected java.awt.Rectangle |
relInfoBox
|
protected java.awt.Rectangle |
relLabelBox
|
protected java.awt.Point |
relLoc
|
protected Aspect |
savedAspect
|
protected java.awt.Color |
selectedColor
|
protected boolean |
selectedElem
|
protected boolean |
selectedInfo
|
protected java.awt.Color |
selectedInfoColor
|
protected boolean |
selectedLabel
|
protected java.awt.Color |
selectedLabelColor
|
protected boolean |
unconstrained
|
protected boolean |
validAbsElemBox
|
protected boolean |
validAbsInfoBox
|
protected boolean |
validAbsLabelBox
|
protected boolean |
validAbsLoc
|
protected boolean |
validBoundingBox
|
protected boolean |
validColor
|
protected boolean |
validExternalBox
|
protected boolean |
validExternalInfoBox
|
protected boolean |
validExternalLabelBox
|
protected boolean |
validInfoLoc
|
protected boolean |
validLabelLoc
|
protected boolean |
validRelElemBox
|
protected boolean |
validRelInfoBox
|
protected boolean |
validRelLabelBox
|
protected boolean |
validRelLoc
|
Fields inherited from interface javax.swing.undo.StateEditable |
RCSID |
Constructor Summary | |
AbstractGraphicalElement(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. |
Method Summary | |
void |
abortMove()
Abort the move. |
protected void |
acceptAspect()
|
void |
actionOnMultipleClick(java.awt.event.MouseEvent e,
java.awt.Point location,
GraphicalVisualEditor editor)
Multiple click callback. |
protected void |
addPopupItem(javax.swing.JMenuItem item)
Add a specific item in the popup |
AspectMgr |
aspectMgr()
|
java.lang.String |
aspectName()
|
void |
attachToParent(GraphicalVisualRenderableGroup parent)
Set the parent group if this element. |
java.awt.Rectangle |
boundingBox()
Get the bounding box. |
Aspect |
clonedAspect()
|
void |
commitMove()
Commit the move. |
java.lang.String |
description()
Description of the element. |
void |
deselect()
Deselect the element, along with its label and information field. |
void |
export(GraphicalExporter g)
Exporting method. |
java.awt.Rectangle |
externalBox()
Get the external box. |
java.awt.Rectangle |
externalInfoBox()
Get the external info box. |
java.awt.Rectangle |
externalLabelBox()
Get the external label box. |
protected java.awt.Rectangle |
getAbsElemBox()
|
protected java.awt.Rectangle |
getAbsInfoBox()
|
protected java.awt.Rectangle |
getAbsLabelBox()
|
protected java.awt.Point |
getAbsLoc()
|
protected java.awt.Rectangle |
getBoundingBox()
|
protected java.awt.Color |
getCol()
|
java.awt.Color |
getColor()
Get the color of the element. |
protected java.awt.Rectangle |
getExternalBox()
|
protected java.awt.Rectangle |
getExternalInfoBox()
|
protected java.awt.Rectangle |
getExternalLabelBox()
|
java.lang.String |
getInfo()
Get the information field. |
protected java.awt.Point |
getInfoLoc()
|
protected java.awt.Point |
getLabelLoc()
|
java.awt.Point |
getLocation()
Get the location. |
protected java.awt.Rectangle |
getRelElemBox()
|
protected java.awt.Rectangle |
getRelInfoBox()
|
protected java.awt.Rectangle |
getRelLabelBox()
|
protected java.awt.Point |
getRelLoc()
|
boolean |
getShown()
Look if the associated element is shown. |
boolean |
getShownInfo()
Look if the information field is shown. |
boolean |
getShownLabel()
Look if the label is shown. |
java.lang.String |
getStringTransfer()
Get the String image of this element used in textual transfers. |
java.awt.datatransfer.Transferable |
getTransferable()
Get a transferable representing the element. |
boolean |
inChange()
Look if a change is in progress. |
boolean |
inducedSelection()
Look if the element is selected, or if it is selected by induction. |
void |
induceSelection()
Set the induced selection of this element; when this method is called, this element must retrieve its induced selection state from its closely related elements. |
protected void |
initElement()
|
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). |
protected void |
internalDrawInfo(java.awt.Graphics2D g)
|
protected void |
internalDrawLabel(java.awt.Graphics2D g)
|
protected abstract void |
internalExport(GraphicalExporter g)
Export the internal of an element, with regards to its parent location. |
protected void |
internalExportInfo(GraphicalExporter g)
|
protected void |
internalExportLabel(GraphicalExporter g)
|
protected abstract void |
internalPaint(java.awt.Graphics2D g)
Paint the internal of an element, with regards to its center. |
protected abstract void |
internalPrint(java.awt.Graphics2D g)
Print the internal of an element, with regards to its center. |
protected void |
invalidateAbsElemBox()
|
protected void |
invalidateAbsInfoBox()
|
protected void |
invalidateAbsLabelBox()
|
protected void |
invalidateAbsLoc()
|
protected void |
invalidateBoundingBox()
|
protected void |
invalidateColor()
|
protected void |
invalidateExternalBox()
|
protected void |
invalidateExternalInfoBox()
|
protected void |
invalidateExternalLabelBox()
|
protected void |
invalidateInfoLoc()
|
protected void |
invalidateLabelLoc()
|
protected void |
invalidateRelElemBox()
|
protected void |
invalidateRelInfoBox()
|
protected void |
invalidateRelLabelBox()
|
protected void |
invalidateRelLoc()
|
java.lang.String |
label()
Label of the element. |
boolean |
move(java.awt.Dimension dim)
Try to move the element. |
boolean |
move(java.awt.Dimension dim,
java.awt.Dimension grid)
Try to move the element on a grid. |
boolean |
moveInfo(java.awt.Dimension dim)
Try to move the info field of the element. |
boolean |
moveInfo(java.awt.Dimension dim,
java.awt.Dimension grid)
Try to move the info field of the element on a grid. |
boolean |
moveLabel(java.awt.Dimension dim)
Try to move the label of the element. |
boolean |
moveLabel(java.awt.Dimension dim,
java.awt.Dimension grid)
Try to move the label of the element on a grid. |
java.lang.Object |
objectElement()
Get the original object element. |
void |
paint(java.awt.Graphics2D g,
boolean paintSelection)
Painting method. |
GraphicalVisualRenderableGroup |
parent()
Get the parent node of the element. |
void |
parentMoved()
Notification of the modification of location of the parent. |
GraphicalVisualRenderable |
pointedElement(java.awt.Point here)
Look if the renderable contains a point. |
void |
print(java.awt.Graphics2D g)
Printing method. |
protected void |
reRendition()
|
protected void |
restoreAspect()
|
void |
restoreCompleteState(java.util.Hashtable state)
Restore the aspect. |
void |
restoreState(java.util.Hashtable state)
Retore the aspect. |
void |
saveAspect()
Start a save process. |
void |
saveAspectAs(java.lang.String aspectName)
Save the aspect of the renderable as a specified name. |
boolean |
saveAspectAsPossible()
look if this renderable is able to save itself as a specified name. |
boolean |
saveAspectPossible()
look if this renderable is able to save itself. |
protected void |
saveIntAspect()
|
boolean |
selected()
Look if the element if selected or not. |
void |
selectElement()
Select the element. |
void |
selectInfo()
Select the information field of the element. |
void |
selectLabel()
Select the label of the element. |
protected void |
setAbsElemBox()
|
protected void |
setAbsInfoBox()
|
protected void |
setAbsLabelBox()
|
protected void |
setAbsLoc()
|
protected void |
setBoundingBox()
|
protected void |
setColor()
|
void |
setColor(java.awt.Color color)
Specifiy the color of the element. |
protected void |
setExternalBox()
|
protected void |
setExternalInfoBox()
|
protected void |
setExternalLabelBox()
|
void |
setInfo(java.lang.String info)
Set the information field. |
protected void |
setInfoLoc()
|
protected void |
setLabelLoc()
|
void |
setLayoutLocation(java.awt.Point newLocation)
Set the location according to a layout. |
protected void |
setRelElemBox()
|
protected void |
setRelInfoBox()
|
protected void |
setRelLabelBox()
|
protected void |
setRelLoc()
|
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. |
javax.swing.JMenuItem[] |
specificPopup()
Get the specific items of the popup menu of this element. |
void |
storeCompleteState(java.util.Hashtable state)
Store the aspect. |
void |
storeState(java.util.Hashtable state)
Store the aspect. |
protected void |
toAbsolute(java.awt.Point here)
|
protected void |
toRelative(java.awt.Point here)
|
protected abstract boolean |
verifyChange()
Verify that the a change does not interfere with other elements. |
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 |
partOfParent |
Field Detail |
protected GraphicalVisualRenderableGroup parent
protected java.lang.String label
protected java.lang.String description
protected java.lang.Object objectElement
protected Aspect aspect
protected AspectMgr aspectMgr
protected CoopnEnv env
protected boolean unconstrained
protected int delta
protected java.awt.font.FontRenderContext fontRenderContext
protected java.awt.Font labelFont
protected java.awt.Font infoFont
protected java.awt.Point relLoc
protected java.awt.Point absLoc
protected java.awt.Rectangle relElemBox
protected java.awt.Rectangle absElemBox
protected java.awt.Rectangle externalBox
protected java.awt.Rectangle boundingBox
protected java.awt.Point labelLoc
protected java.awt.Rectangle relLabelBox
protected java.awt.Rectangle absLabelBox
protected java.awt.Rectangle externalLabelBox
protected java.awt.Point infoLoc
protected java.awt.Rectangle relInfoBox
protected java.awt.Rectangle absInfoBox
protected java.awt.Rectangle externalInfoBox
protected java.awt.font.TextLayout labelLayout
protected java.awt.font.TextLayout infoLayout
protected java.awt.Color normalColor
protected java.awt.Color labelColor
protected java.awt.Color selectedColor
protected java.awt.Color selectedLabelColor
protected java.awt.Color selectedInfoColor
protected java.awt.Color inducedSelectionColor
protected boolean validRelLoc
protected boolean validAbsLoc
protected boolean validRelElemBox
protected boolean validAbsElemBox
protected boolean validExternalBox
protected boolean validBoundingBox
protected boolean validLabelLoc
protected boolean validRelLabelBox
protected boolean validAbsLabelBox
protected boolean validExternalLabelBox
protected boolean validInfoLoc
protected boolean validRelInfoBox
protected boolean validAbsInfoBox
protected boolean validExternalInfoBox
protected boolean validColor
protected Aspect savedAspect
protected boolean selectedElem
protected boolean selectedLabel
protected boolean selectedInfo
protected boolean inducedSelection
Constructor Detail |
public AbstractGraphicalElement(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)
Method Detail |
protected void saveIntAspect()
protected void acceptAspect()
protected void restoreAspect()
protected void initElement()
public Aspect clonedAspect()
public AspectMgr aspectMgr()
public java.lang.String aspectName()
protected void reRendition()
protected void invalidateRelLoc()
protected final java.awt.Point getRelLoc()
protected void setRelLoc()
protected void invalidateAbsLoc()
protected final java.awt.Point getAbsLoc()
protected void setAbsLoc()
protected void invalidateRelElemBox()
protected final java.awt.Rectangle getRelElemBox()
protected void setRelElemBox()
protected void invalidateAbsElemBox()
protected final java.awt.Rectangle getAbsElemBox()
protected void setAbsElemBox()
protected void invalidateExternalBox()
protected final java.awt.Rectangle getExternalBox()
protected void setExternalBox()
protected void invalidateBoundingBox()
protected final java.awt.Rectangle getBoundingBox()
protected void setBoundingBox()
protected final void invalidateLabelLoc()
protected final java.awt.Point getLabelLoc()
protected void setLabelLoc()
protected final void invalidateRelLabelBox()
protected final java.awt.Rectangle getRelLabelBox()
protected final void setRelLabelBox()
protected final void invalidateAbsLabelBox()
protected final java.awt.Rectangle getAbsLabelBox()
protected final void setAbsLabelBox()
protected void invalidateExternalLabelBox()
protected final java.awt.Rectangle getExternalLabelBox()
protected void setExternalLabelBox()
protected final void invalidateInfoLoc()
protected final java.awt.Point getInfoLoc()
protected void setInfoLoc()
protected final void invalidateRelInfoBox()
protected final java.awt.Rectangle getRelInfoBox()
protected final void setRelInfoBox()
protected final void invalidateAbsInfoBox()
protected final java.awt.Rectangle getAbsInfoBox()
protected final void setAbsInfoBox()
protected void invalidateExternalInfoBox()
protected final java.awt.Rectangle getExternalInfoBox()
protected void setExternalInfoBox()
protected void invalidateColor()
protected final java.awt.Color getCol()
protected void setColor()
protected void addPopupItem(javax.swing.JMenuItem item)
public GraphicalVisualRenderableGroup parent()
parent
in interface GraphicalVisualElement
public void attachToParent(GraphicalVisualRenderableGroup parent)
attachToParent
in interface GraphicalVisualElement
parent
- the parent group, or null if the element should be
dettached from its parentpublic void parentMoved()
parentMoved
in interface GraphicalVisualElement
public java.lang.String label()
label
in interface GraphicalVisualElement
public java.lang.Object objectElement()
public java.lang.String description()
description
in interface GraphicalVisualElement
public java.lang.String getStringTransfer()
getStringTransfer
in interface GraphicalVisualElement
public java.awt.datatransfer.Transferable getTransferable()
getTransferable
in interface GraphicalVisualElement
protected void toRelative(java.awt.Point here)
protected void toAbsolute(java.awt.Point here)
public java.awt.Point getLocation()
getLocation
in interface GraphicalVisualElement
public void setLayoutLocation(java.awt.Point newLocation)
setLayoutLocation
in interface GraphicalVisualElement
newLocation
- the new location, in absolute coordinatespublic 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
- grid sizepublic 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
- grid sizepublic 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
- grid sizepublic void commitMove()
commitMove
in interface GraphicalVisualEditable
public void abortMove()
abortMove
in interface GraphicalVisualEditable
public java.lang.String getInfo()
getInfo
in interface GraphicalVisualElement
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 boolean getShown()
getShown
in interface GraphicalVisualElement
public void setShown(boolean shown)
setShown
in interface GraphicalVisualEditable
shown
- true iff the element must be shownpublic boolean getShownLabel()
getShownLabel
in interface GraphicalVisualElement
public void setShownLabel(boolean shown)
setShownLabel
in interface GraphicalVisualEditable
shown
- true iff the label must be shownpublic boolean getShownInfo()
getShownInfo
in interface GraphicalVisualElement
public void setShownInfo(boolean shown)
setShownInfo
in interface GraphicalVisualEditable
shown
- true iff the information field must be shownpublic java.awt.Color getColor()
public void setColor(java.awt.Color color)
setColor
in interface GraphicalVisualEditable
color
- the colorpublic boolean saveAspectPossible()
saveAspectPossible
in interface GraphicalVisualRenderable
public void saveAspect()
saveAspect
in interface GraphicalVisualRenderable
public boolean saveAspectAsPossible()
saveAspectAsPossible
in interface GraphicalVisualRenderable
public void saveAspectAs(java.lang.String aspectName)
saveAspectAs
in interface GraphicalVisualRenderable
aspectName
- the new aspect name to usepublic void storeState(java.util.Hashtable state)
storeState
in interface javax.swing.undo.StateEditable
state
- an hashtable, storing states of elementspublic void restoreState(java.util.Hashtable state)
restoreState
in interface javax.swing.undo.StateEditable
state
- an hashtable, storing states of elementspublic void storeCompleteState(java.util.Hashtable state)
storeCompleteState
in interface GraphicalVisualEditable
state
- an hashtable, storing states of elementspublic void restoreCompleteState(java.util.Hashtable state)
restoreCompleteState
in interface GraphicalVisualEditable
state
- an hashtable, storing states of elementspublic void selectElement()
selectElement
in interface GraphicalVisualRenderable
public boolean selected()
selected
in interface GraphicalVisualElement
public void selectLabel()
selectLabel
in interface GraphicalVisualRenderable
public void selectInfo()
selectInfo
in interface GraphicalVisualRenderable
public void deselect()
deselect
in interface GraphicalVisualRenderable
public void induceSelection()
induceSelection
in interface GraphicalVisualElement
public boolean inducedSelection()
inducedSelection
in interface GraphicalVisualElement
public java.awt.Rectangle externalBox()
externalBox
in interface GraphicalVisualElement
public java.awt.Rectangle externalLabelBox()
externalLabelBox
in interface GraphicalVisualElement
public java.awt.Rectangle externalInfoBox()
externalInfoBox
in interface GraphicalVisualElement
public java.awt.Rectangle boundingBox()
boundingBox
in interface GraphicalVisualRenderable
public GraphicalVisualRenderable pointedElement(java.awt.Point here)
pointedElement
in interface GraphicalVisualRenderable
point
- the point in logicial coordinates; cannot be nullpublic int inside(java.awt.Point here)
inside
in interface GraphicalVisualElement
point
- the point in logicial coordinates; cannot be nulljava.lang.IllegalArgumentException
- the argument is null.public javax.swing.JMenuItem[] specificPopup()
specificPopup
in interface GraphicalVisualRenderable
public void actionOnMultipleClick(java.awt.event.MouseEvent e, java.awt.Point location, GraphicalVisualEditor editor)
actionOnMultipleClick
in interface GraphicalVisualRenderable
e
- the mouse eventlocation
- the location of the event, in logical spaceeditor
- the associated editorprotected abstract boolean verifyChange()
protected abstract void internalPaint(java.awt.Graphics2D g)
protected abstract void internalPrint(java.awt.Graphics2D g)
protected abstract void internalExport(GraphicalExporter g)
protected void internalDrawLabel(java.awt.Graphics2D g)
protected void internalDrawInfo(java.awt.Graphics2D g)
protected void internalExportLabel(GraphicalExporter g)
protected void internalExportInfo(GraphicalExporter g)
public void paint(java.awt.Graphics2D g, boolean paintSelection)
GraphicalVisualRenderable
paint
in interface GraphicalVisualRenderable
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)
print
in interface GraphicalVisualRenderable
g
- the graphics 2D; cannot be nullpublic void export(GraphicalExporter g)
export
in interface GraphicalVisualRenderable
stream
- the output stream; cannot be nullformat
- the format, as an integer code as mentionned
in the class Export; callers have the
guarantee that any value returned by the
exportableFormats method is a valid valuescale
- the scale factoroffset
- the offsetjava.lang.IllegalArgumentException
- An argument is illegaljava.lang.IllegalAccessException
- the format is not supported by this element.Export
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |