|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Canvas
EDU.auburn.VGJ.gui.OffsetCanvas
EDU.auburn.VGJ.gui.GraphCanvas
A window class for editing and displaying Graphs.
Here is the source.
Nested Class Summary |
Nested classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
static int |
CREATE_EDGES
|
static int |
CREATE_NODES
|
double |
hSpacing
|
static int |
MOUSEMOVE
|
static int |
SELECT_BOTH
|
static int |
SELECT_EDGES
|
static int |
SELECT_NODES
|
static int |
UPDATE
|
double |
vSpacing
|
Fields inherited from class EDU.auburn.VGJ.gui.OffsetCanvas |
LABEL, RESIZE |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
GraphCanvas(Graph graph_in,
java.awt.Frame frame_in)
|
Method Summary | |
void |
center()
Update the display and boundaries, and center the graph in the display window. |
DDimension |
contentsSize()
Return the size of the contents. |
void |
deleteSelected(boolean group_warning)
|
void |
drawObjects_(boolean selected,
java.awt.Graphics graphics,
int which_gr)
|
void |
drawRotatedText(java.lang.String string,
double theta,
int cx,
int cy,
java.awt.Graphics graphics_in,
int which_gr)
|
DPoint3 |
getCenter()
|
void |
getDrawBounds_(DPoint width,
DPoint height)
|
java.awt.Font |
getFont()
|
java.awt.Frame |
getFrame()
Get an application Frame from which to pop up windows. |
Graph |
getGraph()
|
double |
getHSpacing()
|
DPoint |
getOffset()
|
Node |
getSelectedNode()
Get the index of the selected node. -1 is returned if no node is selected. |
double |
getVSpacing()
|
void |
groupControl(int key)
|
boolean |
handleEvent(java.awt.Event e)
|
boolean |
keyDown(java.awt.Event e,
int key)
|
boolean |
mouseDown(java.awt.Event e,
int x_in,
int y_in)
|
boolean |
mouseDrag(java.awt.Event e,
int x_in,
int y_in)
|
boolean |
mouseExit(java.awt.Event event,
int x_in,
int y_in)
|
boolean |
mouseMove(java.awt.Event event,
int x_in,
int y_in)
|
boolean |
mouseUp(java.awt.Event e,
int x_in,
int y_in)
|
void |
paint(java.awt.Graphics graphics)
|
void |
paintOver()
|
java.awt.Dimension |
preferredSize()
|
void |
removeEdgeBends()
|
void |
removeGroups()
|
void |
removeNotify()
|
void |
scale(double scaleval)
Set the scale value for display, and update the display. scaleval is interpreted as follows: screen_distance = physical_distance * scaleval. |
void |
scaleBounds(boolean sb)
|
void |
selectAll()
|
void |
selectNode(int node_index)
|
void |
setDirected(boolean directed)
|
void |
setEdgeProperties(boolean always_default)
|
void |
setFont(java.awt.Font font)
|
void |
setMouseMode(int mode)
|
void |
setNodeProperties(boolean always_default)
|
void |
setOffsets(double xoffset,
double yoffset,
boolean redraw)
Adjust the offset of the contents of the canvas. |
void |
setQuality(int quality)
|
void |
setScale(double new_scale)
|
void |
setViewAngles(double theta,
double phi)
|
void |
setWireframe(boolean wireframe)
|
java.lang.String |
toPS(double width,
double height,
double pagewidth,
double pageheight,
double fontsize,
double margin,
double overlap,
boolean landscape)
|
void |
unselectItems()
|
void |
update(boolean adjust_bounds)
Update the display. |
DRect |
windowRect()
Get the position and dimensions of the display window. |
Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseEnter, move, nextFocus, paintAll, paramString, postEvent, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int MOUSEMOVE
public static final int CREATE_NODES
public static final int CREATE_EDGES
public static final int SELECT_NODES
public static final int SELECT_EDGES
public static final int SELECT_BOTH
public static final int UPDATE
public double hSpacing
public double vSpacing
Constructor Detail |
public GraphCanvas(Graph graph_in, java.awt.Frame frame_in)
Method Detail |
public java.awt.Dimension preferredSize()
public void paint(java.awt.Graphics graphics)
public void paintOver()
public void drawObjects_(boolean selected, java.awt.Graphics graphics, int which_gr)
public boolean mouseDown(java.awt.Event e, int x_in, int y_in)
public boolean mouseDrag(java.awt.Event e, int x_in, int y_in)
public boolean mouseMove(java.awt.Event event, int x_in, int y_in)
public boolean mouseUp(java.awt.Event e, int x_in, int y_in)
public boolean mouseExit(java.awt.Event event, int x_in, int y_in)
public DDimension contentsSize()
OffsetCanvas
contentsSize
in class OffsetCanvas
public void setOffsets(double xoffset, double yoffset, boolean redraw)
OffsetCanvas
setOffsets
in class OffsetCanvas
xoffset
- horizontal offsetyoffset
- vertical offsetpublic DPoint getOffset()
getOffset
in class OffsetCanvas
public void setScale(double new_scale)
public void setViewAngles(double theta, double phi)
public DPoint3 getCenter()
public void update(boolean adjust_bounds)
GraphUpdate
update
in interface GraphUpdate
public void scale(double scaleval)
GraphUpdate
scale
in interface GraphUpdate
public void center()
GraphUpdate
center
in interface GraphUpdate
public java.awt.Frame getFrame()
GraphUpdate
getFrame
in interface GraphUpdate
public Graph getGraph()
public void deleteSelected(boolean group_warning)
public Node getSelectedNode()
GraphUpdate
getSelectedNode
in interface GraphUpdate
public void unselectItems()
public void scaleBounds(boolean sb)
public void setMouseMode(int mode)
public DRect windowRect()
GraphUpdate
windowRect
in interface GraphUpdate
public void setDirected(boolean directed)
public java.lang.String toPS(double width, double height, double pagewidth, double pageheight, double fontsize, double margin, double overlap, boolean landscape)
public void getDrawBounds_(DPoint width, DPoint height)
public void setNodeProperties(boolean always_default)
public void setEdgeProperties(boolean always_default)
public void selectAll()
public double getHSpacing()
getHSpacing
in interface GraphUpdate
public double getVSpacing()
getVSpacing
in interface GraphUpdate
public boolean handleEvent(java.awt.Event e)
public boolean keyDown(java.awt.Event e, int key)
public void removeNotify()
public java.awt.Font getFont()
getFont
in interface java.awt.MenuContainer
public void setFont(java.awt.Font font)
public void setWireframe(boolean wireframe)
public void setQuality(int quality)
public void removeEdgeBends()
public void removeGroups()
public void groupControl(int key)
public void drawRotatedText(java.lang.String string, double theta, int cx, int cy, java.awt.Graphics graphics_in, int which_gr)
public void selectNode(int node_index)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |