Class DemoApp3D

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
edu.cnu.mdi.app.BaseMDIApplication
edu.cnu.mdi.mdi3D.app.DemoApp3D
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class DemoApp3D extends edu.cnu.mdi.app.BaseMDIApplication
Demo application for the MDI framework.

This class is intentionally "example-first": it demonstrates how a typical application:

  1. Creates the main application frame (BaseMDIApplication)
  2. Creates a few internal views (2D map, 3D, drawing, log)
  3. Optionally enables a VirtualView to simulate a virtual desktop
  4. Applies default view placement, then applies any persisted layout/config

The "virtual desktop" logic is driven by BaseMDIApplication's virtual desktop lifecycle hooks:

  • BaseMDIApplication.onVirtualDesktopReady() runs once after the frame is showing
  • BaseMDIApplication.onVirtualDesktopRelayout() runs (debounced) after resizes/moves
See Also:
  • Method Details

    • getVirtualDesktopColumns

      protected int getVirtualDesktopColumns()
      Overrides:
      getVirtualDesktopColumns in class edu.cnu.mdi.app.BaseMDIApplication
    • exitOnClose

      protected boolean exitOnClose()
      Overrides:
      exitOnClose in class edu.cnu.mdi.app.BaseMDIApplication
    • getInstance

      public static DemoApp3D getInstance()
      Public access to the singleton.
      Returns:
      the singleton main application frame
    • addInitialViews

      protected void addInitialViews()
      Create and register the initial set of views shown in the demo.

      This method only builds views; it should not depend on the outer frame being shown or on final geometry.

      Overrides:
      addInitialViews in class edu.cnu.mdi.app.BaseMDIApplication
    • defaultViewLayout

      protected void defaultViewLayout()
      Overrides:
      defaultViewLayout in class edu.cnu.mdi.app.BaseMDIApplication
    • main

      public static void main(String[] args)
      Entry point for the demo.
      Parameters:
      args - ignored