org.opensourcephysics.display
Class DrawingFrame

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by org.opensourcephysics.display.OSPFrame
                          extended by org.opensourcephysics.display.DrawingFrame
All Implemented Interfaces:
java.awt.datatransfer.ClipboardOwner, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, AppFrame, Hidable
Direct Known Subclasses:
Complex2DFrame, ComplexPlotFrame, DisplayFrame, FFT2DFrame, FFTFrame, HistogramFrame, LatticeFrame, ParticleFrame, PlotFrame, RasterFrame, Scalar2DFrame, Vector2DFrame, VideoFrame

public class DrawingFrame
extends OSPFrame
implements java.awt.datatransfer.ClipboardOwner

Drawing Frame: a frame that contains a drawing panel.

Version:
1.1
Author:
Wolfgang Christian
See Also:
Serialized Form

Nested Class Summary
protected static class DrawingFrame.DrawingFrameLoader
           
 
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
 
Field Summary
protected  javax.swing.JMenuItem copyItem
           
protected  java.awt.Window customInspector
           
protected  DrawingPanel drawingPanel
           
protected  javax.swing.JMenu editMenu
           
protected  javax.swing.JMenu fileMenu
           
protected static int MENU_SHORTCUT_KEY_MASK
           
protected  javax.swing.JMenuItem pasteItem
           
protected  javax.swing.JMenuItem replaceItem
           
protected  Tool reply
           
 
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
DrawingFrame()
          DrawingFrame constructor that creates a default DrawingPanel.
DrawingFrame(DrawingPanel drawingPanel)
          DrawingFrame constructor specifying the DrawingPanel that will be placed in the center of the content pane.
DrawingFrame(java.lang.String title, DrawingPanel _drawingPanel)
          DrawingFrame constructor specifying the title and the DrawingPanel that will be placed in the center of the content pane.
 
Method Summary
 void addDrawable(Drawable drawable)
          Adds a drawable object to the frame's drawing panel.
protected  void addMenuItems()
          Adds Views menu items on the menu bar.
 void clearDataAndRepaint()
          Clears data and repaints the drawing panel within this frame.
 void clearDrawables()
          Clears Drawable objects added by the user from this frame.
protected  void copyAction(XMLControlElement control)
          Copies objects found in the specified xml control.
 DrawableAxes getAxes()
           
 java.util.ArrayList<Drawable> getDrawables()
          Gets Drawable previously objects added by the user.
<T extends Drawable>
java.util.ArrayList<T>
getDrawables(java.lang.Class<T> c)
          Gets Drawable objects added by the user of an assignable type.
 DrawingPanel getDrawingPanel()
          Gets the drawing panel.
static XML.ObjectLoader getLoader()
          Returns an XML.ObjectLoader to save and load data for this program.
<T extends Drawable>
java.util.ArrayList<T>
getObjectOfClass(java.lang.Class<T> c)
          Gets objects of a specific class from the drawing panel.
 void inspectXML()
          Inspects the drawing frame by using an xml document tree.
 void invalidateImage()
          Invalidates image buffers if a drawing panel buffered.
 boolean isAutoscaleX()
          Determines if the panel's x axis autoscale property is true.
 boolean isAutoscaleY()
          Determines if the y axis autoscale property is true.
 void limitAutoscaleX(double floor, double ceil)
          Limits the xmin and xmax values during autoscaling so that the mininimum value will be no greater than the floor and the maximum value will be no smaller than the ceil.
 void limitAutoscaleY(double floor, double ceil)
          Limits ymin and ymax values during autoscaling so that the mininimum value will be no greater than the floor and the maximum value will be no smaller than the ceil.
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 lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
          Implementation of ClipboardOwner interface.
 void paint(java.awt.Graphics g)
          This is a hack to fix a bug when the reload button is pressed in browsers running JDK 1.4.
protected  void pasteAction(XMLControlElement control)
          Pastes drawables found in the specified xml control.
protected  void refreshGUI()
          Refreshes the user interface in response to display changes such as Language.
 void removeDrawable(Drawable drawable)
          Removes a drawable object to the frame's drawing panel.
