java.beans.PropertyChangeListener, java.util.EventListener, Control, MainFrame, AppFrame, HidableAnimationControl, CalculationControlpublic class OSPControl extends ControlFrame implements java.beans.PropertyChangeListener, MainFrame
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyjava.awt.Container.AccessibleAWTContainerBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTNOT_EDITABLE_BACKGROUNDclearItem, copyItem, displayMenu, editMenu, fileMenu, inspectItem, languageItems, languageMenu, logToFileItem, model, ospApp, printFrameItem, readItem, saveAsItem, saveFrameAsEPSItem, sizeDownItem, sizeUpItem, xmlDefaultCROSSHAIR_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_CURSORABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHanimated, autoclear, buttonPanel, childFrames, constructorThreadGroup, customButtons, keepHidden, strategy| Constructor | Description |
|---|---|
OSPControl(java.lang.Object _model) |
Constructs an OSPControl.
|
| Modifier and Type | Method | Description |
|---|---|---|
javax.swing.JButton |
addButton(java.lang.String methodName,
java.lang.String text) |
Adds a custom button to the control's frame.
|
javax.swing.JButton |
addButton(java.lang.String methodName,
java.lang.String text,
java.lang.String toolTipText) |
Adds a custom button to the control's frame.
|
void |
addControlListener(java.lang.String methodName) |
Adds a ControlTableListener that invokes method in the control's model.
|
void |
addControlListener(java.lang.String methodName,
java.lang.Object target) |
Adds a ControlTableListener that invokes method in the given object.
|
void |
calculationDone(java.lang.String message) |
A signal that a method has completed.
|
void |
clearMessages() |
Remove all text from the message area.
|
void |
clearValues() |
Remove all text from the data input area.
|
static OSPControl |
createApp(java.lang.Object model) |
Creates an OSP control and establishes communication between the control and the model.
|
boolean |
getBoolean(java.lang.String par) |
Reads a parameter value from the input display.
|
double |
getDouble(java.lang.String par) |
Reads a parameter value from the input display.
|
int |
getInt(java.lang.String par) |
Reads a parameter value from the input display.
|
static XML.ObjectLoader |
getLoader() |
Returns an XML.ObjectLoader to save and load data for this object.
|
OSPFrame |
getMainFrame() |
Gets this frame.
|
java.lang.Object |
getModel() |
|
java.lang.Object |
getObject(java.lang.String par) |
Gets the object with the specified property name.
|
java.util.Collection<java.lang.String> |
getPropertyNames() |
Reads the current property names.
|
java.lang.String |
getString(java.lang.String par) |
Reads a parameter value from the input display.
|
protected void |
init() |
Initializes this control after all objects have been created.
|
protected javax.swing.JMenu |
loadDisplayMenu() |
Adds a Display menu to the menu bar.
|
void |
print(java.lang.String s) |
Prints text in the message area.
|
void |
println() |
Prints a blank line in the message area.
|
void |
println(java.lang.String s) |
Prints a line of text in the message area.
|
void |
propertyChange(java.beans.PropertyChangeEvent e) |
Listens for property change events.
|
protected void |
refreshGUI() |
Refreshes the user interface in response to display changes such as Language.
|
void |
removeParameter(java.lang.String par) |
Removes a parameter from the table.
|
void |
setDividerLocation(int loc) |
Sets the location of the divider between the control table and the message panel.
|
void |
setEditable(java.lang.String parameter,
boolean editable) |
Sets the editable property of the given parameter so that it can not be changed from within the GUI.
|
void |
setLockValues(boolean lock) |
Locks the control's interface.
|
void |
setValue(java.lang.String par,
boolean val) |
Adds an initial boolean value of a parameter to the input display.
|
void |
setValue(java.lang.String par,
double val) |
Adds an initial value of a parameter to the input display.
|
void |
setValue(java.lang.String par,
int val) |
Adds an initial value of a parameter to the input display.
|
void |
setValue(java.lang.String par,
java.lang.Object val) |
Adds a parameter to the input display.
|
java.lang.String |
toString() |
Creates a string representation of the control parameters.
|
getDefaultCloseOperationaction, 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, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycleadd, 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, validateTreecopy, getOSPApp, inspectXML, loadXML, loadXML, loadXML, loadXML, readParameters, save, saveXMLaddNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setUndecoratedaddImpl, 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, updateaddChildFrame, clearChildFrames, getChildFrames, getOSPAppclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddButton, addChildFrame, bufferStrategyShow, clearChildFrames, clearData, clearDataAndRepaint, createBufferStrategy, dispose, getChildFrames, getChooser, getConstructorThreadGroup, getMenu, invalidateImage, isAnimated, isAutoclear, isIconified, isKeepHidden, loadToolsMenu, parseXMLMenu, parseXMLMenu, removeMenu, removeMenuItem, render, setAnimated, setAutoclear, setDefaultCloseOperation, setFontLevel, setKeepHidden, setSize, setTitle, setVisible, show, wishesToExitaddPropertyChangeListener, 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, toFrontpublic OSPControl(java.lang.Object _model)
_model - public OSPFrame getMainFrame()
getMainFrame in interface MainFrameprotected javax.swing.JMenu loadDisplayMenu()
loadDisplayMenu in class ControlFrameprotected void refreshGUI()
refreshGUI in class ControlFramepublic void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenere - the property change eventprotected void init()
public java.lang.Object getModel()
public void setDividerLocation(int loc)
loc - intpublic void setEditable(java.lang.String parameter,
boolean editable)
parameter - Stringeditable - booleanpublic void setLockValues(boolean lock)
setLockValues in interface Controllock - booleanpublic java.lang.String toString()
toString in class java.awt.Componentpublic void setValue(java.lang.String par,
java.lang.Object val)
public void setValue(java.lang.String par,
boolean val)
public void setValue(java.lang.String par,
double val)
public void setValue(java.lang.String par,
int val)
public void removeParameter(java.lang.String par)
par - the parameter namepublic double getDouble(java.lang.String par)
public int getInt(java.lang.String par)
public java.lang.Object getObject(java.lang.String par)
throws java.lang.UnsupportedOperationException
public java.lang.String getString(java.lang.String par)
public boolean getBoolean(java.lang.String par)
getBoolean in interface Controlpar - the parameter namepublic java.util.Collection<java.lang.String> getPropertyNames()
getPropertyNames in interface Controlpublic javax.swing.JButton addButton(java.lang.String methodName,
java.lang.String text)
methodName - the name of the method; the method has no parameterstext - the button's text labelpublic javax.swing.JButton addButton(java.lang.String methodName,
java.lang.String text,
java.lang.String toolTipText)
methodName - the name of the method; the method has no parameterstext - the button's text labeltoolTipText - the button's tool tip textpublic void addControlListener(java.lang.String methodName)
methodName - the name of the method; the method has no parameterspublic void addControlListener(java.lang.String methodName,
java.lang.Object target)
methodName - the name of the method; the method has no parameterstarget - the target for the methodpublic void println(java.lang.String s)
public void println()
public void print(java.lang.String s)
public void clearMessages()
clearMessages in interface Controlpublic void clearValues()
clearValues in interface Controlpublic void calculationDone(java.lang.String message)
calculationDone in interface Controlmessage - public static XML.ObjectLoader getLoader()
public static OSPControl createApp(java.lang.Object model)
model - Object