public class DataTool extends OSPFrame implements Tool, java.beans.PropertyChangeListener
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
protected javax.swing.JMenuItem |
aboutItem |
protected javax.swing.JMenu |
addMenu |
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 XMLControl |
control |
protected javax.swing.JMenuItem |
copyDataItem |
protected javax.swing.JMenuItem |
copyImageItem |
protected javax.swing.JMenu |
copyMenu |
protected javax.swing.JMenuItem |
copyTabItem |
protected FunctionTool |
dataFunctionTool |
protected static java.awt.Dimension |
dim |
protected javax.swing.JMenu |
divideMenu |
protected javax.swing.JMenu |
editMenu |
protected javax.swing.JMenuItem |
exitItem |
protected javax.swing.JMenu |
fileMenu |
protected java.lang.String |
helpBase |
protected TextFrame |
helpFrame |
protected javax.swing.JMenuItem |
helpItem |
protected javax.swing.JLabel |
helpLabel |
protected javax.swing.JMenu |
helpMenu |
protected java.lang.String |
helpPath |
protected JobManager |
jobManager |
static boolean |
loadClass |
protected static OSPLog |
log |
protected javax.swing.JMenuItem |
logItem |
protected javax.swing.JMenu |
multiplyMenu |
protected javax.swing.JMenuItem |
openItem |
protected javax.swing.JMenuItem |
pasteColumnsItem |
protected javax.swing.JMenu |
pasteMenu |
protected javax.swing.JMenuItem |
pasteNewTabItem |
protected javax.swing.JMenuItem |
printItem |
protected javax.swing.JMenuItem |
saveAsItem |
protected javax.swing.JMenuItem |
saveItem |
protected javax.swing.JMenu |
subtractMenu |
protected java.beans.PropertyChangeSupport |
support |
protected javax.swing.JTabbedPane |
tabbedPane |
protected boolean |
useChooser |
animated, autoclear, buttonPanel, childFrames, constructorThreadGroup, customButtons, keepHidden, strategy
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
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
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Modifier | Constructor and Description |
---|---|
|
DataTool()
Constructs a blank DataTool.
|
|
DataTool(Data data)
Constructs a DataTool and loads the specified data object.
|
|
DataTool(Data data,
java.lang.String name)
Constructs a DataTool and loads a data object into a named tab.
|
|
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.
|
Modifier and Type | Method and Description |
---|---|
DataToolTab |
addTab(Data data)
Adds a tab for the specified Data object.
|
DataToolTab |
addTab(Data data,
java.lang.String name)
Adds a tab for the specified Data object and proposes a name
for the tab.
|
protected void |
addTab(DataToolTab tab)
Adds a tab.
|
DataToolTab |
addTab(XMLControl control)
Adds a tab and loads data from an xml control.
|
protected static javax.swing.JButton |
createButton(java.lang.String text)
Creates a button with a specified maximum height.
|
protected void |
createGUI()
Creates the GUI.
|
protected FunctionTool |
getDataFunctionTool()
Gets the function tool for defining custom data functions.
|
protected DataToolTab |
getSelectedTab()
Gets the currently selected DataToolTab, if any.
|
DataToolTab |
getTab(Data data)
Returns the tab containing 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.
|
static DataTool |
getTool()
Gets the shared DataTool.
|
protected java.lang.String |
getUniqueName(java.lang.String proposed)
Gets a unique name.
|
boolean |
isUseChooser()
Gets the useChooser flag.
|
protected DataToolTab |
loadData(Data data,
DataToolTab tab)
Loads data into a specified tab.
|
protected DataToolTab |
loadData(DataToolTab tab,
XMLControl control,
boolean useChooser)
Loads data from an xml control into a specified tab.
|
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.
|
void |
propertyChange(java.beans.PropertyChangeEvent e)
Listens for property changes "function" and "visible"
|
protected void |
refreshFunctionTool()
Refreshes the function tool.
|
protected void |
refreshGUI()
Refreshes the GUI.
|
protected void |
refreshTabTitles() |
protected void |
removeAllButTab(int index)
Removes all tabs except the specified index.
|
protected void |
removeAllTabs()
Removes all tabs.
|
DataToolTab |
removeTab(Data data)
Adds a tab for the specified Data object.
|
void |
removeTab(int index)
Removes the tab at the specified index.
|
protected java.lang.String |
save(java.lang.String fileName)
Saves the current xml control to the specified file.
|
protected java.lang.String |
saveAs()
Saves the currently displayed xml control to a file selected with a chooser.
|
void |
send(Job job,
Tool replyTo)
Sends a job to this tool and specifies a tool to reply to.
|
protected void |
setSelectedTab(DataToolTab tab)
Selects a DataToolTab.
|
void |
setUseChooser(boolean useChooser)
Sets the useChooser flag.
|
protected void |
showAboutDialog()
Shows the about dialog.
|
void |
update(Data data)
Updates the data.
|
addButton, addChildFrame, bufferStrategyShow, clearChildFrames, clearData, clearDataAndRepaint, createBufferStrategy, dispose, getChildFrames, getChooser, getConstructorThreadGroup, getMenu, invalidateImage, isAnimated, isAutoclear, isIconified, isKeepHidden, loadDisplayMenu, loadToolsMenu, parseXMLMenu, parseXMLMenu, removeMenu, removeMenuItem, render, setAnimated, setAutoclear, setDefaultCloseOperation, setFontLevel, setKeepHidden, setSize, setTitle, setVisible, show, wishesToExit
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
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setType, toBack, toFront
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, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, 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, 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, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDefaultCloseOperation
public static boolean loadClass
protected static javax.swing.JFileChooser chooser
protected static OSPLog log
protected static java.awt.Dimension dim
protected static int buttonHeight
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
protected javax.swing.JMenu fileMenu
protected javax.swing.JMenuItem openItem
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.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 pasteNewTabItem
protected javax.swing.JMenuItem pasteColumnsItem
protected javax.swing.JMenu helpMenu
protected javax.swing.JMenuItem helpItem
protected javax.swing.JMenuItem logItem
protected javax.swing.JMenuItem aboutItem
protected FunctionTool dataFunctionTool
protected javax.swing.JLabel helpLabel
protected TextFrame helpFrame
protected java.lang.String helpPath
protected java.lang.String helpBase
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 datapublic DataTool(Data data, java.lang.String name)
data
- the dataname
- the tab nameprotected DataTool(java.lang.String title, java.lang.String name)
public static DataTool getTool()
public DataToolTab addTab(XMLControl control)
control
- the xml controlpublic DataToolTab addTab(Data data)
data
- the Datapublic DataToolTab addTab(Data data, java.lang.String name)
data
- the Dataname
- a proposed tab namepublic DataToolTab removeTab(Data data)
data
- the Datapublic void removeTab(int index)
index
- the tab numberpublic void update(Data data)
data
- the Datapublic DataToolTab getTab(Data data)
data
- the Datasetpublic DataToolTab getTab(int index)
index
- the tab indexpublic int getTabCount()
public java.lang.String open(java.lang.String fileName)
fileName
- the file namepublic void send(Job job, Tool replyTo) throws 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 java.lang.String getUniqueName(java.lang.String proposed)
proposed
- the proposed nameprotected DataToolTab loadData(DataToolTab tab, XMLControl control, boolean useChooser)
tab
- the tab to load (may be null)control
- the xml control describing the datauseChooser
- true to present data choices to userprotected DataToolTab loadData(Data data, DataToolTab tab)
tab
- the tab to load (may be null)protected void addTab(DataToolTab tab)
tab
- a DataToolTabprotected DataToolTab getSelectedTab()
protected void setSelectedTab(DataToolTab tab)
tab
- the tab to selectprotected java.lang.String open()
protected java.lang.String save(java.lang.String fileName)
fileName
- the file nameprotected java.lang.String saveAs()
protected int getTabIndex(Data data)
data
- the Datasetprotected void removeAllButTab(int index)
index
- the tab numberprotected void removeAllTabs()
protected void refreshTabTitles()
protected FunctionTool getDataFunctionTool()
protected void refreshFunctionTool()
protected void createGUI()
protected void refreshGUI()
refreshGUI
in class OSPFrame
protected void showAboutDialog()
protected static javax.swing.JButton createButton(java.lang.String text)
text
- the button texth
- the button height