Package org.opensourcephysics.tools
Class DataToolTab
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.opensourcephysics.tools.DataToolTab
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,PropertyChangeListener
,Serializable
,EventListener
,Accessible
,Tool
This tab displays and analyzes a single Data object in a DataTool.
- Version:
- 1.0
- Author:
- Douglas Brown
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
An interactive axes class that returns popup menus for x and y-variables.protected class
A class to plot datasets, value crossbars, slope lines, areas, and axes.protected class
A class to undo/redo origin shift edits.Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JButton
protected JCheckBoxMenuItem
protected boolean
protected int
protected Object[][]
protected static DecimalFormat
protected FunctionTool
protected JButton
protected DatasetManager
protected JScrollPane
protected DataToolTable
protected DataTool
protected JLabel
protected JButton
protected String
protected JMenu
protected JCheckBoxMenuItem
protected JDialog
protected FourierPanel
protected boolean
protected JButton
protected Action
protected boolean
protected boolean
protected JobManager
protected JButton
protected boolean
protected JCheckBoxMenuItem
protected JButton
protected int
protected JCheckBoxMenuItem
protected boolean
protected boolean
protected String
protected DataToolTab.DataToolPlotter
protected DataToolTab.DataToolAxes
protected boolean
protected double
protected double
protected Action
protected JCheckBoxMenuItem
protected JScrollPane
protected DataToolPropsTable
protected JButton
protected boolean
protected int
protected org.opensourcephysics.tools.DatasetCurveFitter.NumberField
protected JLabel
protected org.opensourcephysics.tools.DatasetCurveFitter.NumberField
protected JLabel
protected Action
protected org.opensourcephysics.tools.DataToolTab.ShiftEditListener
protected org.opensourcephysics.tools.DatasetCurveFitter.NumberField
protected JLabel
protected JSpinner
protected org.opensourcephysics.tools.DatasetCurveFitter.NumberField
protected JLabel
protected JSpinner
protected Action
protected JCheckBoxMenuItem
protected boolean
protected JSplitPane[]
protected JCheckBoxMenuItem
protected JScrollPane
protected DataToolStatsTable
protected JLabel
protected boolean
protected JScrollPane
protected boolean
protected JToolBar
protected UndoManager
protected UndoableEditSupport
protected boolean
protected JCheckBoxMenuItem
protected JPopupMenu
Fields inherited from class javax.swing.JComponent
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
accessibleContext, 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
ConstructorsConstructorDescriptionDataToolTab
(Data data, DataTool tool) Constructs a DataToolTab for the specified Data. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addColumn
(DataColumn column) Adds a DataColumn to this tab.protected void
addColumns
(ArrayList<DataColumn> columns, boolean deletable, boolean addDuplicates, boolean postEdit) Adds DataColumns to this tab.void
addColumns
(Data source, boolean deletable, boolean addDuplicates, boolean postEdit) Adds new dataColumns to this tab.void
addFitFunction
(KnownFunction f, boolean addToFitBuilder) Adds a fit function.void
protected void
Builds the axis variables popup menu.void
checkGUI()
void
clearData
(boolean postEdit) Clears all data.protected void
columnNameChanged
(String oldName, String newName) Responds to a changed column name.protected void
protected void
copyTableDataToClipboard
(boolean asFormatted) Copies the selected table data to the clipboard.protected DataColumn
Creates a new empty DataColumn.protected void
Creates the GUI.void
dispose()
void
finalize()
static int
findNearestXIndex
(double x, double[] xpoints, double[] ypoints, int len, double min, double max) Far more efficient method of searching a sparse array.protected Map<DataColumn,
Dataset> getColumnMatchesByID
(Data data) Gets datasets matching columns by ID in this tab.protected Map<DataColumn,
Dataset> getColumnMatchesByName
(Set<String> columnNames, Data data) Gets datasets matching columns by name in this tab.getColumnName
(int ID) Gets the column name for the first DataColumn with a given ID.protected String
Gets a correlation string to display in the status bar.Gets the data builder for defining custom data functions.static XML.ObjectLoader
Returns an ObjectLoader to save and load data for this class.protected Dataset
getMatchByID
(DataColumn column, ArrayList<Dataset> datasets) Gets a matching Dataset by ID.protected Dataset
getMatchByName
(DataColumn column, ArrayList<Dataset> datasets) Gets a matching Dataset by name.Gets the name of the owner of this tab.protected String
getSelectedTableData
(boolean asFormatted, String delimiter) Gets the table cells selected by the user.protected org.opensourcephysics.tools.DataToolTable.WorkingDataset
Gets the working dataset.protected boolean
isDeletable
(Dataset data) Determines if a dataset is deletable.protected boolean
isDuplicateColumn
(String name, double[] data) Returns true if the name and data duplicate an existing column.boolean
isInterestedIn
(Data data) Returns true if this tab is interested in a Data object.boolean
Returns true if (a) the Data ID is this tab owner's ID or (b) the Data name is this tab's name.boolean
Returns true if this tab is user editable.Loads data into this tab.protected void
mouseDraggedAction
(MouseEvent e, boolean controlDown, boolean shiftDown) protected void
mousePressedAction
(MouseEvent e, boolean controlDown, boolean shiftDown) protected void
mouseReleasedAction
(MouseEvent e, boolean controlDown, boolean shiftDown) protected void
void
Listens for property change "function".void
refreshAll
(int mode) Refreshes all.void
Refreshes the data by sending a request to the source.protected void
Refreshes the data builder.protected void
Refreshes the decimal separators.protected void
Refreshes the GUI.protected void
protected void
protected void
refreshPlot
(boolean andFit) Refreshes the plot.double
Refreshes the origin shift fields.protected void
refreshStatusBar
(String hint) Refreshes the status bar.protected void
Refreshes the undo and redo menu items.void
This Component has been detacched from its parent.protected String
Replaces spaces with underscores in a name.void
saveOwnedColumnNames
(String columnOwnerName, Data data) Saves DataColumn names with associated column owner and Data object.protected String
saveTableDataToFile
(boolean asFormatted) Saves the selected table data to a file selected with a fileChooser.void
Sends a job to this tool and specifies a tool to reply to.protected boolean
setDelimitedData
(String dataString, String prevString) Sets the table data to the specified delimited text.protected void
setFontLevel
(int level) Sets the font level.void
boolean
setOwnedColumnIDs
(String columnOwnerName, Data data) Sets DataColumn IDs to corresponding column owner IDs based on saved names.void
Sets the owner of this tab.void
setReplaceColumnsWithMatchingNames
(boolean replace) Sets the replaceColumnsWithMatchingNames flag.protected void
setSelectedData
(Dataset selectedData, boolean dofit) Sets the selected data in the curve fitter and fourier panel.void
setUserEditable
(boolean editable) Sets the userEditable flag.void
setWorkingColumns
(String xColName, String yColName) Sets the x and y columns by name.protected void
tabChanged
(boolean changed) Sets the tabChanged flag.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
correlationFormat
-
dataTool
-
originatorID
protected int originatorID -
dataManager
-
splitPanes
-
plot
-
dataTable
-
statsTable
-
propsTable
-
dataScroller
-
statsScroller
-
propsScroller
-
tableScroller
-
toolbar
-
statsCheckbox
-
propsCheckbox
-
fourierCheckbox
-
fourierPanel
-
fourierDialog
-
measureButton
-
analyzeButton
-
dataBuilderButton
-
newColumnButton
-
refreshDataButton
-
valueCheckbox
-
slopeCheckbox
-
areaCheckbox
-
showFitterAction
-
hideFitterAction
-
propsAndStatsAction
-
fitMenu
-
fileName
-
ownerName
-
ownedColumns
-
helpButton
-
editDataButton
-
colorIndex
protected int colorIndex -
tabChanged
protected boolean tabChanged -
userEditable
protected boolean userEditable -
undoSupport
-
undoManager
-
dataBuilder
-
jobManager
-
statusLabel
-
editableLabel
-
plotAxes
-
positionVisible
protected boolean positionVisible -
slopeVisible
protected boolean slopeVisible -
areaVisible
protected boolean areaVisible -
originShiftEnabled
protected boolean originShiftEnabled -
originShiftJustEnabled
protected boolean originShiftJustEnabled -
measureFit
protected boolean measureFit -
varPopup
-
isHorzVarPopup
protected boolean isHorzVarPopup -
setVarAction
-
isInitialized
protected boolean isInitialized -
constantsLoadedFromXML
-
replaceColumnsWithMatchingNames
protected boolean replaceColumnsWithMatchingNames -
measureFitCheckbox
-
originShiftCheckbox
-
prevShiftX
protected double prevShiftX -
prevShiftY
protected double prevShiftY -
shiftXField
protected org.opensourcephysics.tools.DatasetCurveFitter.NumberField shiftXField -
shiftYField
protected org.opensourcephysics.tools.DatasetCurveFitter.NumberField shiftYField -
selectedXField
protected org.opensourcephysics.tools.DatasetCurveFitter.NumberField selectedXField -
selectedYField
protected org.opensourcephysics.tools.DatasetCurveFitter.NumberField selectedYField -
shiftXSpinner
-
shiftYSpinner
-
shiftEditListener
protected org.opensourcephysics.tools.DataToolTab.ShiftEditListener shiftEditListener -
shiftXLabel
-
shiftYLabel
-
selectedXLabel
-
selectedYLabel
-
selectedDataIndex
protected int selectedDataIndex -
toggleMeasurement
protected boolean toggleMeasurement -
freezeMeasurement
protected boolean freezeMeasurement
-
-
Constructor Details
-
DataToolTab
Constructs a DataToolTab for the specified Data.- Parameters:
data
- the Data objecttool
- the DataTool
-
-
Method Details
-
getCurveFitter
-
addNotify
public void addNotify()- Overrides:
addNotify
in classJComponent
-
checkGUI
public void checkGUI() -
loadData
Loads data into this tab.- Parameters:
data
- the data to loadreplaceIfSameName
- true to replace existing data, if any- Returns:
- true if loaded
-
addColumns
Adds new dataColumns to this tab.- Parameters:
source
- the Data source of the columnsdeletable
- true to allow added columns to be deletedaddDuplicates
- true to add duplicate IDspostEdit
- true to post an undoable edit
-
addColumns
protected void addColumns(ArrayList<DataColumn> columns, boolean deletable, boolean addDuplicates, boolean postEdit) Adds DataColumns to this tab.- Parameters:
columns
- the columns to adddeletable
- true to allow added columns to be deletedaddDuplicates
- true to add duplicate IDspostEdit
- true to post an undoable edit
-
setWorkingColumns
Sets the x and y columns by name.- Parameters:
xColName
- the name of the horizontal axis variableyColName
- the name of the vertical axis variable
-
setName
-
setUserEditable
public void setUserEditable(boolean editable) Sets the userEditable flag.- Parameters:
editable
- true to enable user editing
-
isUserEditable
public boolean isUserEditable()Returns true if this tab is user editable.- Returns:
- true if user editable
-
getDataBuilder
Gets the data builder for defining custom data functions.- Returns:
- the data builder
-
propertyChange
Listens for property change "function".- Specified by:
propertyChange
in interfacePropertyChangeListener
- Parameters:
e
- the event
-
send
Sends a job to this tool and specifies a tool to reply to. -
addFitFunction
Adds a fit function. UserFunctions can optionally be added to the fit builder.- Parameters:
f
- the fit function to addaddToFitBuilder
- true to add a UserFunction to the fit builder
-
clearData
public void clearData(boolean postEdit) Clears all data.- Parameters:
postEdit
- true to post an undoable edit
-
setReplaceColumnsWithMatchingNames
public void setReplaceColumnsWithMatchingNames(boolean replace) Sets the replaceColumnsWithMatchingNames flag.- Parameters:
replace
- true to replace columns with same name but different ID
-
isInterestedIn
Returns true if this tab is interested in a Data object.- Parameters:
data
- the Data object- Returns:
- true if data is of interest
-
setOwnedColumnIDs
Sets DataColumn IDs to corresponding column owner IDs based on saved names. Call this after loading this tab from XML to set column IDs to column owner IDs.- Parameters:
columnOwnerName
- the guest namedata
- the guest Data- Returns:
- true if any column IDs were changed
-
saveOwnedColumnNames
Saves DataColumn names with associated column owner and Data object. Call this before saving this tab so owned columns will be saved in XML.- Parameters:
columnOwnerName
- the guest namedata
- the guest Data
-
getColumnName
Gets the column name for the first DataColumn with a given ID.- Parameters:
ID
- the ID number of the desired column- Returns:
- the tab column name, or null if not found
-
isOwnedBy
Returns true if (a) the Data ID is this tab owner's ID or (b) the Data name is this tab's name.- Parameters:
data
- the Data object- Returns:
- true if data owns this tab
-
setOwner
Sets the owner of this tab. This method is used before saving and after loading this tab so the tab can refresh its data from a new owner.- Parameters:
name
- the owner namedata
- the owner Data
-
getOwnerName
Gets the name of the owner of this tab. May return null, even if an owner exists.- Returns:
- the name of the owner
-
refreshData
public void refreshData()Refreshes the data by sending a request to the source. Note that this only works if the data was received from a DataRefreshTool. -
addColumn
Adds a DataColumn to this tab.- Parameters:
column
- the column to add
-
isDeletable
Determines if a dataset is deletable.- Parameters:
data
- the dataset- Returns:
- true if deletable
-
replaceSpacesWithUnderscores
Replaces spaces with underscores in a name.- Parameters:
name
- the name with spaces- Returns:
- the name with underscores
-
refreshDataBuilder
protected void refreshDataBuilder()Refreshes the data builder. -
setFontLevel
protected void setFontLevel(int level) Sets the font level.- Parameters:
level
- the level
-
tabChanged
protected void tabChanged(boolean changed) Sets the tabChanged flag.- Parameters:
changed
- true if tab is changed
-
getWorkingData
protected org.opensourcephysics.tools.DataToolTable.WorkingDataset getWorkingData()Gets the working dataset.- Returns:
- the first two data columns in the datatable (x-y order)
-
columnNameChanged
Responds to a changed column name.- Parameters:
oldName
- the previous namenewName
- the new name
-
createDataColumn
Creates a new empty DataColumn.- Returns:
- the column
-
saveTableDataToFile
Saves the selected table data to a file selected with a fileChooser.- Returns:
- the path of the saved file or null if failed
-
copyTableDataToClipboard
protected void copyTableDataToClipboard(boolean asFormatted) Copies the selected table data to the clipboard. -
getSelectedTableData
Gets the table cells selected by the user. The tab name and column names precede the data. Data rows are delimited by new lines ("\n"), columns by tabs.- Parameters:
asFormatted
- true to return formatted datadelimiter
- the columns delimiter to use- Returns:
- a String containing the data.
-
createGUI
protected void createGUI()Creates the GUI. -
columnOrderChanged
protected void columnOrderChanged() -
mouseDraggedAction
-
mouseReleasedAction
-
mousePressedAction
-
refreshGUI
protected void refreshGUI()Refreshes the GUI. -
refreshGUIAsync
protected void refreshGUIAsync() -
refreshDecimalSeparators
protected void refreshDecimalSeparators()Refreshes the decimal separators. -
buildVarPopup
protected void buildVarPopup()Builds the axis variables popup menu. -
isDuplicateColumn
Returns true if the name and data duplicate an existing column. Never called.- Parameters:
name
- the namedata
- the data array- Returns:
- true if a duplicate is found
-
getColumnMatchesByID
Gets datasets matching columns by ID in this tab.- Parameters:
data
- Data object with datasets to match- Returns:
- map of column to dataset
-
getColumnMatchesByName
Gets datasets matching columns by name in this tab.- Parameters:
columnNames
- set of column namesdata
- Data object with datasets to match- Returns:
- map of column to dataset
-
getMatchByName
Gets a matching Dataset by name.- Parameters:
column
- the DataColumn to matchdatasets
- the Datasets to search- Returns:
- the matching Dataset
-
getMatchByID
Gets a matching Dataset by ID.- Parameters:
column
- the DataColumn to matchdatasets
- the Datasets to search- Returns:
- the matching Dataset
-
setDelimitedData
Sets the table data to the specified delimited text. Posts an undoable edit if prevString is given.- Parameters:
dataString
- the delimited textprevString
- optional previous delimited text for undoable edit- Returns:
- true if an undoable edit was posted
- Throws:
Exception
-
setSelectedData
Sets the selected data in the curve fitter and fourier panel.- Parameters:
selectedData
- the Dataset to pass to the fitter and fourier panel
-
refreshPlot
protected void refreshPlot() -
refreshPlot
protected void refreshPlot(boolean andFit) Refreshes the plot. -
refreshStatusBar
Refreshes the status bar.- Parameters:
hint
- an optional hint to display (may be null)
-
getCorrelationString
Gets a correlation string to display in the status bar. -
refreshShiftFields
public double refreshShiftFields()Refreshes the origin shift fields.- Returns:
- the current y-field shift
-
refreshAll
public void refreshAll(int mode) Refreshes all. -
refreshUndoItems
protected void refreshUndoItems()Refreshes the undo and redo menu items. -
postShiftEdit
protected void postShiftEdit() -
getLoader
Returns an ObjectLoader to save and load data for this class.- Returns:
- the object loader
-
findNearestXIndex
public static int findNearestXIndex(double x, double[] xpoints, double[] ypoints, int len, double min, double max) Far more efficient method of searching a sparse array. Just track the closest point, running linearly through the array. See test.PerformanceTests.findNearestXIndex.- Parameters:
x
-xpoints
-ypoints
-len
-min
-max
-- Returns:
-
removeNotify
public void removeNotify()This Component has been detacched from its parent. Presumption here is that it can be disposed.- Overrides:
removeNotify
in classJComponent
-
dispose
public void dispose() -
finalize
public void finalize()
-