public class WorldCanvas extends BaseCanvas implements ModeSettable
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
private boolean |
antialias |
static java.lang.String |
BOX |
private BoxSelectionHandler |
boxSelectionHandler |
private ClickZoomHandler |
clickZoomHandler |
private MouseHandler[] |
handlers |
protected Mouse |
mouse |
static java.lang.String |
MULTI |
protected Painter |
painter |
protected PaintInstructor |
paintInstructor |
static java.lang.String |
PAN |
private PanHandler |
panHandler |
(package private) Box |
reframeBox |
static java.lang.String |
ROLL |
private RollHandler |
rollHandler |
(package private) static long |
serialVersionUID |
private boolean |
tooltips |
static java.lang.String |
TURN |
private TurntableHandler |
turntableHandler |
private TurnZoomHandler |
turnZoomHandler |
private boolean |
userAntialias |
protected WorldTransform |
wt |
static java.lang.String |
ZOOM |
static java.lang.String |
ZOOMIN |
static java.lang.String |
ZOOMOUT |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
WorldCanvas(int w,
int h) |
WorldCanvas(int w,
int h,
boolean interactive) |
Modifier and Type | Method and Description |
---|---|
void |
addHandler(MouseHandler mh) |
void |
addRangeListener(RangeListener rl) |
void |
addWorldHandlers() |
void |
applyAAPreference(java.awt.Graphics2D g) |
(package private) void |
boxSelected(int x0,
int y0,
int x1,
int y1) |
(package private) void |
dragRollRotate(int px,
int py) |
(package private) void |
dragZoom(double fx,
double fy,
int xc,
int yc) |
(package private) void |
dragZRotate(int px,
int py) |
void |
ensureCovers(double[] xr,
double[] yr) |
void |
fixRanges() |
protected void |
frameToBox(Box box) |
double[] |
get2Center() |
double[] |
get3Center() |
double[] |
getFourMatrix() |
int[] |
getIntPosition(Position pos) |
Painter |
getPainter() |
double[][] |
getProjectionMatrix() |
(package private) WorldTransform |
getWorldTransform() |
double[] |
getXRange() |
double[] |
getYRange() |
(package private) void |
initializeRotation(double x,
double y,
double z) |
(package private) void |
initializeRotation(int px,
int py) |
(package private) void |
initializeZoom(int xc,
int yc) |
boolean |
isAntialiasing() |
void |
paint2D(java.awt.Graphics2D g) |
void |
paintComponent(java.awt.Graphics g0) |
(package private) void |
permanentPan(int xfrom,
int yfrom,
int xto,
int yto) |
void |
postPaint(java.awt.Graphics2D g) |
void |
prePaint(java.awt.Graphics2D g) |
void |
prependHandler(MouseHandler mhandler) |
void |
reframe() |
void |
reluctantReframe() |
void |
restoreAA() |
void |
setAntialias(boolean b) |
void |
setClickListener(ClickListener cl) |
void |
setColorRange(double cmin,
double cmax) |
void |
setColorTable(java.awt.Color[] ac) |
void |
setFixedAspectRatio(double ar) |
void |
setFourMatrix(double[] fm) |
void |
setMode(int imode) |
void |
setMode(java.lang.String dom,
boolean b) |
void |
setMode(java.lang.String dom,
java.lang.String mod) |
void |
setMouseMode(java.lang.String s) |
void |
setPaintInstructor(PaintInstructor pi) |
void |
setRollCenter(double x,
double y,
double z) |
void |
setRotationListener(RotationListener rl) |
void |
setXRange(double[] lh) |
void |
setXRange(double low,
double high) |
void |
setYRange(double[] lh) |
void |
setYRange(double low,
double high) |
boolean |
showTooltips() |
void |
syncSize() |
(package private) void |
trialPan(int xfrom,
int yfrom,
int xto,
int yto) |
void |
turn(double d) |
void |
viewAction(java.lang.String s) |
(package private) void |
zoom(double xfac,
double yfac,
int xc,
int yc) |
(package private) void |
zoom(double fac,
int xc,
int yc) |
getDataBackground, getNormalForeground, requestRepaint, setBg, setCursor, setDataBackground, setPreferredSize, simpleStroke
setTooltip
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, 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, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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, setVisible, unregisterKeyboardAction, update
add, 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, validateTree
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, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
static final long serialVersionUID
public static final java.lang.String PAN
public static final java.lang.String ZOOM
public static final java.lang.String BOX
public static final java.lang.String ROLL
public static final java.lang.String TURN
public static final java.lang.String MULTI
public static final java.lang.String ZOOMIN
public static final java.lang.String ZOOMOUT
protected WorldTransform wt
protected Painter painter
protected PaintInstructor paintInstructor
protected Mouse mouse
private BoxSelectionHandler boxSelectionHandler
private PanHandler panHandler
private TurnZoomHandler turnZoomHandler
private ClickZoomHandler clickZoomHandler
private RollHandler rollHandler
private TurntableHandler turntableHandler
private MouseHandler[] handlers
private boolean antialias
private boolean tooltips
Box reframeBox
private boolean userAntialias
public WorldCanvas(int w, int h)
public WorldCanvas(int w, int h, boolean interactive)
public boolean isAntialiasing()
public void setAntialias(boolean b)
public void restoreAA()
public void setMode(java.lang.String dom, java.lang.String mod)
setMode
in interface ModeSettable
public void setMode(java.lang.String dom, boolean b)
setMode
in interface ModeSettable
public void syncSize()
public void reluctantReframe()
public void reframe()
protected void frameToBox(Box box)
public boolean showTooltips()
public void setMode(int imode)
public void addRangeListener(RangeListener rl)
public Painter getPainter()
WorldTransform getWorldTransform()
public void prependHandler(MouseHandler mhandler)
public void setClickListener(ClickListener cl)
public void setRotationListener(RotationListener rl)
public void addWorldHandlers()
public void setMouseMode(java.lang.String s)
public void setXRange(double[] lh)
public void setYRange(double[] lh)
public void ensureCovers(double[] xr, double[] yr)
public void setXRange(double low, double high)
public void setYRange(double low, double high)
public void setFixedAspectRatio(double ar)
public double[] getXRange()
public double[] getYRange()
public void viewAction(java.lang.String s)
public void addHandler(MouseHandler mh)
public void fixRanges()
public void setPaintInstructor(PaintInstructor pi)
public void paintComponent(java.awt.Graphics g0)
paintComponent
in class BaseCanvas
public void prePaint(java.awt.Graphics2D g)
public void postPaint(java.awt.Graphics2D g)
public void applyAAPreference(java.awt.Graphics2D g)
public void paint2D(java.awt.Graphics2D g)
paint2D
in class BaseCanvas
void boxSelected(int x0, int y0, int x1, int y1)
void initializeZoom(int xc, int yc)
void dragZoom(double fx, double fy, int xc, int yc)
void zoom(double fac, int xc, int yc)
void zoom(double xfac, double yfac, int xc, int yc)
void trialPan(int xfrom, int yfrom, int xto, int yto)
void permanentPan(int xfrom, int yfrom, int xto, int yto)
void dragRollRotate(int px, int py)
void dragZRotate(int px, int py)
public void turn(double d)
void initializeRotation(int px, int py)
void initializeRotation(double x, double y, double z)
public void setColorRange(double cmin, double cmax)
public void setColorTable(java.awt.Color[] ac)
public int[] getIntPosition(Position pos)
public double[][] getProjectionMatrix()
public void setRollCenter(double x, double y, double z)
public double[] get2Center()
public double[] get3Center()
public double[] getFourMatrix()
public void setFourMatrix(double[] fm)
Copyright © 2013. All Rights Reserved.