|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This class represents the drawing-area for graphs in abstract form.
Instances of GraphPanelListener
can be registered with a GraphPanel and then will be
informed about user interaction events that occurred on the
GraphPanel instance.
GraphPanelListener| Field Summary | |
static int |
DRAG_TOLERANCE
The minimum distance to start a dragging action |
| Method Summary | |
void |
addDragListener(GraphPanelDragListener listener)
Adds a listener that will react on drag events like start, enter, exit, move and drop. |
void |
addGraphPanelListener(GraphPanelListener listener)
Adds a GraphPanelListener to this instance. |
void |
addModifyListener(ModifiedVisualGraphListener listener)
The method addModifyListener lets users to keep track on current changes of the represented VisualGraph. |
void |
copy()
Copy the selection into the internal clipboard. |
void |
cut()
Cut the selection into the internal clipboard. |
void |
deleteSelection()
Deletes the currently selected objects. |
void |
disableMode(int modemask)
Disables the given mode(s) on this instance. |
void |
drop(VisualGraphObject vgo,
VisualGraphObject[] vgos,
int x,
int y)
Invoked by the DropListener to let the panel handle the dropped VisualGraphObject. |
void |
enableMode(int modemask)
Enables the given mode(s) on this instance. |
ApplicationFrame |
getApplicationFrame()
Returns the application frame reference. |
AttributableOnSetDelegate |
getAttributableOnSetDelegate()
The method getAttributableOnSetDelegate returns the previously set AttributableOnSet instance of this GraphPanel or null,if no
such object has been set. |
GraphApplication |
getGraphApplication()
Deprecated. This method is about to disappear, use getApplicationFrame() instead! |
GraphController |
getGraphController()
Returns a GraphController. |
RendererConfiguration |
getRendererConfiguration()
Returns the current RendererConfiguration for this
GraphPanel. |
ToolTipGenerator |
getToolTipGenerator()
Returns the currently used tooltip generator |
int |
getViewportHeight()
Computes the sizes of the client area that corresponds to the viewport width in PIXELS. |
int |
getViewportWidth()
Computes the sizes of the client area that corresponds to the viewport width in PIXELS. |
VisualGraphView |
getVisualGraph()
Gets the visual graph instance that is currently displayed in the graphpanel. |
java.awt.Image |
getVisualGraphIcon(int width,
int height)
Renders an icon for the VisualGraph. |
boolean |
isAntialiasing()
Returns true is anti-aliasing is enabled,
otherwise false |
boolean |
isEditable()
Returns whether the document is editable or not. |
boolean |
isModified()
Returns whether the document needs saving or not. |
void |
paste()
Paste the contents of the internal clipboard into the GraphPanel. |
void |
pasteBefore(VisualNode visualnode)
Paste the contents of the internal clipboard into the GraphPanel. |
void |
pasteBehind(VisualNode visualnode)
Paste the contents of the internal clipboard into the GraphPanel. |
void |
pasteStart()
Paste the contents of the internal clipboard into the GraphPanel. |
void |
pasteStop()
Paste the contents of the internal clipboard into the GraphPanel. |
void |
postSelect()
This method should handle all necessary actions to be done whenever you modify the selection of the encapsulated VisualGraphView and its not implicitly propagated to the enclosing GraphPanel. |
void |
redo()
Redo the last undone change. |
void |
removeDragListener(GraphPanelDragListener listener)
Removed a listener that will react on drag events like start, enter, exit, move and drop. |
void |
removeGraphPanelListener(GraphPanelListener listener)
Removes a GraphPanelListener from this instance. |
void |
removeModifyListener(ModifiedVisualGraphListener listener)
The method removeModifyListener should remove the passed listener from all the previously added listener lists. |
void |
setAntialiasing(boolean antialiasing)
Enables anti-aliasing if the argument is true,
otherwise anti-aliasing is disabled. |
void |
setAttributableOnSetDelegate(AttributableOnSetDelegate delegate)
The method setAttributableOnSetDelegate sets the delegate object to be used to create, fetch or retrieve the AttributableOnSet from to be displayed when a selection or similar occurs. |
void |
setGraphController(GraphController graphcontroller,
VisualGraphView visualgraphview)
Sets a visualgraph to display along with a controller. |
void |
setModified()
Sets the modified state of the document. |
void |
setToolTipGenerator(ToolTipGenerator generator)
Sets the tooltip generator to generate the tooltips for this component |
void |
setUnmodified()
Clears the modified state of the document. |
void |
setVisualGraph(VisualGraphView visualgraphview)
Sets the VisualGraph to display in the graphpanel. |
void |
setZoom(double scaleX,
double scaleY)
sets the zoom factors for the graph view. |
void |
setZoom(double scaleX,
double scaleY,
boolean centerzoom)
sets the zoom factors for the graph view. |
void |
setZoomToFit()
sets the zoom factors for the graph view so that all visible items fit into the visible region. |
void |
undo()
Undo the last undoable change. |
void |
update(Observable o,
java.lang.Object arg)
This method is called by the observable that registered this instance as observers. |
| Methods inherited from interface com.tensegrity.gui.component.BasicComponent |
getHeight, getParentComponent, getWidth, repaint |
| Methods inherited from interface com.tensegrity.gui.Evaluable |
applyEvList, installEvList |
| Field Detail |
public static final int DRAG_TOLERANCE
| Method Detail |
public void addGraphPanelListener(GraphPanelListener listener)
GraphPanelListener to this instance.
listener - the listener instance to add.public void removeGraphPanelListener(GraphPanelListener listener)
GraphPanelListener from this instance.
listener - the listener instance to remove.
public void update(Observable o,
java.lang.Object arg)
update in interface Observero - observable that invoked this methodarg - additional arguments from the observable.public boolean isEditable()
public void enableMode(int modemask)
modemask - the mode(s) to enable.public void disableMode(int modemask)
modemask - the mode(s) to disable.public boolean isModified()
public void setModified()
public void setUnmodified()
public GraphApplication getGraphApplication()
getApplicationFrame() instead!
public ApplicationFrame getApplicationFrame()
public java.awt.Image getVisualGraphIcon(int width,
int height)
width - the desired image width.height - the desired image height.
public GraphController getGraphController()
public void setGraphController(GraphController graphcontroller,
VisualGraphView visualgraphview)
graphcontroller - the controller for the visualgraphvisualgraphview - the visualgraph to be displayed.public VisualGraphView getVisualGraph()
public void setVisualGraph(VisualGraphView visualgraphview)
visualgraphview - the visualgraph to display in the graphpanel
public void setZoom(double scaleX,
double scaleY,
boolean centerzoom)
scaleX - the zoom factor for the x axisscaleY - the zoom factor for the y axiscenterzoom - if true then zooming is done around the center
of the currently visible region or if a selection exists, then
the zooming is around the center of the current selection.
public void setZoom(double scaleX,
double scaleY)
scaleX - the zoom factor for the x axisscaleY - the zoom factor for the y axispublic void setZoomToFit()
public int getViewportWidth()
public int getViewportHeight()
public void drop(VisualGraphObject vgo,
VisualGraphObject[] vgos,
int x,
int y)
VisualGraphObject.
vgo - users dropped VisualGraphObject.vgos - The objects that have been droppedx - the x coordinate of the point where the drop occurred.y - the y coordinate of the point where the drop occurred.public void deleteSelection()
public void undo()
public void redo()
public void cut()
public void copy()
public void paste()
GraphPanel.
public void pasteStart()
GraphPanel.
public void pasteStop()
GraphPanel.
public void pasteBefore(VisualNode visualnode)
GraphPanel.
visualnode - the VisualNode to paste before.public void pasteBehind(VisualNode visualnode)
GraphPanel.
visualnode - the VisualNode to paste behind.public void setAttributableOnSetDelegate(AttributableOnSetDelegate delegate)
delegate - the delegate object to delegate determineAttributableOnSet calls to.public AttributableOnSetDelegate getAttributableOnSetDelegate()
null,if no
such object has been set.
public void setToolTipGenerator(ToolTipGenerator generator)
generator - The ToolTipGenerator to use.public ToolTipGenerator getToolTipGenerator()
ToolTipGenerator currently in use.public void addModifyListener(ModifiedVisualGraphListener listener)
Listener of the contained VisualGraphView.
listener - the ModifiedVisualGraphListener to add.public void removeModifyListener(ModifiedVisualGraphListener listener)
listener - the ModifiedVisualGraphListener to remove.public void postSelect()
public RendererConfiguration getRendererConfiguration()
RendererConfiguration for this
GraphPanel.
RendererConfigurationpublic void setAntialiasing(boolean antialiasing)
true,
otherwise anti-aliasing is disabled.
antialiasing - true for enabling antialiasing otherwise
false.public boolean isAntialiasing()
true is anti-aliasing is enabled,
otherwise false
true is anti-aliasing is enabled,
otherwise falsepublic void addDragListener(GraphPanelDragListener listener)
listener - The listener for the eventspublic void removeDragListener(GraphPanelDragListener listener)
listener - The listener for the events
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||