|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
visad.Contour2D
public class Contour2D
Contour2D is a class equipped with a 2-D contouring function.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.applet.Applet |
---|
java.applet.Applet.AccessibleApplet |
Nested classes/interfaces inherited from class java.awt.Panel |
---|
java.awt.Panel.AccessibleAWTPanel |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected int |
cols
|
protected Contour2D |
con
|
protected int[] |
num1
|
protected int[] |
num2
|
protected int[] |
num3
|
protected int[] |
num4
|
protected int |
rows
|
protected int |
scale
|
protected boolean |
showgrid
|
protected float[][] |
vx1
|
protected float[][] |
vx2
|
protected float[][] |
vx3
|
protected float[][] |
vx4
|
protected float[][] |
vy1
|
protected float[][] |
vy2
|
protected float[][] |
vy3
|
protected float[][] |
vy4
|
protected int |
whichlabels
|
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 | |
---|---|
Contour2D()
|
Method Summary | |
---|---|
static void |
contour(float[] g,
int nr,
int nc,
float[] values,
float lowlimit,
float highlimit,
float base,
boolean dash,
float[][] vx1,
float[][] vy1,
int maxv1,
int[] numv1,
float[][] vx2,
float[][] vy2,
int maxv2,
int[] numv2,
float[][] vx3,
float[][] vy3,
int maxv3,
int[] numv3,
float[][] vx4,
float[][] vy4,
int maxv4,
int[] numv4,
byte[][] auxValues,
byte[][] auxLevels1,
byte[][] auxLevels2,
byte[][] auxLevels3,
boolean[] swap,
boolean fill,
float[][] tri,
byte[][] tri_color,
float[][][] grd_normals,
float[][] tri_normals,
byte[][] interval_colors)
Compute contour lines for a 2-D array. |
static void |
contour(float[] g,
int nr,
int nc,
float interval,
float lowlimit,
float highlimit,
float base,
float[][] vx1,
float[][] vy1,
int maxv1,
int[] numv1,
float[][] vx2,
float[][] vy2,
int maxv2,
int[] numv2,
float[][] vx3,
float[][] vy3,
int maxv3,
int[] numv3,
float[][] vx4,
float[][] vy4,
int maxv4,
int[] numv4,
byte[][] auxValues,
byte[][] auxLevels1,
byte[][] auxLevels2,
byte[][] auxLevels3,
boolean[] swap,
boolean fill,
float[][] tri,
byte[][] tri_color,
float[][][] grd_normals,
float[][] tri_normals,
byte[][] interval_colors)
Compute contour lines for a 2-D array. |
static void |
fillGridBox(float[] corners,
int numc,
float[] vx,
float[] vy,
float xx,
float yy,
float xd,
float yd,
int nc,
int nr,
short ctrLow,
float[][] tri,
int[] t_idx,
byte[][] tri_color,
int numv,
byte[] o_flags,
float[] values,
byte[][] color_bin,
float[][][] grd_normals,
int[] n_idx,
float[][] tri_normals_a)
|
static void |
fillGridBox(float[] g,
short[][] n_lines,
float[] vx,
float[] vy,
float xd,
float xdd,
float yd,
float ydd,
int nr,
int nrm,
int nc,
int ncm,
short[][] ctrLow,
float[][] tri,
byte[][] tri_color,
byte[][][] o_flags,
float[] values,
byte[][] color_bin,
float[][][] grd_normals,
float[][] tri_normals)
|
void |
init()
|
static float[] |
intervalToLevels(float interval,
float low,
float high,
float ba,
boolean[] dash)
Returns an array of contour values and an indication on whether to use dashed lines below the base value. |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
paint(java.awt.Graphics gr)
|
Methods inherited from class java.applet.Applet |
---|
destroy, getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop |
Methods inherited from class java.awt.Panel |
---|
addNotify |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, 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, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Contour2D con
protected int whichlabels
protected boolean showgrid
protected int rows
protected int cols
protected int scale
protected int[] num1
protected int[] num2
protected int[] num3
protected int[] num4
protected float[][] vx1
protected float[][] vy1
protected float[][] vx2
protected float[][] vy2
protected float[][] vx3
protected float[][] vy3
protected float[][] vx4
protected float[][] vy4
Constructor Detail |
---|
public Contour2D()
Method Detail |
---|
public static void contour(float[] g, int nr, int nc, float interval, float lowlimit, float highlimit, float base, float[][] vx1, float[][] vy1, int maxv1, int[] numv1, float[][] vx2, float[][] vy2, int maxv2, int[] numv2, float[][] vx3, float[][] vy3, int maxv3, int[] numv3, float[][] vx4, float[][] vy4, int maxv4, int[] numv4, byte[][] auxValues, byte[][] auxLevels1, byte[][] auxLevels2, byte[][] auxLevels3, boolean[] swap, boolean fill, float[][] tri, byte[][] tri_color, float[][][] grd_normals, float[][] tri_normals, byte[][] interval_colors) throws VisADException
g
- the 2-D array to contour.nr
- size of 2-D array in rowsnc
- size of 2-D array in columns.interval
- contour intervallowlimit
- the lower limit on values to contour.highlimit
- the upper limit on values to contour.base
- base value to start contouring at.vx1
- array to put contour line vertices (x value)vy1
- array to put contour line vertices (y value)maxv1
- size of vx1, vy1 arraysnumv1
- pointer to int to return number of vertices in vx1,vy1vx2
- array to put 'hidden' contour line vertices (x value)vy2
- array to put 'hidden' contour line vertices (y value)maxv2
- size of vx2, vy2 arraysnumv2
- pointer to int to return number of vertices in vx2,vy2vx3
- array to put contour label vertices (x value)vy3
- array to put contour label vertices (y value)maxv3
- size of vx3, vy3 arraysnumv3
- pointer to int to return number of vertices in vx3,vy3vx4
- array to put contour label vertices, inverted (x value)vy4
- array to put contour label vertices, inverted (y value)
maxv4
- size of vx4, vy4 arraysnumv4
- pointer to int to return number of vertices in vx4,vy4
VisADException
public static float[] intervalToLevels(float interval, float low, float high, float ba, boolean[] dash) throws VisADException
interval
- The contouring interval. Must be non-zero.
If the interval is negative, then contour lines
less than the base will be drawn as dashed
lines. Must not be NaN.low
- The minimum contour value. The returned array
will not contain a value below this. Must not
be NaN.high
- The maximum contour value. The returned array
will not contain a value above this. Must not
be NaN.ba
- The base contour value. The returned values
will be integer multiples of the interval
away from this this value. Must not be NaN.dash
- Whether or not contour lines less than the base
should be drawn as dashed lines. This is a
computed and returned value.
VisADException
- The contour interval is zero or too small.public static void contour(float[] g, int nr, int nc, float[] values, float lowlimit, float highlimit, float base, boolean dash, float[][] vx1, float[][] vy1, int maxv1, int[] numv1, float[][] vx2, float[][] vy2, int maxv2, int[] numv2, float[][] vx3, float[][] vy3, int maxv3, int[] numv3, float[][] vx4, float[][] vy4, int maxv4, int[] numv4, byte[][] auxValues, byte[][] auxLevels1, byte[][] auxLevels2, byte[][] auxLevels3, boolean[] swap, boolean fill, float[][] tri, byte[][] tri_color, float[][][] grd_normals, float[][] tri_normals, byte[][] interval_colors) throws VisADException
g
- the 2-D array to contour.nr
- size of 2-D array in rowsnc
- size of 2-D array in columns.values
- the values to be plottedlowlimit
- the lower limit on values to contour.highlimit
- the upper limit on values to contour.base
- base value to start contouring at.dash
- boolean to dash contours below base or notvx1
- array to put contour line vertices (x value)vy1
- array to put contour line vertices (y value)maxv1
- size of vx1, vy1 arraysnumv1
- pointer to int to return number of vertices in vx1,vy1vx2
- array to put 'hidden' contour line vertices (x value)vy2
- array to put 'hidden' contour line vertices (y value)maxv2
- size of vx2, vy2 arraysnumv2
- pointer to int to return number of vertices in vx2,vy2vx3
- array to put contour label vertices (x value)vy3
- array to put contour label vertices (y value)maxv3
- size of vx3, vy3 arraysnumv3
- pointer to int to return number of vertices in vx3,vy3vx4
- array to put contour label vertices, inverted (x value)vy4
- array to put contour label vertices, inverted (y value)
maxv4
- size of vx4, vy4 arraysnumv4
- pointer to int to return number of vertices in vx4,vy4
VisADException
public static void fillGridBox(float[] g, short[][] n_lines, float[] vx, float[] vy, float xd, float xdd, float yd, float ydd, int nr, int nrm, int nc, int ncm, short[][] ctrLow, float[][] tri, byte[][] tri_color, byte[][][] o_flags, float[] values, byte[][] color_bin, float[][][] grd_normals, float[][] tri_normals)
public static void fillGridBox(float[] corners, int numc, float[] vx, float[] vy, float xx, float yy, float xd, float yd, int nc, int nr, short ctrLow, float[][] tri, int[] t_idx, byte[][] tri_color, int numv, byte[] o_flags, float[] values, byte[][] color_bin, float[][][] grd_normals, int[] n_idx, float[][] tri_normals_a)
public void init()
init
in class java.applet.Applet
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void paint(java.awt.Graphics gr)
paint
in class java.awt.Container
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |