sdt.gui
Class PlotBox
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--sdt.gui.PlotBox
- Direct Known Subclasses:
- Plot
- public class PlotBox
- extends javax.swing.JPanel
I guess the zooming can be disabled by just turning it off right here
- See Also:
- Serialized Form
Inner classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Fields inherited from class javax.swing.JComponent |
accessibleContext,
listenerList,
TOOL_TIP_TEXT_KEY,
ui,
UNDEFINED_CONDITION,
WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,
WHEN_FOCUSED,
WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
LEFT_ALIGNMENT,
RIGHT_ALIGNMENT,
TOP_ALIGNMENT |
Method Summary |
protected void |
_drawPlot(java.awt.Graphics graphics,
boolean clearfirst)
|
protected void |
_drawPoint(java.awt.Graphics graphics,
int dataset,
long xpos,
long ypos,
boolean clip)
Put a mark corresponding to the specified dataset at the
specified x and y position. |
protected boolean |
_parseLine(java.lang.String line)
Parse a line that gives plotting information. |
protected void |
_setButtonsVisibility(boolean vis)
Deprecated. |
protected void |
_write(java.io.PrintWriter output)
Write plot information to the specified output stream. |
void |
_zoom(int x,
int y)
|
void |
_zoomBox(int x,
int y)
|
void |
_zoomStart(int x,
int y)
|
void |
addLegend(int dataset,
java.lang.String legend)
|
void |
addXTick(java.lang.String label,
double position)
|
void |
addYTick(java.lang.String label,
double position)
|
void |
clear(boolean axes)
|
void |
fillPlot()
|
static java.awt.Color |
getColorByName(java.lang.String name)
|
java.lang.String |
getDataurl()
|
java.net.URL |
getDocumentBase()
|
java.lang.String |
getLegend(int dataset)
|
java.awt.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
void |
init()
|
void |
paint(java.awt.Graphics graphics)
|
void |
parseFile(java.lang.String filespec)
|
void |
parseFile(java.lang.String filespec,
java.net.URL documentBase)
|
void |
read(java.io.InputStream in)
|
void |
setBackground(java.awt.Color background)
|
void |
setBinary(boolean binary)
|
void |
setBounds(int x,
int y,
int width,
int height)
|
void |
setButtons(boolean visible)
|
void |
setDataurl(java.lang.String filespec)
|
void |
setDocumentBase(java.net.URL documentBase)
|
void |
setForeground(java.awt.Color foreground)
|
void |
setGrid(boolean grid)
|
void |
setLabelFont(java.lang.String name)
|
void |
setSize(int width,
int height)
|
void |
setTitle(java.lang.String title)
|
void |
setTitleFont(java.lang.String name)
|
void |
setXLabel(java.lang.String label)
|
void |
setXLog(boolean xlog)
|
void |
setXRange(double min,
double max)
|
void |
setYLabel(java.lang.String label)
|
void |
setYLog(boolean ylog)
|
void |
setYRange(double min,
double max)
|
void |
write(java.io.OutputStream out)
|
void |
zoom(double lowx,
double lowy,
double highx,
double highy)
|
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener,
addNotify,
addPropertyChangeListener,
addPropertyChangeListener,
addVetoableChangeListener,
computeVisibleRect,
contains,
createToolTip,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
firePropertyChange,
fireVetoableChange,
getActionForKeyStroke,
getAlignmentX,
getAlignmentY,
getAutoscrolls,
getBorder,
getBounds,
getClientProperty,
getComponentGraphics,
getConditionForKeyStroke,
getDebugGraphicsOptions,
getGraphics,
getHeight,
getInsets,
getInsets,
getLocation,
getMaximumSize,
getNextFocusableComponent,
getRegisteredKeyStrokes,
getRootPane,
getSize,
getToolTipLocation,
getToolTipText,
getToolTipText,
getTopLevelAncestor,
getVisibleRect,
getWidth,
getX,
getY,
grabFocus,
hasFocus,
isDoubleBuffered,
isFocusCycleRoot,
isFocusTraversable,
isLightweightComponent,
isManagingFocus,
isOpaque,
isOptimizedDrawingEnabled,
isPaintingTile,
isRequestFocusEnabled,
isValidateRoot,
paintBorder,
paintChildren,
paintComponent,
paintImmediately,
paintImmediately,
processComponentKeyEvent,
processFocusEvent,
processKeyEvent,
processMouseMotionEvent,
putClientProperty,
registerKeyboardAction,
registerKeyboardAction,
removeAncestorListener,
removeNotify,
removePropertyChangeListener,
removePropertyChangeListener,
removeVetoableChangeListener,
repaint,
repaint,
requestDefaultFocus,
requestFocus,
resetKeyboardActions,
reshape,
revalidate,
scrollRectToVisible,
setAlignmentX,
setAlignmentY,
setAutoscrolls,
setBorder,
setDebugGraphicsOptions,
setDoubleBuffered,
setEnabled,
setFont,
setMaximumSize,
setMinimumSize,
setNextFocusableComponent,
setOpaque,
setPreferredSize,
setRequestFocusEnabled,
setToolTipText,
setUI,
setVisible,
unregisterKeyboardAction,
update |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
print,
printComponents,
processContainerEvent,
processEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
getBackground,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont,
getFontMetrics,
getForeground,
getInputContext,
getInputMethodRequests,
getLocale,
getLocation,
getLocationOnScreen,
getName,
getParent,
getPeer,
getSize,
getToolkit,
getTreeLock,
gotFocus,
handleEvent,
hide,
imageUpdate,
inside,
isDisplayable,
isEnabled,
isLightweight,
isShowing,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
postEvent,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processInputMethodEvent,
processMouseEvent,
remove,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
repaint,
repaint,
repaint,
resize,
resize,
setBounds,
setComponentOrientation,
setDropTarget,
setLocale,
setLocation,
setLocation,
setName,
setSize,
show,
show,
size,
toString,
transferFocus |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
_yMax
protected transient double _yMax
_yMin
protected transient double _yMin
_xMax
protected transient double _xMax
_xMin
protected transient double _xMin
_PADDING
protected static final transient double _PADDING
_xRangeGiven
protected transient boolean _xRangeGiven
_yRangeGiven
protected transient boolean _yRangeGiven
_xBottom
protected double _xBottom
_xTop
protected double _xTop
_yBottom
protected double _yBottom
_yTop
protected double _yTop
_xlog
protected boolean _xlog
_ylog
protected boolean _ylog
_LOG10SCALE
protected static final double _LOG10SCALE
_grid
protected boolean _grid
_background
protected java.awt.Color _background
_foreground
protected java.awt.Color _foreground
_topPadding
protected int _topPadding
_bottomPadding
protected int _bottomPadding
_rightPadding
protected int _rightPadding
_leftPadding
protected int _leftPadding
_ulx
protected int _ulx
_uly
protected int _uly
_lrx
protected int _lrx
_lry
protected int _lry
_yscale
protected double _yscale
_xscale
protected double _xscale
_usecolor
protected boolean _usecolor
_colors
protected static java.awt.Color[] _colors
_width
protected int _width
_height
protected int _height
_documentBase
protected java.net.URL _documentBase
PlotBox
public PlotBox()
addLegend
public void addLegend(int dataset,
java.lang.String legend)
addXTick
public void addXTick(java.lang.String label,
double position)
addYTick
public void addYTick(java.lang.String label,
double position)
clear
public void clear(boolean axes)
fillPlot
public void fillPlot()
getColorByName
public static java.awt.Color getColorByName(java.lang.String name)
getDataurl
public java.lang.String getDataurl()
getDocumentBase
public java.net.URL getDocumentBase()
getLegend
public java.lang.String getLegend(int dataset)
getMinimumSize
public java.awt.Dimension getMinimumSize()
- Overrides:
- getMinimumSize in class javax.swing.JComponent
getPreferredSize
public java.awt.Dimension getPreferredSize()
- Overrides:
- getPreferredSize in class javax.swing.JComponent
init
public void init()
paint
public void paint(java.awt.Graphics graphics)
- Overrides:
- paint in class javax.swing.JComponent
parseFile
public void parseFile(java.lang.String filespec)
parseFile
public void parseFile(java.lang.String filespec,
java.net.URL documentBase)
read
public void read(java.io.InputStream in)
throws java.io.IOException
setBounds
public void setBounds(int x,
int y,
int width,
int height)
- Overrides:
- setBounds in class java.awt.Component
setButtons
public void setButtons(boolean visible)
setSize
public void setSize(int width,
int height)
- Overrides:
- setSize in class java.awt.Component
setBackground
public void setBackground(java.awt.Color background)
- Overrides:
- setBackground in class javax.swing.JComponent
setForeground
public void setForeground(java.awt.Color foreground)
- Overrides:
- setForeground in class javax.swing.JComponent
setBinary
public void setBinary(boolean binary)
setDataurl
public void setDataurl(java.lang.String filespec)
setDocumentBase
public void setDocumentBase(java.net.URL documentBase)
setGrid
public void setGrid(boolean grid)
setLabelFont
public void setLabelFont(java.lang.String name)
setTitle
public void setTitle(java.lang.String title)
setTitleFont
public void setTitleFont(java.lang.String name)
setXLabel
public void setXLabel(java.lang.String label)
setXLog
public void setXLog(boolean xlog)
setXRange
public void setXRange(double min,
double max)
setYLabel
public void setYLabel(java.lang.String label)
setYLog
public void setYLog(boolean ylog)
setYRange
public void setYRange(double min,
double max)
write
public void write(java.io.OutputStream out)
zoom
public void zoom(double lowx,
double lowy,
double highx,
double highy)
_drawPlot
protected void _drawPlot(java.awt.Graphics graphics,
boolean clearfirst)
_drawPoint
protected void _drawPoint(java.awt.Graphics graphics,
int dataset,
long xpos,
long ypos,
boolean clip)
- Put a mark corresponding to the specified dataset at the
specified x and y position. The mark is drawn in the
current color. In this base class, a point is a
filled rectangle 6 pixels across. Note that marks greater than
about 6 pixels in size will not look very good since they will
overlap axis labels and may not fit well in the legend. The
clip argument, if
true
, states
that the point should not be drawn if
it is out of range.
- Parameters:
graphics
- The graphics context.dataset
- The index of the data set.xpos
- The X position.ypos
- The Y position.clip
- If true, do not draw if out of range.
_parseLine
protected boolean _parseLine(java.lang.String line)
- Parse a line that gives plotting information. In this base
class, only lines pertaining to the title and labels are processed.
Everything else is ignored. Return true if the line is recognized.
- Parameters:
line
- A line of text.
_setButtonsVisibility
protected void _setButtonsVisibility(boolean vis)
- Deprecated.
- Set the visibility of the Fill button.
This is deprecated. Use setButtons().
_write
protected void _write(java.io.PrintWriter output)
- Write plot information to the specified output stream.
Derived classes should override this method to first call
the parent class method, then add whatever additional information
they wish to add to the stream.
- Parameters:
output
- A buffered print writer.
_zoom
public void _zoom(int x,
int y)
_zoomBox
public void _zoomBox(int x,
int y)
_zoomStart
public void _zoomStart(int x,
int y)