|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
what a jfig graphics editor has to do.
Interface FigBasicEditor collects all methods necessary to interface a basic graphics/diagram editor with the jfig editing commands and objects.
Basically, jfig consists of four main parts. First, all graphical objects are realized as individual objects, that implement the jfig.objects.FigObject interface. Second, the objects are displayed on a special canvas, realized as a subclass of jfig.canvas.FigCanvas. The canvas supports zooming and panning, rulers, rubberbanding, a grid, and all required repaint algorithms. One of the repaint modes allow to draw one or a few 'tmp objects' over a static background buffer of the fixed 'standard' objects.
Third, the objects and all editing are managed by an editor, which must implement the FigBasicEditor (i.e., this) interface. We assume that the editor implements some kind of object list to keep track of the currently active graphics objects. Member functions of this interface allow to query the object list, to insert objects into it, to delete them, etc. This interface also provides functions to specify the current tmp object (needed for better display performance).
Fourth, we assume that all editing functionality is provided by small command objects, e.g. CopyObjectCommand etc. These command objects are also responsible for undo/redo capability.
Command
,
UndoStack
,
FigCanvas
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent evt)
|
void |
addTmpObject(FigObject obj)
|
void |
call(java.lang.String functionKey,
java.lang.Object arg)
|
void |
deleteFromObjectList(FigObject object)
|
void |
deleteTmpObject(FigObject obj)
|
void |
doRedraw()
|
FigObject[] |
findAllObjectsAt(java.awt.Point P)
|
FigObject |
findNextObjectAt(java.awt.Point P,
FigObject previous)
|
FigObject |
findObjectAt(java.awt.Point P)
|
FigAttribs |
getCurrentAttribs()
getCurrentAttribs: return a reference to the current editor global object attributes. |
Command |
getCurrentCommand()
|
java.lang.String |
getFilename()
allow to query the current filename (if any) |
FigCanvas |
getObjectCanvas()
getObjectCanvas: return a reference to the FigCanvas responsible for displaying the grahics objects. |
java.util.Enumeration |
getObjects()
|
FigObject[] |
getTmpObjects()
|
UndoStack |
getUndoStack()
|
void |
hideAllObjectCorners()
|
void |
insertIntoObjectList(FigObject object)
|
boolean |
isInObjectList(FigObject object)
|
void |
message(java.lang.String msg)
|
void |
setCurrentAttribs(FigAttribs newAttribs)
|
void |
showAllObjectCorners()
|
void |
showObjectCorners(FigObject obj)
|
void |
statusMessage(java.lang.String msg)
|
Method Detail |
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
public UndoStack getUndoStack()
public Command getCurrentCommand()
public FigCanvas getObjectCanvas()
public FigAttribs getCurrentAttribs()
public void setCurrentAttribs(FigAttribs newAttribs)
public void insertIntoObjectList(FigObject object)
public void deleteFromObjectList(FigObject object)
public boolean isInObjectList(FigObject object)
public java.util.Enumeration getObjects()
public FigObject findObjectAt(java.awt.Point P)
public FigObject findNextObjectAt(java.awt.Point P, FigObject previous)
public FigObject[] findAllObjectsAt(java.awt.Point P)
public void addTmpObject(FigObject obj)
public void deleteTmpObject(FigObject obj)
public FigObject[] getTmpObjects()
public void hideAllObjectCorners()
public void showAllObjectCorners()
public void showObjectCorners(FigObject obj)
public void doRedraw()
public void statusMessage(java.lang.String msg)
public void message(java.lang.String msg)
public void call(java.lang.String functionKey, java.lang.Object arg)
public java.lang.String getFilename()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |