|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
graph.Graph2D
graph.G2Dint
This class is an extension of Graph2D class. It adds interactive selection of the plotting range and can display the mouse position in user coordinates.
Note: To hide Any pop-window press the key h in the window. This will hide the window at any time. Depending on your windowing system the mouse button might have to be pressed in the popup window to ensure it has the keyboard focus.
| 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 | |
private Gin |
cpgin
Ths popup window for the cursor position command |
private Gin |
dpgin
Ths popup window for the data point command |
protected boolean |
drag
Set to true when a rectangle is being dragged out by the mouse |
private Range |
range
The popup window to manually set the range |
protected boolean |
userlimits
User limits. |
private int |
x0
Button Down position |
private int |
x1
Button Drag position |
private int |
x1old
|
protected Axis |
xaxis
Attached X Axis which must be registered with this class. |
private int |
y0
Button Down position |
private int |
y1
Button Drag position |
private int |
y1old
|
protected Axis |
yaxis
Attached Y Axis which must be registered with this class. |
| Fields inherited from class graph.Graph2D |
axis, borderBottom, borderLeft, borderRight, borderTop, clearAll, DataBackground, datarect, dataset, drawgrid, drawzero, frame, framecolor, gridcolor, lastText, load_thread, loadingData, markers, paintAll, square, zerocolor |
| Fields inherited from class java.awt.Canvas |
|
| 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 | |
G2Dint()
|
|
| Method Summary | |
boolean |
action(java.awt.Event e,
java.lang.Object a)
Handle the Action Events. |
void |
attachAxis(Axis a)
Attach axis to be used for the drag scaling. |
Axis |
createXAxis()
Create Xaxis to be used for the drag scaling |
Axis |
createYAxis()
Create Yaxis to be used for the drag scaling |
protected double[] |
getClosestPoint(int ix,
int iy)
Find the closest data point to the cursor |
boolean |
keyDown(java.awt.Event e,
int key)
Handle the Key Down events. |
boolean |
mouseDown(java.awt.Event e,
int x,
int y)
Handle the Mouse Down events |
boolean |
mouseDrag(java.awt.Event e,
int x,
int y)
Handle the Mouse Drag events |
boolean |
mouseMove(java.awt.Event e,
int x,
int y)
Handle the Mouse Mouve events |
boolean |
mouseUp(java.awt.Event e,
int x,
int y)
Handle the Mouse Up events |
void |
update(java.awt.Graphics g)
New update method incorporating mouse dragging. |
| Methods inherited from class graph.Graph2D |
attachDataSet, createAxis, detachAxes, detachAxis, detachDataSet, detachDataSets, drawAxis, drawFrame, finishedloading, ForceSquare, getDataRectangle, getMarkers, getXmax, getXmin, getYmax, getYmin, loadDataSet, loadFile, loadmessage, paint, paintBeforeData, paintFirst, paintLast, setDataBackground, setGraphBackground, setMarkers, startedloading |
| Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
| Methods inherited from class java.awt.Component |
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, getFont, 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, handleEvent, 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, mouseExit, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, 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 |
protected boolean drag
protected boolean userlimits
private Gin cpgin
private Gin dpgin
private Range range
private int x0
private int y0
private int x1
private int y1
private int x1old
private int y1old
protected Axis xaxis
protected Axis yaxis
| Constructor Detail |
public G2Dint()
| Method Detail |
public Axis createXAxis()
public Axis createYAxis()
public void attachAxis(Axis a)
attachAxis in class Graph2Da - Axis to attachAxispublic void update(java.awt.Graphics g)
update in class Graph2D
public boolean keyDown(java.awt.Event e,
int key)
keyDown in class Graph2D
public boolean mouseDown(java.awt.Event e,
int x,
int y)
public boolean mouseUp(java.awt.Event e,
int x,
int y)
public boolean mouseDrag(java.awt.Event e,
int x,
int y)
public boolean mouseMove(java.awt.Event e,
int x,
int y)
public boolean action(java.awt.Event e,
java.lang.Object a)
protected double[] getClosestPoint(int ix,
int iy)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||