<T extends Drawable>
void
removeObjectsOfClass(java.lang.Class<T> c)
          Removes all objects of the given class from the drawable list.
 void render()
          Renders the drawing panel if the frame is showing and not iconified.
 void replaceAction(XMLControlElement control)
          Replaces the drawables with the drawables found in the specified XML control.
 void replaceDrawable(Drawable oldDrawable, Drawable newDrawable)
          Replaces a Drawable object with another Drawable.
 void saveXML()
           
 void setAutoscaleX(boolean autoscale)
          Autoscale the drawing panel's x axis using min and max values.
 void setAutoscaleY(boolean autoscale)
          Autoscale the y axis using min and max values.
 void setCartesian(java.lang.String xLabel, java.lang.String yLabel, java.lang.String plotTitle)
          Converts to cartesian coordinates.
 void setCustomInspector(java.awt.Window w)
          Sets a custom properties inspector window.
 void setDrawingPanel(DrawingPanel _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 setInteractiveMouseHandler(InteractiveMouseHandler handler)
          Sets the interactive mouse handler if the drawing panel is an interactive panel.
 void setInteriorBackground(java.awt.Color color)
          Sets the interior background color for the current drawing panel.
 void setLogScale(boolean logX, boolean logY)
          Sets Cartesian axes to log scale.
 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 at the given location.
 void setPixelsPerUnit(boolean enable, double xPixPerUnit, double yPixPerUnit)
          Sets the scale using pixels per unit.
 void setPolar(java.lang.String plotTitle, double deltaR)
          Converts to polar coordinates.
 void setPreferredMinMax(double xmin, double xmax, double ymin, double ymax)
          Sets the drawing panel's preferred scale.
 void setPreferredMinMaxX(double xmin, double xmax)
          Sets the drawing panel's preferred scale in the horizontal direction.
 void setPreferredMinMaxY(double ymin, double ymax)
          Sets the drawing panel's preferred scale in the vertical direction.
 void setSquareAspect(boolean isSquare)
          Sets the aspect ratio for horizontal to vertical to unity when true<\code>.
 void setXLabel(java.lang.String label)
          Sets the label for the X (horizontal) axis.
 void setYLabel(java.lang.String label)
          Sets the label for the Y (vertical) axis.
 
Methods inherited from class org.opensourcephysics.display.OSPFrame
addButton, addChildFrame, bufferStrategyShow, clearChildFrames, clearData, createBufferStrategy, dispose, getChildFrames, getChooser, getConstructorThreadGroup, getMenu, isAnimated, isAutoclear, isIconified, isKeepHidden, parseXMLMenu, parseXMLMenu, 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, 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.display.AppFrame
getDefaultCloseOperation
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

fileMenu

protected javax.swing.JMenu fileMenu

editMenu

protected javax.swing.JMenu editMenu

copyItem

protected javax.swing.JMenuItem copyItem

pasteItem

protected javax.swing.JMenuItem pasteItem

replaceItem

protected javax.swing.JMenuItem replaceItem

drawingPanel

protected DrawingPanel drawingPanel

MENU_SHORTCUT_KEY_MASK

protected static final int MENU_SHORTCUT_KEY_MASK

customInspector

protected java.awt.Window customInspector

reply

protected Tool reply
Constructor Detail

DrawingFrame

public DrawingFrame()
DrawingFrame constructor that creates a default DrawingPanel. The default DrawingPanel is an InteractivePanel.


DrawingFrame

public DrawingFrame(DrawingPanel drawingPanel)
DrawingFrame constructor specifying the DrawingPanel that will be placed in the center of the content pane.

Parameters:
drawingPanel -

DrawingFrame

public DrawingFrame(java.lang.String title,
                    DrawingPanel _drawingPanel)
DrawingFrame constructor specifying the title and the DrawingPanel that will be placed in the center of the content pane.

Parameters:
title -
_drawingPanel -
Method Detail

render

public void render()
Renders the drawing panel if the frame is showing and not iconified.

Overrides:
render in class OSPFrame

invalidateImage

public void invalidateImage()
Invalidates image buffers if a drawing panel buffered.

Overrides:
invalidateImage in class OSPFrame

getDrawingPanel

public DrawingPanel getDrawingPanel()
Gets the drawing panel.

Returns:
the drawingPanel

setXLabel

public void setXLabel(java.lang.String label)
Sets the label for the X (horizontal) axis.

Parameters:
label - the label

setYLabel

public void setYLabel(java.lang.String label)
Sets the label for the Y (vertical) axis.

Parameters:
label - the label

setPolar

public void setPolar(java.lang.String plotTitle,
                     double deltaR)
Converts to polar coordinates.

Parameters:
plotTitle - String
deltaR - double

setCartesian

public void setCartesian(java.lang.String xLabel,
                         java.lang.String yLabel,
                         java.lang.String plotTitle)
Converts to cartesian coordinates.

Parameters:
xLabel - String
yLabel - String
plotTitle - String

limitAutoscaleX

public void limitAutoscaleX(double floor,
                            double ceil)
Limits the xmin and xmax values during autoscaling so that the mininimum value will be no greater than the floor and the maximum value will be no smaller than the ceil. Setting a floor or ceil value to Double.NaN<\code> will disable that limit.

Parameters:
floor - the xfloor value
ceil - the xceil value

limitAutoscaleY

public void limitAutoscaleY(double floor,
                            double ceil)
Limits ymin and ymax values during autoscaling so that the mininimum value will be no greater than the floor and the maximum value will be no smaller than the ceil. Setting a floor or ceil value to Double.NaN<\code> will disable that limit.

Parameters:
floor - the yfloor value
ceil - the yceil value

setAutoscaleX

public void setAutoscaleX(boolean autoscale)
Autoscale the drawing panel's x axis using min and max values. from measurable objects.

Parameters:
autoscale -

isAutoscaleX

public boolean isAutoscaleX()
Determines if the panel's x axis autoscale property is true.

Returns:
true<\code> if autoscaled.

setAutoscaleY

public void setAutoscaleY(boolean autoscale)
Autoscale the y axis using min and max values. from measurable objects.

Parameters:
autoscale -

isAutoscaleY

public boolean isAutoscaleY()
Determines if the y axis autoscale property is true.

Returns:
true<\code> if autoscaled.

setSquareAspect

public void setSquareAspect(boolean isSquare)
Sets the aspect ratio for horizontal to vertical to unity when true<\code>.

Parameters:
isSquare - boolean

setLogScale

public void setLogScale(boolean logX,
                        boolean logY)
Sets Cartesian axes to log scale.

Parameters:
logX -
logY -

setPixelsPerUnit

public void setPixelsPerUnit(boolean enable,
                             double xPixPerUnit,
                             double yPixPerUnit)
Sets the scale using pixels per unit.

Parameters:
enable - boolean enable fixed pixels per unit
xPixPerUnit - double
yPixPerUnit - double

setPreferredMinMax

public void setPreferredMinMax(double xmin,
                               double xmax,
                               double ymin,
                               double ymax)
Sets the drawing panel's preferred scale.

Parameters:
xmin -
xmax -
ymin -
ymax -

setPreferredMinMaxY

public void setPreferredMinMaxY(double ymin,
                                double ymax)
Sets the drawing panel's preferred scale in the vertical direction.

Parameters:
ymin -
ymax -

setPreferredMinMaxX

public void setPreferredMinMaxX(double xmin,
                                double xmax)
Sets the drawing panel's preferred scale in the horizontal direction.

Parameters:
xmin - the minimum value
xmax - the maximum value

clearDataAndRepaint

public void clearDataAndRepaint()
Clears data and repaints the drawing panel within this frame.

Overrides:
clearDataAndRepaint in class OSPFrame

clearDrawables

public void clearDrawables()
Clears Drawable objects added by the user from this frame.


addDrawable

public void addDrawable(Drawable drawable)
Adds a drawable object to the frame's drawing panel.

Parameters:
drawable -

replaceDrawable

public void replaceDrawable(Drawable oldDrawable,
                            Drawable newDrawable)
Replaces a Drawable object with another Drawable.

Parameters:
oldDrawable - Drawable
newDrawable - Drawable

removeDrawable

public void removeDrawable(Drawable drawable)
Removes a drawable object to the frame's drawing panel.

Parameters:
drawable -

setMessage

public void setMessage(java.lang.String msg)
Shows a message in a yellow text box in the lower right hand corner.

Parameters:
msg -

setMessage

public void setMessage(java.lang.String msg,
                       int location)
Shows a message in a yellow text box at the given location. location 0=bottom left location 1=bottom right location 2=top right location 3=top left

Parameters:
msg -
location -

getObjectOfClass

public <T extends Drawable> java.util.ArrayList<T> getObjectOfClass(java.lang.Class<T> c)
Gets objects of a specific class from the drawing panel. Assignable subclasses are NOT returned. Interfaces CANNOT be specified. The same objects will be in the drawable list and the cloned list.

Parameters:
c - the class of the object
Returns:
the list

getDrawables

public java.util.ArrayList<Drawable> getDrawables()
Gets Drawable previously objects added by the user.

Returns:
the list

getAxes

public DrawableAxes getAxes()

getDrawables

public <T extends Drawable> java.util.ArrayList<T> getDrawables(java.lang.Class<T> c)
Gets Drawable objects added by the user of an assignable type. The list contains objects that are assignable from the class or interface.

Parameters:
c - the type of Drawable object
Returns:
the cloned list
See Also:
getObjectOfClass(Class c)

removeObjectsOfClass

public <T extends Drawable> void removeObjectsOfClass(java.lang.Class<T> c)
Removes all objects of the given class from the drawable list. Assignable subclasses are NOT removed. Interfaces CANNOT be specified.

Parameters:
c - the class

setInteractiveMouseHandler

public void setInteractiveMouseHandler(InteractiveMouseHandler handler)
Sets the interactive mouse handler if the drawing panel is an interactive panel. Throws an invalid cast exception if the panel is not of the correct type.

Parameters:
handler - the mouse handler

setDrawingPanel

public void setDrawingPanel(DrawingPanel _drawingPanel)
Adds the drawing panel to the the frame. The panel is added to the center of the frame's content pane.

Parameters:
_drawingPanel -

setInteriorBackground

public void setInteriorBackground(java.awt.Color color)
Sets the interior background color for the current drawing panel. The interior of a PlottingaPanel is the area inside the axes where is displayed. The interior of a DrawingPanel is the entire panel.


paint

public void paint(java.awt.Graphics g)
This is a hack to fix a bug when the reload button is pressed in browsers running JDK 1.4.

Overrides:
paint in class java.awt.Container
Parameters:
g -

setEnabledPaste

public void setEnabledPaste(boolean enable)
Enables the paste edit menu item.

Parameters:
enable - boolean

pasteAction

protected void pasteAction(XMLControlElement control)
Pastes drawables found in the specified xml control.

Parameters:
control - the xml control

setEnabledReplace

public void setEnabledReplace(boolean enable)
Enables the replace edit menu item.

Parameters:
enable - boolean

replaceAction

public void replaceAction(XMLControlElement control)
Replaces the drawables with the drawables found in the specified XML control.

Parameters:
control - XMLControlElement

copyAction

protected void copyAction(XMLControlElement control)
Copies objects found in the specified xml control.

Parameters:
control - the xml control

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
                          java.awt.datatransfer.Transferable contents)
