public class Contour extends G2Dint
Component.BaselineResizeBehavior| Modifier and Type | Field and Description |
|---|---|
boolean |
noContours
Boolean value if true Contours will not be calculated
|
borderBottom, borderLeft, borderRight, borderTop, clearAll, datarect, drawgrid, drawzero, frame, framecolor, gridcolor, lastText, loadingData, paintAll, square, zerocolorBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
Contour()
Instantaite the class
|
| Modifier and Type | Method and Description |
|---|---|
void |
attachContours()
Attach contours so that they will be plotted.
|
void |
deleteContours()
Delete all the Contours
|
void |
detachContours()
Detach contours so that they will not be plotted.
|
int[] |
getDim()
return the dimensions of the grid
|
double[] |
getGrid()
Return the grid
|
int |
getLabelPrecision()
Get the label precision.
|
int |
getLabelSignificance()
Get the number of significant figures for labels.
|
int |
getLabelStyle()
Get the label style, either TextLine.SCIENTIFIC or
TextLine.ALGEBRAIC.
|
double[] |
getLevels()
Return the contour levels.
|
double[] |
getRange()
Return the range of the grid
|
boolean |
keyDown(Event e,
int key)
Add extra events to the G2Dint event handler.
|
boolean |
loadGrid(URL file)
Load the grid to contour from a URL.
|
void |
paintFirst(Graphics g,
Rectangle r)
A hook into the Graph2D.paint method.
|
void |
paintLast(Graphics g,
Rectangle rect)
A hook into the Graph2D.paint method.
|
void |
setAutoLevels(boolean b)
If true contour levels are calculated automatically.
|
void |
setContourColor(Color c)
Set the contour's color.
|
void |
setDrawLabels(boolean b)
If true contour levels are not labeled.
|
void |
setGrid(double[] grid,
int nx,
int ny)
Set the grid to be contoured.
|
void |
setLabelColor(Color c)
Set the Color to be used with all the labels.
|
void |
setLabelFont(Font f)
Set the font to be used with All the labels
|
void |
setLabelledContourColor(Color c)
Set the labelled contour's color.
|
void |
setLabelLevels(int i)
Set the contour levels that are to have labels.
|
void |
setLabelPrecision(int p)
Set the label precision.
|
void |
setLabels(TextLine[] labels,
int nl)
Manually set the Contour labels.
|
void |
setLabelSignificance(int s)
Set the label significant figures.
|
void |
setLabelStyle(int s)
Set the label style, either TextLine.SCIENTIFIC or
TextLine.ALGEBRAIC.
|
void |
setLevels(double[] levels,
int nl)
Manually set the contour levels.
|
void |
setLimitsToGrid(boolean b)
If true the limits of the plot will be the grid limits.
|
void |
setLogLevels(boolean b)
If true contour levels are calculated on a log scale.
|
void |
setNLevels(int l)
Set the number of contour levels.
|
void |
setRange(double xmin,
double xmax,
double ymin,
double ymax)
Set the range of the grid
|
action, attachAxis, createXAxis, createYAxis, mouseDown, mouseDrag, mouseMove, mouseUp, updateattachDataSet, createAxis, detachAxes, detachAxis, detachDataSet, detachDataSets, finishedloading, getMarkers, getXmax, getXmin, getYmax, getYmin, loadDataSet, loadFile, loadmessage, paint, paintBeforeData, setDataBackground, setGraphBackground, setMarkers, startedloadingaddNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategyadd, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, 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, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseEnter, mouseExit, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validatepublic boolean noContours
public boolean loadGrid(URL file)
The expected format of the data
1st Number: nx
2nd Number: ny
nx*ny numbers following
Optionally
1st Number: nx
2nd Number: ny
3rd Number: xmin
4th Number: xmax
5th Number: ymin
6th Number: ymax
nx*ny numbers following
file - URL of the file to loadpublic void setRange(double xmin,
double xmax,
double ymin,
double ymax)
xmin - Minimum X valuexmax - Maximum X valueymin - Minimum Y valueymax - Maximum Y valuepublic double[] getRange()
public int[] getDim()
public double[] getGrid()
public void setLevels(double[] levels,
int nl)
levels - An array containing the contour levelsnl - The number of contour levels in the arrraypublic void setLabels(TextLine[] labels, int nl)
labels - An array containing the labels.nl - Number of labels in the Array.public void setLabelFont(Font f)
f - Fontpublic void setLabelColor(Color c)
c - Colorpublic void setGrid(double[] grid,
int nx,
int ny)
grid - Array of valuesnx - Number of columnsny - Number of rowspublic void deleteContours()
public void detachContours()
public void attachContours()
public void setContourColor(Color c)
c - Colorpublic void setLabelledContourColor(Color c)
c - Colorpublic double[] getLevels()
public void setLimitsToGrid(boolean b)
b - booleanpublic void setLabelLevels(int i)
if 0 no labels are drawn
if 1 every level gets a label
If 2 every 2nd level gets a label
etc.
public void setLogLevels(boolean b)
b - booleanpublic void setNLevels(int l)
public void setAutoLevels(boolean b)
b - booleanpublic void setDrawLabels(boolean b)
b - booleanpublic void setLabelStyle(int s)
s - Stylepublic int getLabelStyle()
public void setLabelPrecision(int p)
s - Precisionpublic int getLabelPrecision()
public void setLabelSignificance(int s)
s - number of significant figurespublic int getLabelSignificance()
public boolean keyDown(Event e, int key)
public void paintFirst(Graphics g, Rectangle r)
Graph2DpaintFirst in class Graph2DJas4pp 1.5 © Java Analysis Studio for Particle Physics