InteractiveMouseHandler, RenderablePlottingPanel, VideoPanelpublic class InteractivePanel extends DrawingPanel implements InteractiveMouseHandler
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
InteractivePanel.IADMouseController |
The inner class that will handle all mouse related events.
|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyjava.awt.Container.AccessibleAWTContainerDrawingPanel.ZoomBox| Modifier and Type | Field | Description |
|---|---|---|
protected boolean |
containsInteractive |
|
protected InteractiveMouseHandler |
interactive |
|
static int |
MOUSE_CLICKED |
|
static int |
MOUSE_DRAGGED |
|
static int |
MOUSE_ENTERED |
|
static int |
MOUSE_EXITED |
|
static int |
MOUSE_MOVED |
|
static int |
MOUSE_PRESSED |
|
static int |
MOUSE_RELEASED |
|
protected int |
mouseAction |
|
protected java.awt.event.MouseEvent |
mouseEvent |
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTadjustableGutter, antialiasShapeOn, antialiasTextOn, autoscaleItem, autoscaleMargin, autoscaleX, autoscaleXMax, autoscaleXMin, autoscaleY, autoscaleYMax, autoscaleYMin, bgColor, blMessageBox, BOTTOM_LEFT, BOTTOM_RIGHT, bottomGutter, bottomGutterPreferred, brMessageBox, clipAtGutter, coordinateStrBuilder, currentTime, customInspector, decimalFormat, dimensionSetter, drawableList, dxmax, dxmin, dymax, dymin, enableZoom, fixedPixelPerUnit, fixedScale, glassPanel, glassPanelLayout, guiChangeListener, height, imageRatio, leftGutter, leftGutterPreferred, logScaleX, logScaleY, mouseController, offscreenImage, optionController, pixelMatrix, pixelTransform, popupmenu, propertiesItem, RECORD_PAINT_TIMES, refreshDelay, refreshTimer, rightGutter, rightGutterPreferred, scaleItem, scientificFormat, showCoordinates, snapshotItem, squareAspect, tlMessageBox, TOP_LEFT, TOP_RIGHT, topGutter, topGutterPreferred, trMessageBox, vidCap, viewRect, width, workingImage, xceil, xfloor, xLeftMarginPercentage, xmax, xmaxPreferred, xmin, xminPreferred, xPixPerUnit, xRightMarginPercentage, yBottomMarginPercentage, yceil, yfloor, ymax, ymaxPreferred, ymin, yminPreferred, yPixPerUnit, yTopMarginPercentage, zoomBox, zoomCount, zoomDelay, zoomInItem, zoomOutItem, zoomTimer| Constructor | Description |
|---|---|
InteractivePanel() |
Constructs an InteractivePanel with an internal handler.
|
InteractivePanel(InteractiveMouseHandler in) |
Constructs an InteractivePanel with the given handler.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addDrawable(Drawable drawable) |
Adds a drawable object to the drawable list.
|
void |
clear() |
Removes all drawable objects from the drawable list.
|
Interactive |
getCurrentDraggable() |
Get the Interactive object that is currently being dragged.
|
Interactive |
getInteractive() |
Gets the interactive object that was accessed by the last mouse event.
|
int |
getMouseAction() |
Gets the last mouse action.
|
int |
getMouseButton() |
Gets the mouse button of the last mouse event.
|
int |
getMouseClickCount() |
Gets the click count of the last mouse event.
|
int |
getMouseIntX() |
Gets the x pixel coordinate of the last mouse event.
|
int |
getMouseIntY() |
Gets the y pixel coordinate of the last mouse event.
|
double |
getMouseX() |
Gets the x world coordinate of the last mouse event.
|
double |
getMouseY() |
Gets the y world coordinate of the last moust event
|
void |
handleMouseAction(InteractivePanel panel,
java.awt.event.MouseEvent evt) |
Handles mouse actions by dragging the current interactive drawable object.
|
void |
saveMouseEvent(int type,
java.awt.event.MouseEvent evt) |
Saves the last mouse event.
|
protected void |
scaleX(java.util.ArrayList<Drawable> tempList) |
Sets the x axis scale based on the max and min values of all measurable objects.
|
protected void |
scaleY(java.util.ArrayList<Drawable> tempList) |
Sets the y axis scale based on the max and min values of all measurable objects.
|
void |
setInteractiveMouseHandler(InteractiveMouseHandler handler) |
Sets the interactive mouse handler.
|
void |
setShowCoordinates(boolean show) |
Shows the coordinates in the text box in the lower left hand corner.
|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeactionPerformed, addDrawableAtIndex, addDrawables, addOptionController, buildPopupmenu, checkWorkingImage, computeGutters, enableInspector, findViewRect, getAspectRatio, getBottomGutter, getCoordinateStringBuilder, getDimensionSetter, getDrawables, getDrawables, getGlassPanel, getGutters, getHeight, getImageRatio, getLeftGutter, getLoader, getMaxPixPerUnit, getMeasure, getObjectOfClass, getPixelMatrix, getPixelTransform, getPopupMenu, getPreferredXMax, getPreferredXMin, getPreferredYMax, getPreferredYMin, getRightGutter, getScale, getTopGutter, getVideoTool, getViewRect, getWidth, getXMax, getXMin, getXPixPerUnit, getYMax, getYMin, getYPixPerUnit, getZoomBox, hasInspector, hideInspector, invalidateImage, isAdjustableGutter, isAntialiasShapeOn, isAntialiasTextOn, isAutoscaleX, isAutoscaleXMax, isAutoscaleXMin, isAutoscaleY, isAutoscaleYMax, isAutoscaleYMin, isBuffered, isClipAtGutter, isFixedScale, isIconified, isLogScaleX, isLogScaleY, isPointInside, isSquareAspect, isValidImage, isZoom, isZoomEvent, limitAutoscaleX, limitAutoscaleY, measure, paint, paintComponent, paintDrawableList, paintEverything, paintFirst, paintLast, pixToX, pixToY, project, recomputeTransform, refreshDecimalSeparators, refreshGUI, removeDrawable, removeDrawables, removeObjectsOfClass, removeOptionController, render, render, replaceDrawable, resetGutters, scale, scale, scaleX, scaleY, setAdjustableGutter, setAntialiasShapeOn, setAntialiasTextOn, setAutoscaleMargin, setAutoscaleX, setAutoscaleY, setBounds, setBounds, setBuffered, setClipAtGutter, setCoordinateStringBuilder, setCustomInspector, setFixedScale, setFontFactor, setFontLevel, setGutters, setGutters, setIgnoreRepaint, setMessage, setMessage, setMouseCursor, setPixelScale, setPixelsPerUnit, setPopupMenu, setPreferredGutters, setPreferredMinMax, setPreferredMinMax, setPreferredMinMaxX, setPreferredMinMaxY, setSquareAspect, setVideoTool, setVisible, setXLeftMarginPercentage, setXMarginPercentage, setXMarginPercentage, setXRightMarginPercentage, setYBottomMarginPercentage, setYMarginPercentage, setYMarginPercentage, setYTopMarginPercentage, setZoom, showInspector, snapshot, validateImage, xToGraphics, xToPix, yToGraphics, yToPix, zoomIn, zoomOutaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updatepublic static final int MOUSE_PRESSED
public static final int MOUSE_RELEASED
public static final int MOUSE_DRAGGED
public static final int MOUSE_CLICKED
public static final int MOUSE_ENTERED
public static final int MOUSE_EXITED
public static final int MOUSE_MOVED
protected boolean containsInteractive
protected int mouseAction
protected java.awt.event.MouseEvent mouseEvent
protected InteractiveMouseHandler interactive
public InteractivePanel(InteractiveMouseHandler in)
in - InteractiveMouseHandlerpublic InteractivePanel()
public void addDrawable(Drawable drawable)
addDrawable in class DrawingPaneldrawable - public void clear()
clear in class DrawingPanelprotected void scaleX(java.util.ArrayList<Drawable> tempList)
scaleX in class DrawingPanelprotected void scaleY(java.util.ArrayList<Drawable> tempList)
scaleY in class DrawingPanelpublic void setInteractiveMouseHandler(InteractiveMouseHandler handler)
handler - the mouse handlerpublic void handleMouseAction(InteractivePanel panel, java.awt.event.MouseEvent evt)
handleMouseAction in interface InteractiveMouseHandlerpanel - evt - public Interactive getCurrentDraggable()
public Interactive getInteractive()
public void setShowCoordinates(boolean show)
setShowCoordinates in class DrawingPanelshow - public int getMouseButton()
public int getMouseClickCount()
public int getMouseAction()
public int getMouseIntX()
public int getMouseIntY()
public double getMouseX()
public double getMouseY()
public void saveMouseEvent(int type,
java.awt.event.MouseEvent evt)
type - evt -