Class DrawingFrame3D

All Implemented Interfaces:
ClipboardOwner, ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, AppFrame, Hidable, DrawingFrame3D
Direct Known Subclasses:
Display3DFrame

public class DrawingFrame3D extends OSPFrame implements ClipboardOwner, DrawingFrame3D
DrawingFrame: a frame that contains a generic drawing panel.
Version:
March 2005
Author:
Francisco Esquembre, Adapted from Wolfgang Christian
See Also:
  • Field Details

    • fileMenu

      protected JMenu fileMenu
    • editMenu

      protected JMenu editMenu
    • copyItem

      protected JMenuItem copyItem
    • pasteItem

      protected JMenuItem pasteItem
    • replaceItem

      protected JMenuItem replaceItem
    • visualMenu

      protected JMenu visualMenu
    • displayMenu

      protected JMenu displayMenu
    • decorationMenu

      protected JMenu decorationMenu
    • cursorMenu

      protected JMenu cursorMenu
    • displayPerspectiveItem

      protected JMenuItem displayPerspectiveItem
    • displayNoPerspectiveItem

      protected JMenuItem displayNoPerspectiveItem
    • displayXYItem

      protected JMenuItem displayXYItem
    • displayXZItem

      protected JMenuItem displayXZItem
    • displayYZItem

      protected JMenuItem displayYZItem
    • decorationCubeItem

      protected JMenuItem decorationCubeItem
    • decorationNoneItem

      protected JMenuItem decorationNoneItem
    • decorationAxesItem

      protected JMenuItem decorationAxesItem
    • cursorNoneItem

      protected JMenuItem cursorNoneItem
    • cursorCubeItem

      protected JMenuItem cursorCubeItem
    • cursorXYZItem

      protected JMenuItem cursorXYZItem
    • cursorCrosshairItem

      protected JMenuItem cursorCrosshairItem
    • zoomToFitItem

      protected JMenuItem zoomToFitItem
    • resetCameraItem

      protected JMenuItem resetCameraItem
    • cameraItem

      protected JMenuItem cameraItem
    • lightItem

      protected JMenuItem lightItem
    • cameraInspectorFrame

      protected JFrame cameraInspectorFrame
    • lightInspectorFrame

      protected JFrame lightInspectorFrame
    • drawingPanel

      protected DrawingPanel3D drawingPanel
  • Constructor Details

    • DrawingFrame3D

      public DrawingFrame3D()
      Default DrawingFrame constructor
    • DrawingFrame3D

      public DrawingFrame3D(DrawingPanel3D drawingPanel)
      DrawingFrame constructor specifying the DrawingPanel that will be placed in the center of the content pane.
      Parameters:
      drawingPanel -
    • DrawingFrame3D

      public DrawingFrame3D(String title, DrawingPanel3D _drawingPanel)
      DrawingFrame constructor specifying the title and the DrawingPanel that will be placed in the center of the content pane.
      Parameters:
      title -
      _drawingPanel -
  • Method Details

    • render

      public void render()
      Renders the drawing panel if the frame is showing and not iconified.
      Overrides:
      render in class OSPFrame
    • setMessage

      public void setMessage(String msg)
      Shows a message in a yellow text box in the lower right hand corner.
      Parameters:
      msg -
    • setMessage

      public void setMessage(String msg, int location)
      Shows a message in a yellow text box. location 0=bottom left location 1=bottom right location 2=top right location 3=top left
      Parameters:
      msg -
      location -
    • getDrawingPanel3D

      public DrawingPanel3D getDrawingPanel3D()
      Gets the drawing panel.
      Specified by:
      getDrawingPanel3D in interface DrawingFrame3D
      Returns:
      the drawingPanel
    • setDrawingPanel3D

      public void setDrawingPanel3D(DrawingPanel3D _drawingPanel)
      Adds the drawing panel to the the frame. The panel is added to the center of the frame's content pane.
      Specified by:
      setDrawingPanel3D in interface DrawingFrame3D
      Parameters:
      _drawingPanel -
    • getJFrame

      public JFrame getJFrame()
      Getting the pointer to the real JFrame in it
      Specified by:
      getJFrame in interface DrawingFrame3D
      Returns:
      JFrame
    • setEnabledPaste

      public void setEnabledPaste(boolean enable)
      Enables the paste edit menu item.
      Parameters:
      enable - boolean
    • pasteAction

      protected void pasteAction()
      Paste action
    • setEnabledReplace

      public void setEnabledReplace(boolean enable)
      Enables the replace edit menu item.
      Parameters:
      enable - boolean
    • replaceAction

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

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

      public void lostOwnership(Clipboard clipboard, 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 ClipboardOwner
      Parameters:
      clipboard - Clipboard
      contents - Transferable
    • setEnabledCopy

      public void setEnabledCopy(boolean enable)
      Enables the copy edit menu item.
      Parameters:
      enable - boolean
    • supportsLightInspectors

      protected boolean supportsLightInspectors()
      Whether this implementation supports LightInspectors
      Returns:
    • createLightInspectorFrame

      protected JFrame createLightInspectorFrame(DrawingPanel3D drawingPanel)
      Dummy creator of a LightInspector. To be overwritten by packages that offer light inspectors
      Parameters:
      drawingPanel -
      Returns:
    • loadToolsMenu

      protected JMenu loadToolsMenu()
      Adds a Tools menu to the menu bar.
      Overrides:
      loadToolsMenu in class OSPFrame
    • getMenuItem

      public JMenu getMenuItem(String menuName)
      Gets a menu with the given name from the menu bar. Returns null if menu item does not exist.
      Parameters:
      menuName - String
      Returns:
      JMenu
    • removeMenuItem

      public JMenu removeMenuItem(String menuName)
      Removes a menu with the given name from the menu bar and returns the removed item. Returns null if menu item does not exist.
      Parameters:
      menuName - String
      Returns:
      JMenu
    • inspectXML

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

      public void saveXML()
    • getLoader

      public static XML.ObjectLoader getLoader()