|
|||||||||
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.display3d.simple3d.DrawingFrame3D
public class DrawingFrame3D
DrawingFrame: a frame that contains a generic drawing panel.
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 |
Nested classes/interfaces inherited from interface org.opensourcephysics.display3d.core.DrawingFrame3D |
---|
DrawingFrame3D.Loader |
Field Summary | |
---|---|
protected javax.swing.JFrame |
cameraInspectorFrame
|
protected javax.swing.JMenuItem |
cameraItem
|
protected javax.swing.JMenuItem |
copyItem
|
protected javax.swing.JMenuItem |
cursorCrosshairItem
|
protected javax.swing.JMenuItem |
cursorCubeItem
|
protected javax.swing.JMenu |
cursorMenu
|
protected javax.swing.JMenuItem |
cursorNoneItem
|
protected javax.swing.JMenuItem |
cursorXYZItem
|
protected javax.swing.JMenuItem |
decorationAxesItem
|
protected javax.swing.JMenuItem |
decorationCubeItem
|
protected javax.swing.JMenu |
decorationMenu
|
protected javax.swing.JMenuItem |
decorationNoneItem
|
protected javax.swing.JMenu |
displayMenu
|
protected javax.swing.JMenuItem |
displayNoPerspectiveItem
|
protected javax.swing.JMenuItem |
displayPerspectiveItem
|
protected javax.swing.JMenuItem |
displayXYItem
|
protected javax.swing.JMenuItem |
displayXZItem
|
protected javax.swing.JMenuItem |
displayYZItem
|
protected DrawingPanel3D |
drawingPanel
|
protected javax.swing.JMenu |
editMenu
|
protected javax.swing.JMenu |
fileMenu
|
protected javax.swing.JFrame |
lightInspectorFrame
|
protected javax.swing.JMenuItem |
lightItem
|
protected static int |
MENU_SHORTCUT_KEY_MASK
|
protected javax.swing.JMenuBar |
menuBar
|
protected javax.swing.JMenuItem |
pasteItem
|
protected javax.swing.JMenuItem |
replaceItem
|
protected javax.swing.JMenuItem |
resetCameraItem
|
protected javax.swing.JMenu |
visualMenu
|
protected javax.swing.JMenuItem |
zoomToFitItem
|
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 | |
---|---|
DrawingFrame3D()
Default DrawingFrame constructor |
|
DrawingFrame3D(DrawingPanel3D drawingPanel)
DrawingFrame constructor specifying the DrawingPanel that will be placed in the center of the content pane. |
|
DrawingFrame3D(java.lang.String title,
DrawingPanel3D _drawingPanel)
DrawingFrame constructor specifying the title and the DrawingPanel that will be placed in the center of the content pane. |
Method Summary | |
---|---|
protected void |
copyAction()
Copies objects found in the specified xml control. |
protected javax.swing.JFrame |
createLightInspectorFrame(DrawingPanel3D drawingPanel)
Dummy creator of a LightInspector. |
DrawingPanel3D |
getDrawingPanel3D()
Gets the drawing panel. |
javax.swing.JFrame |
getJFrame()
Getting the pointer to the real JFrame in it |
static XML.ObjectLoader |
getLoader()
|
javax.swing.JMenu |
getMenuItem(java.lang.String menuName)
Gets a menu with the given name from the menu bar. |
void |
inspectXML()
Inspects the drawing frame by using an xml document tree. |
protected javax.swing.JMenu |
loadToolsMenu()
Adds a Tools menu to the menu bar. |
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
Implementation of ClipboardOwner interface. |
protected void |
pasteAction()
Paste action |
javax.swing.JMenu |
removeMenuItem(java.lang.String menuName)
Removes a menu with the given name from the menu bar and returns the removed item. |
void |
render()
Renders the drawing panel if the frame is showing and not iconified. |
void |
replaceAction()
Replaces the drawables with the drawables found in the specified XML control. |
void |
saveXML()
|
void |
setDrawingPanel3D(DrawingPanel3D _drawingPanel)
Adds the drawing panel to the the frame. |
void |
setEnabledCopy(boolean enable)
Enables the copy edit menu item. |
void |
setEnabledPaste(boolean enable)
Enables the paste edit menu item. |
void |
setEnabledReplace(boolean enable)
Enables the replace edit menu item. |
void |
setMessage(java.lang.String msg)
Shows a message in a yellow text box in the lower right hand corner. |
void |
setMessage(java.lang.String msg,
int location)
Shows a message in a yellow text box. |
protected boolean |
supportsLightInspectors()
Whether this implementation supports LightInspectors |
Methods inherited from class org.opensourcephysics.display.OSPFrame |
---|
addButton, addChildFrame, bufferStrategyShow, clearChildFrames, clearData, clearDataAndRepaint, createBufferStrategy, dispose, getChildFrames, getChooser, getConstructorThreadGroup, getMenu, invalidateImage, isAnimated, isAutoclear, isIconified, isKeepHidden, loadDisplayMenu, parseXMLMenu, parseXMLMenu, refreshGUI, removeMenu, removeMenuItem, setAnimated, setAutoclear, setDefaultCloseOperation, setFontLevel, 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.display3d.core.DrawingFrame3D |
---|
setVisible |
Methods inherited from interface org.opensourcephysics.display.AppFrame |
---|
getDefaultCloseOperation |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
protected javax.swing.JMenu fileMenu
protected javax.swing.JMenu editMenu
protected javax.swing.JMenuItem copyItem
protected javax.swing.JMenuItem pasteItem
protected javax.swing.JMenuItem replaceItem
protected javax.swing.JMenu visualMenu
protected javax.swing.JMenu displayMenu
protected javax.swing.JMenu decorationMenu
protected javax.swing.JMenu cursorMenu
protected javax.swing.JMenuItem displayPerspectiveItem
protected javax.swing.JMenuItem displayNoPerspectiveItem
protected javax.swing.JMenuItem displayXYItem
protected javax.swing.JMenuItem displayXZItem
protected javax.swing.JMenuItem displayYZItem
protected javax.swing.JMenuItem decorationCubeItem
protected javax.swing.JMenuItem decorationNoneItem
protected javax.swing.JMenuItem decorationAxesItem
protected javax.swing.JMenuItem cursorNoneItem
protected javax.swing.JMenuItem cursorCubeItem
protected javax.swing.JMenuItem cursorXYZItem
protected javax.swing.JMenuItem cursorCrosshairItem
protected javax.swing.JMenuItem zoomToFitItem
protected javax.swing.JMenuItem resetCameraItem
protected javax.swing.JMenuItem cameraItem
protected javax.swing.JMenuItem lightItem
protected javax.swing.JFrame cameraInspectorFrame
protected javax.swing.JFrame lightInspectorFrame
protected javax.swing.JMenuBar menuBar
protected DrawingPanel3D drawingPanel
protected static final int MENU_SHORTCUT_KEY_MASK
Constructor Detail |
---|
public DrawingFrame3D()
public DrawingFrame3D(DrawingPanel3D drawingPanel)
drawingPanel
- public DrawingFrame3D(java.lang.String title, DrawingPanel3D _drawingPanel)
title
- _drawingPanel
- Method Detail |
---|
public void render()
render
in class OSPFrame
public void setMessage(java.lang.String msg)
msg
- public void setMessage(java.lang.String msg, int location)
msg
- location
- public DrawingPanel3D getDrawingPanel3D()
getDrawingPanel3D
in interface DrawingFrame3D
public void setDrawingPanel3D(DrawingPanel3D _drawingPanel)
setDrawingPanel3D
in interface DrawingFrame3D
_drawingPanel
- public javax.swing.JFrame getJFrame()
getJFrame
in interface DrawingFrame3D
public void setEnabledPaste(boolean enable)
enable
- booleanprotected void pasteAction()
public void setEnabledReplace(boolean enable)
enable
- booleanpublic void replaceAction()
protected void copyAction()
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
clipboard
- Clipboardcontents
- Transferablepublic void setEnabledCopy(boolean enable)
enable
- booleanprotected boolean supportsLightInspectors()
protected javax.swing.JFrame createLightInspectorFrame(DrawingPanel3D drawingPanel)
drawingPanel
-
protected javax.swing.JMenu loadToolsMenu()
loadToolsMenu
in class OSPFrame
public javax.swing.JMenu getMenuItem(java.lang.String menuName)
menuName
- String
public javax.swing.JMenu removeMenuItem(java.lang.String menuName)
menuName
- String
public void inspectXML()
public void saveXML()
public static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |