|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.opensourcephysics.display.OSPFrame
org.opensourcephysics.tools.DatasetTool
This provides a GUI for analyzing datasets.
Nested Class Summary |
Nested classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
protected javax.swing.JMenu |
addMenu
|
protected static javax.swing.JFileChooser |
chooser
|
protected javax.swing.JPanel |
contentPane
|
protected XMLControl |
control
|
protected static java.awt.Dimension |
dim
|
protected javax.swing.JMenu |
divideMenu
|
protected JobManager |
jobManager
|
protected static OSPLog |
log
|
protected javax.swing.JMenu |
multiplyMenu
|
protected javax.swing.JMenu |
subtractMenu
|
protected java.beans.PropertyChangeSupport |
support
|
protected javax.swing.JTabbedPane |
tabbedPane
|
protected boolean |
useChooser
|
Fields inherited from class org.opensourcephysics.display.OSPFrame |
animated, applet, appletMode, authorMode, autoclear, buttonPanel, chooserDir, constructorThreadGroup, customButtons, DEFAULT_LOOK_AND_FEEL, defaultLocales, keepHidden, launcherMode, osp_icon_file, 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 java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
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 | |
DatasetTool()
Constructs a blank DatasetTool. |
|
DatasetTool(Dataset dataset)
Constructs a DatasetTool and opens the specified dataset. |
|
DatasetTool(java.lang.String fileName)
Constructs a DatasetTool and opens the specified xml file. |
|
DatasetTool(XMLControl control)
Constructs a DatasetTool and opens datasets in the specified xml control. |
Method Summary | |
protected boolean |
addTab(Dataset dataset)
Adds or selects a tab for the specified dataset. |
protected void |
createGUI()
Creates the GUI. |
java.awt.Container |
getContentPane()
Gets the content pane. |
protected Dataset |
getDataset(int i)
Returns the dataset at the specified index. |
java.util.Collection |
getDatasets()
Returns all open datasets. |
Dataset |
getSelectedDataset()
Gets the dataset in the currently selected tab, if any. |
protected DatasetTab |
getSelectedTab()
Gets the currently selected tab (DatasetTab), if any. |
protected int |
getTabIndex(Dataset data)
Returns the index of the tab containing the specified Dataset. |
static DatasetTool |
getTool()
Gets the shared DatasetTool. |
boolean |
isUseChooser()
Gets the useChooser flag. |
java.util.Collection |
loadDatasets(XMLControl control)
Loads the datasets found in the specified xml control. |
java.util.Collection |
loadDatasets(XMLControl control,
boolean useChooser)
Loads the datasets found in the specified xml control. |
static void |
main(java.lang.String[] args)
Main entry point when used as application. |
protected java.lang.String |
open()
Opens an xml file selected with a chooser. |
java.lang.String |
open(java.lang.String fileName)
Opens an xml file specified by name. |
protected void |
refreshTabTitles()
|
protected void |
removeAllButTab(int index)
Removes all tabs except the specified index. |
protected void |
removeAllTabs()
Removes all tabs. |
protected void |
removeTab(int index)
Removes the specified tab. |
void |
send(Job job,
Tool replyTo)
Sends a job to this tool and specifies a tool to reply to. |
void |
setUseChooser(boolean useChooser)
Sets the useChooser flag. |
protected void |
showAboutDialog()
Shows the about dialog. |
void |
updateData(Dataset dataset)
|
Methods inherited from class org.opensourcephysics.display.OSPFrame |
addButton, bufferStrategyShow, clearData, clearDataAndRepaint, createBufferStrategy, dispose, getChooser, getConstructorThreadGroup, getDefaultLocales, getMenu, invalidateImage, isAnimated, isAuthorMode, isAutoclear, isIconified, isKeepHidden, isLauncherMode, loadDisplayMenu, loadToolsMenu, parseXMLMenu, parseXMLMenu, print, refreshGUI, removeMenu, removeMenuItem, render, setAnimated, setAuthorMode, setAutoclear, setDefaultCloseOperation, setFontLevel, setKeepHidden, setLauncherMode, setSize, setTitle, setVisible, show, wishesToExit |
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, 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, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, 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, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, 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, isOpaque, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
protected static javax.swing.JFileChooser chooser
protected static OSPLog log
protected static java.awt.Dimension dim
protected javax.swing.JTabbedPane tabbedPane
protected boolean useChooser
protected javax.swing.JPanel contentPane
protected java.beans.PropertyChangeSupport support
protected XMLControl control
protected JobManager jobManager
protected javax.swing.JMenu addMenu
protected javax.swing.JMenu subtractMenu
protected javax.swing.JMenu multiplyMenu
protected javax.swing.JMenu divideMenu
Constructor Detail |
public DatasetTool()
public DatasetTool(java.lang.String fileName)
fileName
- the name of the xml filepublic DatasetTool(Dataset dataset)
dataset
- the datasetpublic DatasetTool(XMLControl control)
control
- the xml controlMethod Detail |
public static DatasetTool getTool()
public java.lang.String open(java.lang.String fileName)
fileName
- 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 java.util.Collection loadDatasets(XMLControl control)
control
- the xml control
public java.util.Collection loadDatasets(XMLControl control, boolean useChooser)
control
- the xml controluseChooser
- true to present choices to user
public java.util.Collection getDatasets()
public java.awt.Container getContentPane()
getContentPane
in interface javax.swing.RootPaneContainer
public Dataset getSelectedDataset()
protected boolean addTab(Dataset dataset)
dataset
- the dataset
protected DatasetTab getSelectedTab()
protected java.lang.String open()
protected int getTabIndex(Dataset data)
data
- the Dataset
protected Dataset getDataset(int i)
i
- the tab index
public void updateData(Dataset dataset)
protected void removeTab(int index)
index
- the tab numberprotected void removeAllButTab(int index)
index
- the tab numberprotected void removeAllTabs()
protected void refreshTabTitles()
protected void createGUI()
protected void showAboutDialog()
public static void main(java.lang.String[] args)
args
- ignored
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |