Class LinesOfSight.AppFrame

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
    Enclosing class:
    LinesOfSight

    public static class LinesOfSight.AppFrame
    extends ApplicationTemplate.AppFrame
    See Also:
    Serialized Form
    • 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, java.awt.Window.Type
      • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      AppFrame()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.List<Position> buildGrid​(Sector sector, double height, int nRows, int nCols)  
      protected void clearLayers()  
      protected void computeAndShow​(Position curPos)  
      protected Sector computeGridSector​(Position curPos, double gridRadius)  
      protected void computeIntersections()  
      protected void makeMenu()
      Makes the menu for loading shapes from shapefiles.
      protected void performIntersectionTests​(Position curPos)  
      protected void showCenterPoint​(Position cPos)  
      protected void showGrid​(java.util.List<Position> grid, Position cPos)  
      protected void showIntersection​(Intersection losi)  
      protected void showIntersections​(java.util.Queue<Intersection> intersections)  
      protected void showIntersectionsForPosition​(Position position)  
      protected void showNonIntersection​(Position position)  
      protected void showNonIntersections​(java.util.Collection<Position> positions)  
      protected void showResults()
      Updates the WorldWind model with the new intersection locations and sight lines.
      protected void showSightLine​(Position position)  
      protected void updateProgress()
      Keeps the progress meter current.
      • 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, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
      • Methods inherited from class java.awt.Frame

        addNotify, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
      • Methods inherited from class java.awt.Window

        addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, toBack, toFront
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, list, list, paintComponents, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, 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, hasFocus, imageUpdate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, list, list, list, 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, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.awt.MenuContainer

        getFont
    • Field Detail

      • calculationDispatchThread

        protected java.lang.Thread calculationDispatchThread
      • progressBar

        protected javax.swing.JProgressBar progressBar
      • grid

        protected java.util.List<Position> grid
      • referencePosition

        protected Position referencePosition
      • referencePoint

        protected Vec4 referencePoint
      • startTime

        protected long startTime
      • endTime

        protected long endTime
      • previousCurrentPosition

        protected Position previousCurrentPosition
      • updateProgressTimer

        protected java.util.Timer updateProgressTimer
      • numPositionsProcessed

        protected java.util.concurrent.atomic.AtomicInteger numPositionsProcessed
    • Constructor Detail

      • AppFrame

        public AppFrame()
    • Method Detail

      • computeAndShow

        protected void computeAndShow​(Position curPos)
      • performIntersectionTests

        protected void performIntersectionTests​(Position curPos)
                                         throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • clearLayers

        protected void clearLayers()
      • computeIntersections

        protected void computeIntersections()
      • computeGridSector

        protected Sector computeGridSector​(Position curPos,
                                           double gridRadius)
      • buildGrid

        protected java.util.List<Position> buildGrid​(Sector sector,
                                                     double height,
                                                     int nRows,
                                                     int nCols)
      • updateProgress

        protected void updateProgress()
        Keeps the progress meter current. When calculations are complete, displays the results.
      • showResults

        protected void showResults()
        Updates the WorldWind model with the new intersection locations and sight lines.
      • showIntersectionsForPosition

        protected void showIntersectionsForPosition​(Position position)
      • showSightLine

        protected void showSightLine​(Position position)
      • showIntersection

        protected void showIntersection​(Intersection losi)
      • showIntersections

        protected void showIntersections​(java.util.Queue<Intersection> intersections)
      • showNonIntersection

        protected void showNonIntersection​(Position position)
      • showNonIntersections

        protected void showNonIntersections​(java.util.Collection<Position> positions)
      • showGrid

        protected void showGrid​(java.util.List<Position> grid,
                                Position cPos)
      • showCenterPoint

        protected void showCenterPoint​(Position cPos)
      • makeMenu

        protected void makeMenu()
        Makes the menu for loading shapes from shapefiles.