Implementation of ClipboardOwner interface. Override this method to receive notification that data copied to the clipboard has changed.

Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner
Parameters:
clipboard - Clipboard
contents - Transferable

setEnabledCopy

public void setEnabledCopy(boolean enable)
Enables the copy edit menu item.

Parameters:
enable - boolean

refreshGUI

protected void refreshGUI()
Description copied from class: OSPFrame
Refreshes the user interface in response to display changes such as Language.

Overrides:
refreshGUI in class OSPFrame

addMenuItems

protected void addMenuItems()
Adds Views menu items on the menu bar. Override this method to add custom menu items.


loadDisplayMenu

protected javax.swing.JMenu loadDisplayMenu()
Adds a Display menu to the menu bar.

Overrides:
loadDisplayMenu in class OSPFrame

loadToolsMenu

protected javax.swing.JMenu loadToolsMenu()
Adds a Tools menu to the menu bar.

Overrides:
loadToolsMenu in class OSPFrame

setCustomInspector

public void setCustomInspector(java.awt.Window w)
Sets a custom properties inspector window.

Parameters:
w - the new inspector window

inspectXML

public void inspectXML()
Inspects the drawing frame by using an xml document tree.


saveXML

public void saveXML()

getLoader

public static XML.ObjectLoader getLoader()
Returns an XML.ObjectLoader to save and load data for this program.

Returns:
the object loader