|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
General graphical visual elements. This interfaceclass defines the common components of graphical visual elements. Such elements are used and managed by the graphical visuals of CoopnTools. 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). This class must be extended for coping with the different kinds of visual elements.
Method Summary | |
void |
actionOnMultipleClick(java.awt.event.MouseEvent e,
java.awt.Point location,
GraphicalVisualEditor editor)
Multiple click callback. |
java.awt.Rectangle |
boundingBox()
Get the bounding box. |
void |
deselect()
Deselect the element, along with its label and information field. |
void |
export(GraphicalExporter g)
Exporting method. |
void |
paint(java.awt.Graphics2D g,
boolean selected)
Painting method. |
GraphicalVisualRenderable |
pointedElement(java.awt.Point p)
Look if the renderable contains a point. |
void |
print(java.awt.Graphics2D g)
Printing method. |
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. |
void |
selectElement()
Select the element. |
void |
selectInfo()
Select the information field of the element. |
void |
selectLabel()
Select the label of the element. |
javax.swing.JMenuItem[] |
specificPopup()
Get the specific items of the popup menu of this renderable. |
Method Detail |
public void selectElement()
public void selectLabel()
public void selectInfo()
public void deselect()
public boolean saveAspectPossible()
public void saveAspect()
public boolean saveAspectAsPossible()
public void saveAspectAs(java.lang.String aspectName)
aspectName
- the new aspect name to usepublic java.awt.Rectangle boundingBox()
public GraphicalVisualRenderable pointedElement(java.awt.Point p)
point
- the point in logicial coordinates; cannot be nullpublic javax.swing.JMenuItem[] specificPopup()
public void actionOnMultipleClick(java.awt.event.MouseEvent e, java.awt.Point location, GraphicalVisualEditor editor)
e
- the mouse eventlocation
- the location of the event, in logical spaceeditor
- the associated editorpublic void paint(java.awt.Graphics2D g, boolean selected)
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)
g
- the graphics 2D; cannot be nullpublic void export(GraphicalExporter g)
g
- the graphical exporter; cannot be nullGraphicalExporter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |