|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ConForM.CoopnTools.CoKer.Visual.GraphicalPicture
Graphical Visual Picture. A picture represents a model with an aspect. A picture has all information needed by a garphical visual to work. In addition, a picture is a renderable group; it is a kind of top-level container for the elements. This class is an abstract class; however, the methods of renderable are implemented. Coordinates 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).
Fields inherited from interface javax.swing.undo.StateEditable |
RCSID |
Constructor Summary | |
GraphicalPicture()
|
Method Summary | |
void |
actionOnMultipleClick(java.awt.event.MouseEvent e,
java.awt.Point location,
GraphicalVisualEditor editor)
Multiple click callback. |
void |
addComponent(GraphicalVisualElement component)
Add a component. |
java.awt.Rectangle |
boundingBox()
Get the bounding box. |
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. |
abstract void |
dispose()
Leave a picture. |
void |
export(GraphicalExporter g)
Exporting method. |
abstract java.lang.String |
name()
Get the name of the picture. |
abstract GraphicalPicture |
open(java.lang.String aspectName)
Open the picture using a specified aspect name. |
abstract boolean |
openPossible()
Look if the picture is able to perform an open. |
abstract PackageMgr |
packageMgr()
Get the package manager used to access the package of the model associated to this picture. |
abstract java.lang.String |
packageName()
Get the name of the package of the model associated to this picture; may be null iff no package. |
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 |
removeComponent(GraphicalVisualElement component)
Remove a component. |
GraphicalPicture |
reOpen()
Re-open the picture using its default aspect name. |
abstract boolean |
reOpenPossible()
Look if the picture is able to perform a re-open. |
void |
restoreState(java.util.Hashtable state)
Restore the state, by delegating this op to the elements. |
boolean |
save()
Save the aspect of the picture, under the current aspect name |
abstract boolean |
saveAs(java.lang.String aspectName)
Save the aspect of the picture, as a particular aspect name. |
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. |
abstract boolean |
saveAsPossible()
Look if the picture is able to save its aspect under a specified name. |
abstract boolean |
savePossible()
Look if the picture is able to save its aspect. |
void |
selectElement()
Select the element. |
void |
selectInfo()
Select the information field of the element. |
void |
selectLabel()
Select the label of the element. |
void |
setEditables(GraphicalVisualElement[] components)
Set the components of the picture |
abstract javax.swing.Action[] |
specificAction()
Get the specific actions to put in the tool bar. |
abstract javax.swing.JMenuItem[] |
specificEditMenu()
Get the specific edit menu. |
abstract javax.swing.JMenuItem[] |
specificFileMenu()
Get the specific file menu. |
abstract javax.swing.JMenuItem[] |
specificHelpMenu()
Get the specific help menu. |
abstract javax.swing.JMenu[] |
specificMenu()
Get the specific menus. |
javax.swing.KeyStroke |
specificPictureAcceleratorKey()
Specific menu item accelerator. |
javax.swing.KeyStroke |
specificPictureAcceleratorKey2()
Second specific menu item accelerator. |
javax.swing.JMenuItem[] |
specificPopup()
Get the specific items of the popup menu of this renderable. |
abstract javax.swing.JMenuItem[] |
specificViewMenu()
Get the specific view menu. |
void |
storeState(java.util.Hashtable state)
Store the state, by delegating this op to the elements. |
abstract java.lang.String |
title()
Get the title of the graph. |
abstract void |
use()
Uses a picture. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphicalPicture()
Method Detail |
public abstract void use()
public abstract void dispose()
public abstract java.lang.String packageName()
public abstract PackageMgr packageMgr()
public abstract boolean reOpenPossible()
public GraphicalPicture reOpen()
public abstract boolean openPossible()
public abstract GraphicalPicture open(java.lang.String aspectName)
aspectName
- the name of the aspect to use; a NULL value
means the default aspect namepublic abstract boolean savePossible()
public boolean save()
public abstract boolean saveAsPossible()
public abstract boolean saveAs(java.lang.String aspectName)
aspectName
- the name of the aspect to use; a NULL value
means the current aspect name.public abstract java.lang.String title()
public abstract java.lang.String name()
public final javax.swing.KeyStroke specificPictureAcceleratorKey()
public final javax.swing.KeyStroke specificPictureAcceleratorKey2()
public abstract javax.swing.JMenuItem[] specificFileMenu()
public abstract javax.swing.JMenuItem[] specificEditMenu()
public abstract javax.swing.JMenuItem[] specificViewMenu()
public abstract javax.swing.JMenuItem[] specificHelpMenu()
public abstract javax.swing.JMenu[] specificMenu()
public abstract javax.swing.Action[] specificAction()
public void addComponent(GraphicalVisualElement component)
addComponent
in interface GraphicalVisualRenderableGroup
public void removeComponent(GraphicalVisualElement component)
removeComponent
in interface GraphicalVisualRenderableGroup
public void setEditables(GraphicalVisualElement[] components)
components
- the components of the picture; cannot be nullpublic GraphicalVisualElement[] components()
components
in interface GraphicalVisualRenderableGroup
public void storeState(java.util.Hashtable state)
storeState
in interface javax.swing.undo.StateEditable
public void restoreState(java.util.Hashtable state)
restoreState
in interface javax.swing.undo.StateEditable
public void selectElement()
selectElement
in interface GraphicalVisualRenderable
public void selectLabel()
selectLabel
in interface GraphicalVisualRenderable
public void selectInfo()
selectInfo
in interface GraphicalVisualRenderable
public void deselect()
deselect
in interface GraphicalVisualRenderable
public 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 componentChanged(GraphicalVisualElement component)
componentChanged
in interface GraphicalVisualRenderableGroup
public java.awt.Rectangle boundingBox()
boundingBox
in interface GraphicalVisualRenderable
public GraphicalVisualRenderable pointedElement(java.awt.Point p)
pointedElement
in interface GraphicalVisualRenderable
point
- the point in logicial coordinates; cannot be nullpublic 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 assicated editorpublic void paint(java.awt.Graphics2D g, boolean selected)
paint
in interface 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
g
- the graphical exporter; cannot be nullGraphicalExporter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |