|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Frame javax.swing.JFrame org.opensourcephysics.display.OSPFrame org.opensourcephysics.tools.DataTool
public class DataTool
This provides a GUI for analyzing OSP Data objects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JFrame |
---|
javax.swing.JFrame.AccessibleJFrame |
Nested classes/interfaces inherited from class java.awt.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
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 javax.swing.JMenuItem |
aboutItem
|
protected Data |
addableData
|
protected static int |
buttonHeight
|
protected static javax.swing.JFileChooser |
chooser
|
protected javax.swing.JMenuItem |
closeAllItem
|
protected javax.swing.JMenuItem |
closeItem
|
protected javax.swing.JPanel |
contentPane
|
protected XMLControlElement |
control
|
protected boolean |
controlContainsData
|
protected javax.swing.JMenuItem |
copyDataItem
|
protected javax.swing.JMenuItem |
copyImageItem
|
protected javax.swing.JMenu |
copyMenu
|
protected javax.swing.JMenuItem |
copyTabItem
|
protected FunctionTool |
dataBuilder
|
protected static int |
defaultButtonHeight
|
protected javax.swing.JMenuItem |
defaultFontSizeItem
|
protected static java.lang.String[] |
delimiters
|
protected static java.awt.Dimension |
dim
|
protected javax.swing.JMenu |
displayMenu
|
protected javax.swing.JMenu |
editMenu
|
protected javax.swing.JMenu |
emptyEditMenu
|
protected javax.swing.JMenuItem |
emptyExitItem
|
protected javax.swing.JMenu |
emptyFileMenu
|
protected javax.swing.JMenuBar |
emptyMenubar
|
protected javax.swing.JMenuItem |
emptyNewTabItem
|
protected javax.swing.JMenuItem |
emptyOpenItem
|
protected javax.swing.JMenuItem |
emptyPasteItem
|
protected javax.swing.JMenuItem |
exitItem
|
protected boolean |
exitOnClose
|
protected javax.swing.JMenuItem |
exportItem
|
protected javax.swing.JMenu |
fileMenu
|
protected int |
fontLevel
|
protected javax.swing.JMenu |
fontSizeMenu
|
protected static java.lang.String |
helpBase
|
protected static TextFrame |
helpFrame
|
protected javax.swing.JMenuItem |
helpItem
|
protected javax.swing.JMenu |
helpMenu
|
protected static java.lang.String |
helpName
|
protected javax.swing.JMenuItem |
importItem
|
protected javax.swing.JMenuItem[] |
languageItems
|
protected javax.swing.JMenu |
languageMenu
|
static boolean |
loadClass
|
protected javax.swing.JMenuItem |
logItem
|
protected javax.swing.JMenuBar |
menubar
|
protected javax.swing.JMenuItem |
newTabItem
|
protected javax.swing.JMenuItem |
openItem
|
protected javax.swing.JMenuItem |
pasteColumnsItem
|
protected javax.swing.JMenu |
pasteMenu
|
protected javax.swing.JMenuItem |
pasteTabItem
|
protected javax.swing.JMenuItem |
printItem
|
protected javax.swing.JMenuItem |
redoItem
|
protected javax.swing.JMenuItem |
saveAsItem
|
protected boolean |
saveChangesOnClose
|
protected javax.swing.JMenuItem |
saveItem
|
protected java.beans.PropertyChangeSupport |
support
|
protected javax.swing.JTabbedPane |
tabbedPane
|
protected javax.swing.JMenuItem |
undoItem
|
protected boolean |
useChooser
|
Fields inherited from class org.opensourcephysics.display.OSPFrame |
---|
animated, autoclear, buttonPanel, childFrames, constructorThreadGroup, customButtons, keepHidden, strategy |
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Frame |
---|
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
|
DataTool()
Constructs a blank DataTool. |
|
DataTool(Data data)
Constructs a DataTool and loads the specified data object. |
|
DataTool(java.lang.String fileName)
Constructs a DataTool and opens the specified xml file. |
protected |
DataTool(java.lang.String title,
java.lang.String name)
Constructs a DataTool with title and name. |
|
DataTool(XMLControl control)
Constructs a DataTool and loads data from an xml control. |
Method Summary | |
---|---|
void |
addTab(DataToolTab tab)
Adds a tab. |
java.util.ArrayList<DataToolTab> |
addTabs(XMLControl control)
Adds tabs loaded with data from an xml control. |
void |
clearData()
Clears data by removing all tabs. |
protected static boolean |
containsDuplicateValues(double[] values)
Determines if an array contains any duplicate or Double.NaN values. |
protected static void |
copy(java.lang.String text)
Copies text to the clipboard. |
protected static javax.swing.JButton |
createButton(java.lang.String text)
Creates a button with a specified text. |
protected void |
createGUI()
Creates the GUI. |
static java.util.ArrayList<DataToolTab> |
createTabs(Data source)
Creates a tab for each Data object returned by DataTool.getDataList(source). |
protected static java.util.ArrayList<DataColumn> |
getAllDataColumns(Data source)
Gets a list of all DataColumns from any Data object. |
static java.util.ArrayList<Dataset> |
getAllDatasets(Data source)
Gets a list of all Datasets from any Data object. |
protected FunctionTool |
getDataBuilder()
Gets the data builder for defining custom data functions. |
protected static java.util.ArrayList<DataColumn> |
getDataColumns(Data source)
Gets a list of DataColumns from a self-contained Data object. |
static java.util.ArrayList<Dataset> |
getDatasets(Data source)
Gets a list of Datasets from a self-contained source Data object. |
protected static int |
getIndex(double value,
double[] array,
int ignoreIndex)
Gets the first array index at which the specified value is found. |
protected static double[] |
getRowArray(int rowCount)
Returns an array of row numbers. |
DataToolTab |
getSelectedTab()
Gets the currently selected DataToolTab, if any. |
protected static java.util.ArrayList<Data> |
getSelfContainedData(Data container)
Gets a list of self-contained Data objects. |
DataToolTab |
getTab(Data data)
Returns the tab associated with the specified Data object. |
DataToolTab |
getTab(int index)
Returns the tab at the specified index. |
int |
getTabCount()
Returns the tab count. |
protected int |
getTabIndex(Data data)
Returns the index of the tab containing the specified Data object. |
protected int |
getTabIndex(DataToolTab tab)
Returns the index of a specified tab. |
static DataTool |
getTool()
Gets the shared DataTool. |
protected java.lang.String |
getUniqueTabName(java.lang.String proposed)
Gets a unique name. |
protected boolean |
hasPastableColumns(DataToolTab tab)
Determines if the clipboard has columns that are pastable into a specified tab. |
protected boolean |
hasPastableData()
Determines if the clipboard has pastable data. |
protected java.lang.String |
importFileIntoTab(DataToolTab tab)
Imports an xml or data file selected with a chooser into a specified tab. |
java.lang.String |
importFileIntoTab(DataToolTab tab,
java.lang.String fileName)
Imports an xml or data file into an existing tab. |
protected static double[] |
insert(double input,
double[] array,
int trend)
Inserts a specified value into an array. |
boolean |
isUseChooser()
Gets the useChooser flag. |
DataToolTab |
loadData(Data... data)
Loads multiple Data objects into a single existing or newly created tab. |
java.util.ArrayList<DataToolTab> |
loadData(Data data)
Loads a Data object into existing tabs and/or newly created tabs as needed. |
static void |
main(java.lang.String[] args)
Main entry point when used as application. |
protected java.lang.String |
open()
Opens an xml or data file selected with a chooser. |
java.lang.String |
open(java.lang.String fileName)
Opens an xml or data file specified by name. |
static DatasetManager |
parseData(java.lang.String dataString,
java.lang.String fileName)
Parses character-delimited data from a string. |
protected static double[] |
parseDoubles(java.lang.String[] strings)
Parses a String array into doubles. |
protected static double[] |
parseDoubles(java.lang.String text,
java.lang.String delimiter)
Parses a String into doubles separated by a specified delimiter. |
protected static double[][] |
parseDoubles(java.lang.String text,
java.lang.String rowDelimiter,
java.lang.String colDelimiter)
Parses a String into doubles separated by specified row and column delimiters. |
protected static java.lang.String[] |
parseStrings(java.lang.String text,
java.lang.String delimiter)
Parses a String into tokens separated by a specified delimiter. |
protected static java.lang.String[][] |
parseStrings(java.lang.String text,
java.lang.String rowDelimiter,
java.lang.String colDelimiter)
Parses a String into tokens separated by specified row and column delimiters. |
protected static java.lang.String |
paste()
Pastes from the clipboard and returns the pasted string. |
void |
propertyChange(java.beans.PropertyChangeEvent e)
Listens for property changes "function" |
protected java.lang.String |
readFirstLine(java.io.Reader in)
|
protected void |
refreshDataBuilder()
Refreshes the data builder. |
protected void |
refreshGUI()
Refreshes the GUI. |
protected void |
refreshMenubar()
|
protected void |
refreshTabTitles()
|
protected boolean |
removeAllButTab(int index)
Removes all tabs except the specified index. |
protected boolean |
removeAllTabs()
Removes all tabs. |
DataToolTab |
removeTab(DataToolTab tab)
Removes a specified tab. |
DataToolTab |
removeTab(int index,
boolean saveChanges)
Removes the tab at the specified index. |
protected java.lang.String |
save(DataToolTab tab,
java.lang.String fileName)
Saves a tab to the specified file. |
protected java.lang.String |
save(java.lang.String fileName)
Saves the current tab to the specified file. |
protected java.lang.String |
saveAs()
Saves the current tab to a file selected with a chooser. |
protected boolean |
saveChangesAt(int i)
Offers to save changes to the tab at the specified index. |
void |
send(Job job,
Tool replyTo)
Sends a job to this tool and specifies a tool to reply to. |
void |
setDefaultCloseOperation(int operation)
Overrides OSPFrame method. |
void |
setFontLevel(int level)
Sets the font level. |
void |
setSaveChangesOnClose(boolean save)
Sets the saveChangesOnClose flag. |
void |
setSelectedTab(DataToolTab tab)
Selects a DataToolTab. |
void |
setUseChooser(boolean useChooser)
Sets the useChooser flag. |
protected void |
showAboutDialog()
Shows the about dialog. |
protected static void |
showHelp(java.lang.String fileName)
Shows the help frame and displays the specified help file. |
protected static java.lang.String |
write(java.lang.String text,
java.lang.String fileName)
Writes text to a file with the specified name. |
protected static void |
write(java.lang.String text,
java.io.Writer out)
Writes text to a Writer. |
Methods inherited from class org.opensourcephysics.display.OSPFrame |
---|
addButton, addChildFrame, bufferStrategyShow, clearChildFrames, clearDataAndRepaint, createBufferStrategy, dispose, getChildFrames, getChooser, getConstructorThreadGroup, getMenu, invalidateImage, isAnimated, isAutoclear, isIconified, isKeepHidden, loadDisplayMenu, loadToolsMenu, parseXMLMenu, parseXMLMenu, removeMenu, removeMenuItem, render, setAnimated, setAutoclear, setKeepHidden, setSize, setTitle, setVisible, show, wishesToExit |
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, toBack, toFront |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, 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, 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, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opensourcephysics.display.AppFrame |
---|
getDefaultCloseOperation |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static boolean loadClass
protected static javax.swing.JFileChooser chooser
protected static java.awt.Dimension dim
protected static final int defaultButtonHeight
protected static int buttonHeight
protected static java.lang.String[] delimiters
protected static TextFrame helpFrame
protected static java.lang.String helpName
protected static java.lang.String helpBase
protected javax.swing.JTabbedPane tabbedPane
protected boolean useChooser
protected javax.swing.JPanel contentPane
protected java.beans.PropertyChangeSupport support
protected XMLControlElement control
protected Data addableData
protected boolean controlContainsData
protected javax.swing.JMenuBar emptyMenubar
protected javax.swing.JMenu emptyFileMenu
protected javax.swing.JMenuItem emptyNewTabItem
protected javax.swing.JMenuItem emptyOpenItem
protected javax.swing.JMenuItem emptyExitItem
protected javax.swing.JMenu emptyEditMenu
protected javax.swing.JMenuItem emptyPasteItem
protected javax.swing.JMenuBar menubar
protected javax.swing.JMenu fileMenu
protected javax.swing.JMenuItem newTabItem
protected javax.swing.JMenuItem openItem
protected javax.swing.JMenuItem importItem
protected javax.swing.JMenuItem exportItem
protected javax.swing.JMenuItem saveItem
protected javax.swing.JMenuItem saveAsItem
protected javax.swing.JMenuItem closeItem
protected javax.swing.JMenuItem closeAllItem
protected javax.swing.JMenuItem printItem
protected javax.swing.JMenuItem exitItem
protected javax.swing.JMenu editMenu
protected javax.swing.JMenuItem undoItem
protected javax.swing.JMenuItem redoItem
protected javax.swing.JMenu copyMenu
protected javax.swing.JMenuItem copyImageItem
protected javax.swing.JMenuItem copyTabItem
protected javax.swing.JMenuItem copyDataItem
protected javax.swing.JMenu pasteMenu
protected javax.swing.JMenuItem pasteTabItem
protected javax.swing.JMenuItem pasteColumnsItem
protected javax.swing.JMenu displayMenu
protected javax.swing.JMenu languageMenu
protected javax.swing.JMenuItem[] languageItems
protected javax.swing.JMenu fontSizeMenu
protected javax.swing.JMenuItem defaultFontSizeItem
protected javax.swing.JMenu helpMenu
protected javax.swing.JMenuItem helpItem
protected javax.swing.JMenuItem logItem
protected javax.swing.JMenuItem aboutItem
protected FunctionTool dataBuilder
protected int fontLevel
protected boolean exitOnClose
protected boolean saveChangesOnClose
Constructor Detail |
---|
public DataTool()
public DataTool(java.lang.String fileName)
fileName
- the name of the xml filepublic DataTool(XMLControl control)
control
- the xml controlpublic DataTool(Data data)
data
- the dataprotected DataTool(java.lang.String title, java.lang.String name)
Method Detail |
---|
public static DataTool getTool()
public static void main(java.lang.String[] args)
args
- args[0] may be a data or xml file namepublic void setSaveChangesOnClose(boolean save)
save
- true to save changes when exitingpublic java.util.ArrayList<DataToolTab> addTabs(XMLControl control)
control
- the xml control
public static java.util.ArrayList<DataToolTab> createTabs(Data source)
source
- the source Data
public DataToolTab removeTab(int index, boolean saveChanges)
index
- the tab number
public DataToolTab removeTab(DataToolTab tab)
tab
- the tab
public java.util.ArrayList<DataToolTab> loadData(Data data)
data
- the Data
public DataToolTab loadData(Data... data)
data
- one or more Data objects
public DataToolTab getTab(Data data)
data
- the Data
public DataToolTab getTab(int index)
index
- the tab index
public int getTabCount()
public java.lang.String open(java.lang.String fileName)
fileName
- the file name
public java.lang.String importFileIntoTab(DataToolTab tab, java.lang.String fileName)
tab
- the tabfileName
- the file name
public void send(Job job, Tool replyTo) throws java.rmi.RemoteException
send
in interface Tool
job
- the JobreplyTo
- the tool to notify when the job is complete (may be null)
java.rmi.RemoteException
public void setUseChooser(boolean useChooser)
useChooser
- true to load datasets with a chooserpublic boolean isUseChooser()
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange
in interface java.beans.PropertyChangeListener
e
- the eventprotected static boolean containsDuplicateValues(double[] values)
values
- the array
protected static int getIndex(double value, double[] array, int ignoreIndex)
value
- the value to findarray
- the array to searchignoreIndex
- an array index to ignore
protected static double[] getRowArray(int rowCount)
rowCount
- length of the array
protected static java.lang.String[] parseStrings(java.lang.String text, java.lang.String delimiter)
text
- the text to parsedelimiter
- the delimiter
protected static double[] parseDoubles(java.lang.String text, java.lang.String delimiter)
text
- the text to parsedelimiter
- the delimiter
protected static double[] parseDoubles(java.lang.String[] strings)
strings
- the String array to parse
protected static java.lang.String[][] parseStrings(java.lang.String text, java.lang.String rowDelimiter, java.lang.String colDelimiter)
text
- the text to parserowDelimiter
- the column delimitercolDelimiter
- the column delimiter
protected static double[][] parseDoubles(java.lang.String text, java.lang.String rowDelimiter, java.lang.String colDelimiter)
text
- the text to parserowDelimiter
- the column delimitercolDelimiter
- the column delimiter
public static DatasetManager parseData(java.lang.String dataString, java.lang.String fileName)
dataString
- the data stringfileName
- name of file containing the data string (may be null)
protected java.lang.String readFirstLine(java.io.Reader in)
protected java.lang.String getUniqueTabName(java.lang.String proposed)
proposed
- the proposed name
public static java.util.ArrayList<Dataset> getDatasets(Data source)
source
- the self-contained Data
public static java.util.ArrayList<Dataset> getAllDatasets(Data source)
source
- a self-contained or container Data object
protected static java.util.ArrayList<Data> getSelfContainedData(Data container)
container
- the container Data
protected static java.util.ArrayList<DataColumn> getDataColumns(Data source)
source
- a self-contained Data object
protected static java.util.ArrayList<DataColumn> getAllDataColumns(Data source)
source
- a self-contained or container Data object
protected static double[] insert(double input, double[] array, int trend)
input
- the value to insertarray
- the array into which the value is insertedtrend
- positive if array is ascending, negative if descending, 0 if neither
public void addTab(DataToolTab tab)
tab
- a DataToolTabprotected boolean saveChangesAt(int i)
i
- the tab index
public DataToolTab getSelectedTab()
public void setSelectedTab(DataToolTab tab)
tab
- the tab to selectpublic void clearData()
clearData
in class OSPFrame
public void setFontLevel(int level)
setFontLevel
in class OSPFrame
level
- the levelprotected static java.lang.String write(java.lang.String text, java.lang.String fileName)
text
- the textfileName
- the file name
protected static void write(java.lang.String text, java.io.Writer out)
text
- the textout
- the Writerprotected java.lang.String open()
protected java.lang.String importFileIntoTab(DataToolTab tab)
tab
- the tab to import into
protected java.lang.String save(java.lang.String fileName)
fileName
- the file name
protected java.lang.String save(DataToolTab tab, java.lang.String fileName)
tab
- the tabfileName
- the file name
protected java.lang.String saveAs()
protected int getTabIndex(Data data)
data
- the Data
protected int getTabIndex(DataToolTab tab)
tab
- the tab
protected boolean removeAllButTab(int index)
index
- the tab number
protected boolean removeAllTabs()
protected void refreshTabTitles()
protected void refreshMenubar()
protected FunctionTool getDataBuilder()
protected void refreshDataBuilder()
protected static void copy(java.lang.String text)
text
- the string to copyprotected static java.lang.String paste()
protected static void showHelp(java.lang.String fileName)
fileName
- the name of the help filepublic void setDefaultCloseOperation(int operation)
setDefaultCloseOperation
in interface AppFrame
setDefaultCloseOperation
in class OSPFrame
operation
- the operationAppFrame.getDefaultCloseOperation()
protected void createGUI()
protected void refreshGUI()
refreshGUI
in class OSPFrame
protected boolean hasPastableData()
protected boolean hasPastableColumns(DataToolTab tab)
tab
- the tab
protected void showAboutDialog()
protected static javax.swing.JButton createButton(java.lang.String text)
text
- the button text
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |