|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.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.
Inner classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
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. |
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, getAccessibleContext |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, 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, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, 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()
preferredSize
in class java.awt.Component
public void paint(java.awt.Graphics graphics)
paint
in class java.awt.Canvas
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)
mouseDown
in class java.awt.Component
public boolean mouseDrag(java.awt.Event e, int x_in, int y_in)
mouseDrag
in class java.awt.Component
public boolean mouseMove(java.awt.Event event, int x_in, int y_in)
mouseMove
in class java.awt.Component
public boolean mouseUp(java.awt.Event e, int x_in, int y_in)
mouseUp
in class java.awt.Component
public boolean mouseExit(java.awt.Event event, int x_in, int y_in)
mouseExit
in class java.awt.Component
public DDimension contentsSize()
OffsetCanvas
contentsSize
in class OffsetCanvas
public void setOffsets(double xoffset, double yoffset, boolean redraw)
OffsetCanvas
setOffsets
in class OffsetCanvas
EDU.auburn.VGJ.gui.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)
handleEvent
in class java.awt.Component
public boolean keyDown(java.awt.Event e, int key)
keyDown
in class java.awt.Component
public void removeNotify()
removeNotify
in class java.awt.Component
public java.awt.Font getFont()
getFont
in class java.awt.Component
public void setFont(java.awt.Font font)
setFont
in class java.awt.Component
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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |