ArrayFrame, ControlFrame, DataTableFrame, DataTool, DrawingFrame, DrawingFrame3D, GridTableFrame, ImageFrame, TableFramepublic class OSPFrame extends javax.swing.JFrame implements Hidable, AppFrame
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategyjava.awt.Container.AccessibleAWTContainer| Modifier and Type | Field | Description |
|---|---|---|
protected boolean |
animated |
Set to true if a simulation should automatically render this frame after every animation step.
|
protected boolean |
autoclear |
Set to true if a simulation should automatically clear the data when it is initialized.
|
protected javax.swing.JPanel |
buttonPanel |
|
protected java.util.Collection<javax.swing.JFrame> |
childFrames |
|
java.lang.ThreadGroup |
constructorThreadGroup |
The thread group that created this object.
|
protected java.util.ArrayList<javax.swing.JButton> |
customButtons |
|
protected boolean |
keepHidden |
|
protected java.awt.image.BufferStrategy |
strategy |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTCROSSHAIR_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| Constructor | Description |
|---|---|
OSPFrame() |
OSPFrame constructor.
|
OSPFrame(java.awt.Container contentPane) |
OSPFrame constructor with a new content pane.
|
OSPFrame(java.lang.String title) |
OSPFrame constructor with a title.
|
| Modifier and Type | Method | Description |
|---|---|---|
javax.swing.JButton |
addButton(java.lang.String methodName,
java.lang.String text,
java.lang.String toolTipText,
java.lang.Object target) |
Adds a custom button to the control's frame.
|
void |
addChildFrame(javax.swing.JFrame frame) |
Adds a child frame that depends on this frame.
|
void |
bufferStrategyShow() |
Shows (repaints) the frame useing the current BufferStrategy.
|
void |
clearChildFrames() |
Clears all frames from the child frame list.
|
void |
clearData() |
Clears data from drawing objects within this frame.
|
void |
clearDataAndRepaint() |
Clears data and repaints the drawing panel within this frame.
|
void |
createBufferStrategy() |
Creates a BufferStrategy based on the capabilites of the hardware.
|
void |
dispose() |
Disposes all resources.
|
java.util.Collection<javax.swing.JFrame> |
getChildFrames() |
Gets a copy of the ChildFrames collection.
|
static javax.swing.JFileChooser |
getChooser() |
Deprecated.
use
OSPRuntime.getChooser()<\code>. |
java.lang.ThreadGroup |
getConstructorThreadGroup() |
Gets the ThreadGroup that constructed this frame.
|
javax.swing.JMenu |
getMenu(java.lang.String menuName) |
Gets a menu with the given name from the menu bar.
|
void |
invalidateImage() |
Invalidates image buffers if a drawing panel is buffered.
|
boolean |
isAnimated() |
Reads the animated property.
|
boolean |
isAutoclear() |
Reads the animated property.
|
boolean |
isIconified() |
Gets the ICONIFIED flag for this frame.
|
boolean |
isKeepHidden() |
Reads the keepHidden flag.
|
protected javax.swing.JMenu |
loadDisplayMenu() |
Adds a Display menu to the menu bar.
|
protected javax.swing.JMenu |
loadToolsMenu() |
Adds a Tools menu to the menu bar.
|
void |
parseXMLMenu(java.lang.String xmlMenu) |
|
void |
parseXMLMenu(java.lang.String xmlMenu,
java.lang.Class<?> type) |
|
protected void |
refreshGUI() |
Refreshes the user interface in response to display changes such as Language.
|
javax.swing.JMenu |
removeMenu(java.lang.String menuName) |
Removes a menu with the given name from the menu bar and returns the removed item.
|
javax.swing.JMenuItem |
removeMenuItem(java.lang.String menuName,
java.lang.String itemName) |
Removes a menu item with the given name from the menu bar and returns the removed item.
|
void |
render() |
Renders the frame.
|
void |
setAnimated(boolean animated) |
Sets the animated property.
|
void |
setAutoclear(boolean autoclear) |
Sets the autoclear property.
|
void |
setDefaultCloseOperation(int operation) |
Overrides JFrame method.
|
protected void |
setFontLevel(int level) |
Sets the font level.
|
void |
setKeepHidden(boolean _keepHidden) |
Sets the keepHidden flag.
|
void |
setSize(int width,
int height) |
|
void |
setTitle(java.lang.String title) |
Sets the title for this frame to the specified string after converting TeX math symbols to characters.
|
void |
setVisible(boolean b) |
Shows or hides this component depending on the value of parameter
b and the keepHidden flag. |
void |
show() |
Deprecated.
|
boolean |
wishesToExit() |
Returns true if this frame wishes to exit.
|
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, toString, 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, validateTreeaddNotify, 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, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, 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, toFrontprotected java.util.ArrayList<javax.swing.JButton> customButtons
protected boolean animated
protected boolean autoclear
public java.lang.ThreadGroup constructorThreadGroup
protected boolean keepHidden
protected java.awt.image.BufferStrategy strategy
protected javax.swing.JPanel buttonPanel
protected java.util.Collection<javax.swing.JFrame> childFrames
public OSPFrame(java.lang.String title)
title - public OSPFrame()
public OSPFrame(java.awt.Container contentPane)
contentPane - public static javax.swing.JFileChooser getChooser()
OSPRuntime.getChooser()<\code>.public void setTitle(java.lang.String title)
setTitle in class java.awt.Frametitle - the title to be displayed in the frame's border.
A null value
is treated as an empty string, "".Frame.getTitle()public void addChildFrame(javax.swing.JFrame frame)
frame - JFramepublic void clearChildFrames()
public java.util.Collection<javax.swing.JFrame> getChildFrames()
public boolean isIconified()
public void invalidateImage()
protected void setFontLevel(int level)
level - the levelpublic boolean isAnimated()
public void setAnimated(boolean animated)
animated - public boolean isAutoclear()
public void setAutoclear(boolean autoclear)
autoclear - protected javax.swing.JMenu loadDisplayMenu()
protected javax.swing.JMenu loadToolsMenu()
public void clearData()
public void clearDataAndRepaint()
public void setSize(int width,
int height)
setSize in class java.awt.Windowpublic void show()
show in class java.awt.Windowpublic void dispose()
dispose in class java.awt.Windowpublic void setVisible(boolean b)
b and the keepHidden flag.
OSP Applets often keep windows hidden.setVisible in class java.awt.Windowb - public void setKeepHidden(boolean _keepHidden)
setKeepHidden in interface Hidable_keepHidden - public boolean isKeepHidden()
isKeepHidden in interface Hidablepublic java.lang.ThreadGroup getConstructorThreadGroup()
public void createBufferStrategy()
public void bufferStrategyShow()
public void render()
public javax.swing.JMenu getMenu(java.lang.String menuName)
menuName - Stringpublic javax.swing.JMenu removeMenu(java.lang.String menuName)
menuName - Stringpublic javax.swing.JMenuItem removeMenuItem(java.lang.String menuName,
java.lang.String itemName)
menuName - Stringpublic void parseXMLMenu(java.lang.String xmlMenu)
public void parseXMLMenu(java.lang.String xmlMenu,
java.lang.Class<?> type)
protected void refreshGUI()
public javax.swing.JButton addButton(java.lang.String methodName,
java.lang.String text,
java.lang.String toolTipText,
java.lang.Object target)
methodName - the name of the method; the method has no parameterstext - the button's text labeltoolTipText - the button's tool tip texttarget - the target for the methodpublic void setDefaultCloseOperation(int operation)
setDefaultCloseOperation in interface AppFramesetDefaultCloseOperation in class javax.swing.JFrameoperation - the operationAppFrame.getDefaultCloseOperation()public boolean wishesToExit()
wishesToExit in interface AppFrame