diagapplet.plotter
Class PlotGraphJPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
diagapplet.plotter.PlotGraphJPanel
- All Implemented Interfaces:
- java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
public class PlotGraphJPanel
- extends javax.swing.JPanel
JPanel for the actual graph without the controls around the outside.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
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 |
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 |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary |
void |
AddPlot(PlotData pd)
|
void |
AddPlot(PlotData pd,
java.lang.String name)
|
void |
AddPointToArrayPlot(PlotData pd,
int index,
double x,
double y,
double pre_f_x,
double pre_f_y)
|
void |
AddPointToPlot(PlotData pd,
double x,
double y,
boolean connected,
double pre_f_x,
double pre_f_y)
|
void |
ClearAllData()
|
boolean |
ColorsTooClose(java.awt.Color c1,
java.awt.Color c2,
long min_diff)
|
boolean |
ColorTooClosePreviousPlot(java.awt.Color c1,
long min_diff)
|
void |
CopySettings(PlotGraphJPanel pgjp_to_copy)
|
void |
DebugPrint(java.lang.String s)
|
static void |
DebugPrint2(java.lang.String s)
|
void |
equalizeAxis()
|
void |
ErrorPrint(java.lang.String s)
|
void |
FitToGraph()
|
void |
FitY()
|
static java.lang.String |
format_double(double d)
|
boolean |
get_array_mode()
|
int |
get_point_size_limit()
|
java.awt.image.BufferedImage |
getImage()
|
java.awt.image.BufferedImage |
getImage(java.awt.Dimension d)
|
java.awt.image.BufferedImage |
getImage(int _width,
int _height)
|
int |
getMax_plots_to_show()
Getter for property max_plots_to_show. |
PlotData |
GetPlot(java.lang.String name)
|
double |
getX_Grid()
Get the value of X_Grid |
double |
getY_Grid()
Get the value of Y_Grid |
void |
HandleResize()
|
void |
LoadOptions()
|
void |
mouseClicked(java.awt.event.MouseEvent evt)
|
void |
mouseDragged(java.awt.event.MouseEvent evt)
|
void |
mouseEntered(java.awt.event.MouseEvent evt)
|
void |
mouseExited(java.awt.event.MouseEvent evt)
|
void |
mouseMoved(java.awt.event.MouseEvent evt)
|
void |
mousePressed(java.awt.event.MouseEvent evt)
|
void |
mouseReleased(java.awt.event.MouseEvent evt)
|
void |
paintAll(java.awt.Graphics g)
|
void |
paintCartesianGrid(java.awt.Graphics g)
|
protected void |
paintComponent(java.awt.Graphics g)
|
void |
paintDraggingRect(java.awt.Graphics g)
|
void |
paintGraph(java.awt.Graphics g)
|
void |
refresh()
|
void |
RemoveAllPlots()
|
void |
RemovePlot(java.lang.String name)
|
void |
ResetColors()
|
void |
ResetMinXToZero()
|
void |
SaveOptions()
|
void |
ScrollRight()
|
void |
set_array_mode(boolean _array_mode)
|
void |
set_plot_group_number(int _plot_group_number)
|
void |
set_point_size_limit(int _new_point_size_limit)
|
void |
SetInnerArea(double min_x,
double max_x,
double min_y,
double max_y)
|
void |
SetKeyListener(java.awt.event.KeyListener kl)
|
void |
setMax_plots_to_show(int max_plots_to_show)
Setter for property max_plots_to_show. |
void |
SetOuterArea(double min_x,
double max_x,
double min_y,
double max_y)
|
void |
setPlotOrder(java.lang.String s)
|
void |
SetReverseX(boolean _new_reverse_x)
|
void |
setX_Grid(double X_Grid)
Set the value of X_Grid |
void |
setY_Grid(double Y_Grid)
Set the value of Y_Grid |
java.lang.String |
toString()
|
void |
UpdateDisplay(boolean force_repaint)
|
void |
Zoom(double scale_factor)
|
void |
ZoomIn()
|
void |
ZoomOut()
|
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
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, 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 |
Methods inherited from class java.awt.Container |
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 |
Methods inherited from class java.awt.Component |
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, 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, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
use_buffer
public boolean use_buffer
max_points_per_plot
public int max_points_per_plot
SyncObject
public java.lang.Object SyncObject
plotter_num
public int plotter_num
repaint_count
public int repaint_count
paint_count
public int paint_count
repaint_max_tm_millis
public int repaint_max_tm_millis
show_lines
public boolean show_lines
show_key
public volatile boolean show_key
k2_mode
public volatile boolean k2_mode
s_mode
public volatile boolean s_mode
c_mode
public volatile boolean c_mode
l_mode
public volatile boolean l_mode
e_mode
public volatile boolean e_mode
xy_mode
public volatile boolean xy_mode
repaint_needed
public boolean repaint_needed
rescale_to_selected_rectangle_needed
public boolean rescale_to_selected_rectangle_needed
show_grid
public boolean show_grid
show_axis
public boolean show_axis
label_grid
public boolean label_grid
mark_points
public boolean mark_points
label_points
public boolean label_points
axis_color
public java.awt.Color axis_color
grid_color
public java.awt.Color grid_color
back_color
public java.awt.Color back_color
plots
public java.util.Hashtable<java.lang.String,PlotData> plots
m_color
public boolean m_color
show_rect
public volatile boolean show_rect
ANGLE_DEGREE_UNITS
public static final int ANGLE_DEGREE_UNITS
- See Also:
- Constant Field Values
ANGLE_RAD_UNITS
public static final int ANGLE_RAD_UNITS
- See Also:
- Constant Field Values
ANGLE_RADPI_UNITS
public static final int ANGLE_RADPI_UNITS
- See Also:
- Constant Field Values
angle_unit_type
public int angle_unit_type
radius_lines
public int radius_lines
angle_lines
public int angle_lines
zero_rad_color
public java.awt.Color zero_rad_color
df_noexponent
public static java.text.DecimalFormat df_noexponent
df_exponent
public static java.text.DecimalFormat df_exponent
set_l_mode_on_paint
public boolean set_l_mode_on_paint
is_full_screen
public boolean is_full_screen
keyVector
public java.util.ArrayList<PlotData> keyVector
extra_sh_str
public java.lang.String extra_sh_str
short_extra_sh_str
public java.lang.String short_extra_sh_str
X_Grid
protected double X_Grid
PROP_X_GRID
public static final java.lang.String PROP_X_GRID
- See Also:
- Constant Field Values
Y_Grid
protected double Y_Grid
PROP_Y_GRID
public static final java.lang.String PROP_Y_GRID
- See Also:
- Constant Field Values
PlotGraphJPanel
public PlotGraphJPanel()
CopySettings
public void CopySettings(PlotGraphJPanel pgjp_to_copy)
SetKeyListener
public void SetKeyListener(java.awt.event.KeyListener kl)
refresh
public void refresh()
HandleResize
public void HandleResize()
SaveOptions
public void SaveOptions()
LoadOptions
public void LoadOptions()
getImage
public java.awt.image.BufferedImage getImage()
getImage
public java.awt.image.BufferedImage getImage(java.awt.Dimension d)
getImage
public java.awt.image.BufferedImage getImage(int _width,
int _height)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.awt.Component
DebugPrint2
public static void DebugPrint2(java.lang.String s)
DebugPrint
public void DebugPrint(java.lang.String s)
ErrorPrint
public void ErrorPrint(java.lang.String s)
format_double
public static java.lang.String format_double(double d)
set_array_mode
public void set_array_mode(boolean _array_mode)
get_array_mode
public boolean get_array_mode()
Zoom
public void Zoom(double scale_factor)
ZoomOut
public void ZoomOut()
ZoomIn
public void ZoomIn()
ScrollRight
public void ScrollRight()
FitToGraph
public void FitToGraph()
FitY
public void FitY()
SetReverseX
public void SetReverseX(boolean _new_reverse_x)
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent evt)
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent evt)
mouseExited
public void mouseExited(java.awt.event.MouseEvent evt)
mousePressed
public void mousePressed(java.awt.event.MouseEvent evt)
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent evt)
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent evt)
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent evt)
ResetMinXToZero
public void ResetMinXToZero()
ColorTooClosePreviousPlot
public boolean ColorTooClosePreviousPlot(java.awt.Color c1,
long min_diff)
ColorsTooClose
public boolean ColorsTooClose(java.awt.Color c1,
java.awt.Color c2,
long min_diff)
AddPlot
public void AddPlot(PlotData pd,
java.lang.String name)
AddPlot
public void AddPlot(PlotData pd)
ResetColors
public void ResetColors()
GetPlot
public PlotData GetPlot(java.lang.String name)
RemoveAllPlots
public void RemoveAllPlots()
ClearAllData
public void ClearAllData()
RemovePlot
public void RemovePlot(java.lang.String name)
AddPointToPlot
public void AddPointToPlot(PlotData pd,
double x,
double y,
boolean connected,
double pre_f_x,
double pre_f_y)
AddPointToArrayPlot
public void AddPointToArrayPlot(PlotData pd,
int index,
double x,
double y,
double pre_f_x,
double pre_f_y)
equalizeAxis
public void equalizeAxis()
UpdateDisplay
public void UpdateDisplay(boolean force_repaint)
setPlotOrder
public void setPlotOrder(java.lang.String s)
getX_Grid
public double getX_Grid()
- Get the value of X_Grid
- Returns:
- the value of X_Grid
setX_Grid
public void setX_Grid(double X_Grid)
- Set the value of X_Grid
- Parameters:
X_Grid
- new value of X_Grid
getY_Grid
public double getY_Grid()
- Get the value of Y_Grid
- Returns:
- the value of Y_Grid
setY_Grid
public void setY_Grid(double Y_Grid)
- Set the value of Y_Grid
- Parameters:
Y_Grid
- new value of Y_Grid
paintCartesianGrid
public void paintCartesianGrid(java.awt.Graphics g)
paintComponent
protected void paintComponent(java.awt.Graphics g)
- Overrides:
paintComponent
in class javax.swing.JComponent
paintAll
public void paintAll(java.awt.Graphics g)
- Overrides:
paintAll
in class java.awt.Component
set_point_size_limit
public void set_point_size_limit(int _new_point_size_limit)
get_point_size_limit
public int get_point_size_limit()
paintDraggingRect
public void paintDraggingRect(java.awt.Graphics g)
paintGraph
public void paintGraph(java.awt.Graphics g)
SetOuterArea
public void SetOuterArea(double min_x,
double max_x,
double min_y,
double max_y)
SetInnerArea
public void SetInnerArea(double min_x,
double max_x,
double min_y,
double max_y)
set_plot_group_number
public void set_plot_group_number(int _plot_group_number)
getMax_plots_to_show
public int getMax_plots_to_show()
- Getter for property max_plots_to_show.
- Returns:
- Value of property max_plots_to_show.
setMax_plots_to_show
public void setMax_plots_to_show(int max_plots_to_show)
- Setter for property max_plots_to_show.
- Parameters:
max_plots_to_show
- New value of property max_plots_to_show.