|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Graphical Visual Editor. Such an editor is able to perform editions of a graphical visual.
Field Summary | |
static int |
BOTTOM
Constant denoting the bottom of a box. |
static int |
ELEMENT
Constant denoting an editable itself. |
static int |
ES
Constant denoting the alignment of an ediatble with selection. |
static int |
INFO
Constant denoting the information field of an editable. |
static int |
LABEL
Constant denoting the label of an editable. |
static int |
LEFT
Constant denoting the left of a box. |
static int |
MIDDLE
Constant denoting the middle (centre) of a box. |
static int |
RIGHT
Constant denoting the right of a box. |
static int |
SGE
Constant denoting the alignment of selection as a group with an editable. |
static int |
SIE
Constant denoting the alignment of selection's items with an editable. |
static int |
TOP
Constant denoting the top of a box. |
Method Summary | |
void |
addIntermediaryPoint(GraphicalVisualArc arc,
int index,
java.awt.Point point)
Add an intermediary point at a specific index. |
void |
addIntermediaryPoint(GraphicalVisualArc arc,
java.awt.Point point)
Add an intermediary point at the best index. |
boolean |
canRedo()
Look if it is possible to redo. |
boolean |
canUndo()
Look if it is possible to undo. |
void |
copy()
Copy the selection. |
void |
deselectAll()
Deselection of all elements. |
GraphicalVisualElement[] |
editables()
Get the edited elements. |
void |
export()
Show the export dialog, and start an exportation process according to. |
void |
export(java.io.PrintWriter writer,
int format,
java.awt.Insets insets,
int zoom,
CoopnEnv env)
Start an exportation process. |
int |
getHorizontalStep()
Get the the horizontal step of the grid. |
int |
getRotationStep()
Get the the rotation step of the angular grid. |
int |
getVerticalStep()
Get the the vertical step of the grid. |
int |
getZoom()
Return the current zoom factor. |
boolean |
hasPrimarySelection()
Look if a primary selection exists. |
java.util.Set |
helpers()
Get the set of helpers associated to this editor. |
void |
horizontalAlignment(GraphicalVisualElement editable,
int kind,
int editablePart,
int editableLoc,
int selectionLoc)
Horizontal alignment of the selection. |
void |
incrementalLayout(IncrementalLayouter layouter)
Incremental layout. |
void |
invertInfoSelection(GraphicalVisualElement element)
Inversion of the selection state of the info field of an element. |
void |
invertLabelSelection(GraphicalVisualElement element)
Inversion of the selection state of the label of an element. |
void |
invertSelection(GraphicalVisualElement element)
Inversion of the selection state of an element. |
boolean |
isAngularGridActivated()
Look if the angular grid is active. |
boolean |
isGridActivated()
Look if the grid is active. |
void |
layout(Layouter layouter)
Total layout. |
boolean |
modified()
Look if this editor has be used to modify its content. |
boolean |
move(GraphicalVisualEditable editable,
int x,
int y)
Move an editable. |
boolean |
move(GraphicalVisualEditable editable,
int x,
int y,
java.awt.Dimension grid)
Move an editable on a grid. |
boolean |
moveInfo(GraphicalVisualEditable editable,
int x,
int y)
Move the information field of an editable. |
boolean |
moveInfo(GraphicalVisualEditable editable,
int x,
int y,
java.awt.Dimension grid)
Move the information field of an editable on a grid. |
void |
moveIntermediaryPoint(GraphicalVisualArc arc,
int index,
int x,
int y)
Move an intermediary point of an arc. |
boolean |
moveLabel(GraphicalVisualEditable editable,
int x,
int y)
Move the label of an editable. |
boolean |
moveLabel(GraphicalVisualEditable editable,
int x,
int y,
java.awt.Dimension grid)
Move the label of an editable on a grid. |
void |
open()
Show an open dialog, an start an open process according to it. |
void |
open(java.lang.String name)
Start an open process. |
boolean |
openPossible()
Look if the editor is able to perform an open. |
void |
print()
Show the print dialog, and start a print process according to. |
void |
print(java.awt.print.PrinterJob printer)
Start a print process. |
void |
quickHorizontalAlignment()
Quick horizontal alignment of the selection. |
void |
quickVerticalAlignment()
Quick vertical alignment of the selection. |
boolean |
quit()
Quit. |
void |
redo()
Redo the last undo, if possible. |
void |
removeIntermediaryPoint(GraphicalVisualArc arc,
int index)
Remove an intermediary point at a specific index. |
void |
removeIntermediaryPoint(GraphicalVisualArc arc,
java.awt.Point point)
Remove an intermediary point at the best index. |
void |
reOpen()
Start a re-open process. |
boolean |
reOpenPossible()
Look if the editor is able to perform a re-open. |
void |
resetAbstraction(GraphicalVisualElement abstracted,
GraphicalVisualElement abstraction)
Reset an abstraction. |
void |
resetAbstraction(GraphicalVisualElementGroup abstracted,
GraphicalVisualElementGroup abstraction)
Reset a set of abstractions. |
boolean |
resize(GraphicalVisualContainer container,
int x,
int y,
int h,
int v)
Resize a container. |
boolean |
resize(GraphicalVisualContainer container,
int x,
int y,
int h,
int v,
java.awt.Dimension grid)
Resize a container on a grid. |
void |
resizeToFit()
Resize the window to fit the drawing. |
boolean |
rotate(GraphicalVisualRotatableNode node,
int angle)
Rotate a rotatable node. |
boolean |
rotate(GraphicalVisualRotatableNode node,
int angle,
int grid)
Rotate a rotatable node on an angular grid. |
void |
save()
Start a save process. |
void |
saveAs()
Show a saveAs dislog, an start a saveAs process according to it. |
void |
saveAs(java.lang.String name)
Start a saveAs process. |
boolean |
saveAsPossible()
Look if the editor is able to perform a saveAs. |
boolean |
savePossible()
Look if the editor is able to perform a save. |
void |
scrollToShow()
Scroll to show the selection. |
void |
select(GraphicalVisualElement element)
Selection of an element. |
void |
select(GraphicalVisualElement[] elements)
Selection of an array of elements. |
void |
selectAll()
Selection of all top-level elements. |
boolean |
selected()
Look if something is selected. |
void |
selectInfo(GraphicalVisualElement element)
Selection of the info field of an element. |
void |
selectInternal(GraphicalVisualContainer container)
Selection of the internal of a container. |
void |
selectLabel(GraphicalVisualElement element)
Selection of the label of an element. |
void |
selectRectangle(java.awt.Rectangle rectangle)
Selection of the content of a rectangular area. |
void |
setAbstraction(GraphicalVisualElement abstracted,
GraphicalVisualElement abstraction)
Set an abstraction. |
void |
setAbstraction(GraphicalVisualElementGroup abstracted,
GraphicalVisualElementGroup abstraction)
Set a set of abstractions. |
void |
setAndShowExclusiveInfoText(GraphicalVisualEditable editable,
java.lang.String text)
Set and show the info field text, and hide the label field. |
void |
setAndShowInfoText(GraphicalVisualEditable editable,
java.lang.String text)
Set and show the info field text. |
void |
setAndShowInfoText(GraphicalVisualElementGroup group,
java.util.Map texts)
Set and show many info field texts of elements in one edition. |
void |
setAngularGridActivated(boolean active)
Set the activation status of the angular grid. |
void |
setColor(java.awt.Color color)
Set the color of the selection. |
void |
setColor(GraphicalVisualEditable editable,
java.awt.Color color)
Set the color of an editable. |
void |
setGridActivated(boolean active)
Set the activation status of the grid. |
void |
setHorizontalStep(int step)
set the horizontal step of the grid. |
void |
setInfoText(GraphicalVisualEditable editable,
java.lang.String text)
Set the info field text. |
void |
setRotationStep(int step)
set the rotation step of the angular grid. |
void |
setType(GraphicalVisualArc arc,
int type)
Set the type of an arc. |
void |
setVerticalStep(int step)
set the vertical step of the grid. |
void |
setVisible(boolean visible)
Show or hide the selection. |
void |
setVisible(GraphicalVisualEditable editable,
boolean visible)
Show or hide an editable. |
void |
setVisibleInfo(boolean visible)
Show or hide the info of the selection. |
void |
setVisibleInfo(GraphicalVisualEditable editable,
boolean visible)
Show or hide the info of an editable. |
void |
setVisibleInfoExclusive(GraphicalVisualEditable editable)
Show the infor field of an editable, and hide its label. |
void |
setVisibleInternal(GraphicalVisualContainer container,
boolean visible)
Show or hide the internal of a container. |
void |
setVisibleLabel(boolean visible)
Show or hide the label of the selection. |
void |
setVisibleLabel(GraphicalVisualEditable editable,
boolean visible)
Show or hide the label of an editable. |
void |
setVisibleLabelAndInfo(GraphicalVisualEditable editable)
Show both the label of an editable and its info field. |
void |
setVisibleLabelExclusive(GraphicalVisualEditable editable)
Show the label of an editable, and hide its info field. |
void |
setZoom(int fact)
Set the zoom factor |
void |
showVisual()
Show (and move in front) the window associated to this editor. |
java.lang.String |
title()
Get the title of the displayed document. |
void |
undo()
Undo the last edit, if possible. |
void |
verticalAlignment(GraphicalVisualElement editable,
int kind,
int editablePart,
int editableLoc,
int selectionLoc)
Vertical alignment of the selection. |
void |
zoom()
Show the zoom dialog. |
void |
zoomIn()
Increase the zoom factor. |
void |
zoomOut()
Decrease the zoom factor. |
void |
zoomToFit()
Zoom to fit in window. |
Field Detail |
public static final int SIE
public static final int SGE
public static final int ES
public static final int ELEMENT
public static final int LABEL
public static final int INFO
public static final int MIDDLE
public static final int LEFT
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
Method Detail |
public java.lang.String title()
public boolean canUndo()
public boolean canRedo()
public void undo()
public void redo()
public GraphicalVisualElement[] editables()
public boolean modified()
public void showVisual()
public java.util.Set helpers()
public boolean reOpenPossible()
public void reOpen()
public void open()
public boolean openPossible()
public void open(java.lang.String name)
public boolean savePossible()
public void save()
public boolean saveAsPossible()
public void saveAs()
public void saveAs(java.lang.String name)
public boolean quit()
public void export()
public void export(java.io.PrintWriter writer, int format, java.awt.Insets insets, int zoom, CoopnEnv env)
writer
- the print writer to useformat
- the format, according to GraphicalExporter constantsinsets
- the marginszoom
- the zoom in percentsenv
- the environment to usepublic void print()
public void print(java.awt.print.PrinterJob printer)
public void copy()
public boolean isGridActivated()
public void setGridActivated(boolean active)
active
- true iff the grid is to be set to activepublic int getHorizontalStep()
public void setHorizontalStep(int step)
step
- the horizontal step in CLUpublic int getVerticalStep()
public void setVerticalStep(int step)
step
- the vertical step in CLUpublic boolean isAngularGridActivated()
public void setAngularGridActivated(boolean active)
active
- true iff the angular grid is to be set to activepublic int getRotationStep()
public void setRotationStep(int step)
step
- the horizontal step in degreespublic void scrollToShow()
public void resizeToFit()
public boolean selected()
public boolean hasPrimarySelection()
public void deselectAll()
public void selectAll()
public void select(GraphicalVisualElement element)
element
- the elementpublic void select(GraphicalVisualElement[] elements)
element
- the elementpublic void selectLabel(GraphicalVisualElement element)
element
- the elementpublic void selectInfo(GraphicalVisualElement element)
element
- the elementpublic void invertSelection(GraphicalVisualElement element)
element
- the elementpublic void invertLabelSelection(GraphicalVisualElement element)
element
- the elementpublic void invertInfoSelection(GraphicalVisualElement element)
element
- the elementpublic void selectInternal(GraphicalVisualContainer container)
container
- the containerpublic void selectRectangle(java.awt.Rectangle rectangle)
rectangle
- the rectangular areapublic int getZoom()
public void zoom()
public void setZoom(int fact)
fact
- the new zoom factor, between 20 and 400.public void zoomIn()
public void zoomOut()
public void zoomToFit()
public boolean move(GraphicalVisualEditable editable, int x, int y)
editable
- the editablex
- the x-incrementy
- the y incrementpublic boolean moveLabel(GraphicalVisualEditable editable, int x, int y)
editable
- the editablex
- the x-incrementy
- the y incrementpublic boolean moveInfo(GraphicalVisualEditable editable, int x, int y)
editable
- the editablex
- the x-incrementy
- the y incrementpublic boolean move(GraphicalVisualEditable editable, int x, int y, java.awt.Dimension grid)
editable
- the editablex
- the x-incrementy
- the y incrementgrid
- the grid; if null, takes the current grid of
the editor (if any)public boolean moveLabel(GraphicalVisualEditable editable, int x, int y, java.awt.Dimension grid)
editable
- the editablex
- the x-incrementy
- the y incrementgrid
- the grid; if null, takes the current grid of
the editor (if any)public boolean moveInfo(GraphicalVisualEditable editable, int x, int y, java.awt.Dimension grid)
editable
- the editablex
- the x-incrementy
- the y incrementgrid
- the grid; if null, takes the current grid of
the editor (if any)public boolean resize(GraphicalVisualContainer container, int x, int y, int h, int v)
container
- the containerx
- the x-increment (inflation) or decrement (deflation)y
- the y increment (inflation) or decrement (deflation)h
- 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(GraphicalVisualContainer container, int x, int y, int h, int v, java.awt.Dimension grid)
container
- the containerx
- the x-increment (inflation) or decrement (deflation)y
- the y increment (inflation) or decrement (deflation)h
- 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
- the grid; if null, takes the current grid of
the editor (if any)public boolean rotate(GraphicalVisualRotatableNode node, int angle)
node
- the rotatable nodeangle
- the angle as a integer; this parameter is evaluated
module 360public boolean rotate(GraphicalVisualRotatableNode node, int angle, int grid)
node
- the rotatable nodeangle
- the angle as a integer; this parameter is evaluated
module 360grid
- the angular grid; if zero, takes the current angular grid of
the editor (if any)public void setType(GraphicalVisualArc arc, int type)
arc
- the arctype
- the type of the arcpublic void moveIntermediaryPoint(GraphicalVisualArc arc, int index, int x, int y)
arc
- the arcindex
- the index of the intermediary pointx
- the x-incrementy
- the y incrementpublic void addIntermediaryPoint(GraphicalVisualArc arc, int index, java.awt.Point point)
arc
- the arcpoint
- the location of the new pointindex
- the indexpublic void addIntermediaryPoint(GraphicalVisualArc arc, java.awt.Point point)
arc
- the arcpoint
- the location of the new pointpublic void removeIntermediaryPoint(GraphicalVisualArc arc, int index)
arc
- the arcindex
- the indexpublic void removeIntermediaryPoint(GraphicalVisualArc arc, java.awt.Point point)
arc
- the arcpoint
- the location of the point to removepublic void layout(Layouter layouter)
layouter
- the layouter to usepublic void incrementalLayout(IncrementalLayouter layouter)
layouter
- the layouter to usepublic void horizontalAlignment(GraphicalVisualElement editable, int kind, int editablePart, int editableLoc, int selectionLoc)
editable
- the element used as reference for the alignmentkind
- the kind of alignment; one of SGE, SIE or ESeditablePart
- specify if the element itself, its label or its
information field must be used as the base of
the operation; one of ELEMENT, LABEL or INFOeditableLoc
- specify if the left, the centre or the right of
the base must be used in the alignment; one of
LEFT, MIDDLE, RIGHTselectionLoc
- specify if the left, the centre or the right of
the selection must be used in the alignment; one of
LEFT, MIDDLE, RIGHTpublic void quickHorizontalAlignment()
public void verticalAlignment(GraphicalVisualElement editable, int kind, int editablePart, int editableLoc, int selectionLoc)
editable
- the element used as reference for the alignmentkind
- the kind of alignment; one of SGE, SIE or ESeditablePart
- specify if the element itself, its label or its
information field must be used as the base of
the operation; one of ELEMENT, LABEL or INFOeditableLoc
- specify if the top, the centre or the bottom of
the base must be used in the alignment; one of
TOP, MIDDLE, BOTTOMselectionLoc
- specify if the top, the centre or the bottom of
the selection must be used in the alignment; one of
TOP, MIDDLE, BOTTOMpublic void quickVerticalAlignment()
public void setVisible(GraphicalVisualEditable editable, boolean visible)
editable
- the editablevisible
- true iff the editable must be visiblepublic void setVisible(boolean visible)
visible
- true iff the selection must be visiblepublic void setVisibleLabel(GraphicalVisualEditable editable, boolean visible)
editable
- the editablevisible
- true iff the label must be visiblepublic void setVisibleLabel(boolean visible)
visible
- true iff the label must be visiblepublic void setVisibleInfo(GraphicalVisualEditable editable, boolean visible)
editable
- the editablevisible
- true iff the info must be visiblepublic void setVisibleInfo(boolean visible)
visible
- true iff the info must be visiblepublic void setVisibleInternal(GraphicalVisualContainer container, boolean visible)
container
- the containervisible
- true iff the internal must be visiblepublic void setVisibleLabelExclusive(GraphicalVisualEditable editable)
editable
- the editablepublic void setVisibleInfoExclusive(GraphicalVisualEditable editable)
editable
- the editablepublic void setVisibleLabelAndInfo(GraphicalVisualEditable editable)
editable
- the editablepublic void setColor(GraphicalVisualEditable editable, java.awt.Color color)
editable
- the editablecolor
- the color to setpublic void setColor(java.awt.Color color)
color
- the color to setpublic void setInfoText(GraphicalVisualEditable editable, java.lang.String text)
editable
- the editabletext
- the textpublic void setAndShowInfoText(GraphicalVisualEditable editable, java.lang.String text)
editable
- the editabletext
- the textpublic void setAndShowExclusiveInfoText(GraphicalVisualEditable editable, java.lang.String text)
editable
- the editabletext
- the textpublic void setAndShowInfoText(GraphicalVisualElementGroup group, java.util.Map texts)
group
- the group of elementstexts
- a map between the elements and the corresponding
texts; any element of the group which has no
associated text is just shownpublic void setAbstraction(GraphicalVisualElement abstracted, GraphicalVisualElement abstraction)
abstracted
- the abstracted elementabstraction
- the abstractionpublic void resetAbstraction(GraphicalVisualElement abstracted, GraphicalVisualElement abstraction)
abstracted
- the abstracted elementabstraction
- the abstractionpublic void setAbstraction(GraphicalVisualElementGroup abstracted, GraphicalVisualElementGroup abstraction)
abstracted
- the abstracted elementsabstraction
- the abstractionspublic void resetAbstraction(GraphicalVisualElementGroup abstracted, GraphicalVisualElementGroup abstraction)
abstracted
- the abstracted elementsabstraction
- the abstractions
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |