Class DisplayGIS3D

  • All Implemented Interfaces:
    Renderer, ProjectionListener, IDisplay

    public class DisplayGIS3D
    extends AbstractDisplay
    Display for GIS 3D
    Author:
    Eric Tatara TODO GIS add separator layers that are always hidden with predefined String key IDs that can be used to separate layer types such as agent layers, network layers, coverage layers, wms layers, etc.
    • Field Detail

      • MIN_DEFAULT_ZOOM_ALTITUDE

        protected static final double MIN_DEFAULT_ZOOM_ALTITUDE
        See Also:
        Constant Field Values
      • updateLock

        protected Lock updateLock
      • panel

        protected JPanel panel
      • layout

        protected Layout layout
      • model

        protected gov.nasa.worldwind.Model model
      • globeLayers

        protected List<gov.nasa.worldwind.layers.Layer> globeLayers
      • coverageToRenderableMap

        protected Map<org.geotools.coverage.grid.GridCoverage2D,​gov.nasa.worldwind.render.SurfaceImage> coverageToRenderableMap
      • worldWindow

        protected gov.nasa.worldwind.awt.WorldWindowGLJPanel worldWindow
      • displayMode

        protected String displayMode
      • doRender

        protected boolean doRender
      • visible

        protected boolean visible
      • backgroundColor

        protected Color backgroundColor
      • roundGlobe

        protected gov.nasa.worldwind.globes.Globe roundGlobe
      • flatGlobe

        protected gov.nasa.worldwind.globes.FlatGlobe flatGlobe
      • trackAgents

        protected boolean trackAgents
      • boundingSector

        protected gov.nasa.worldwind.geom.Sector boundingSector
    • Method Detail

      • registerStyle

        public void registerStyle​(Class<?> clazz,
                                  StyleGIS<?> style)
        Register the agent class and style information
        Parameters:
        clazz - the agent class to style in the display
        style - the agent style
        order - the agent layer order in the display
      • registerNetworkStyle

        public void registerNetworkStyle​(Network<?> network,
                                         NetworkStyleGIS style)
        Register the network and style information
        Parameters:
        network - the network
        style - the network style
      • registerCoverageStyle

        public void registerCoverageStyle​(String coverageName,
                                          CoverageStyle<?> style)
        Register the dynamic coverage and style information
        Parameters:
        coverageName - the coverage name to style in the display
        style - the coverage style
        order - the coverage layer order in the display
      • createPanel

        public void createPanel()
      • getPanel

        public JPanel getPanel()
        Description copied from interface: IDisplay
        Gets a panel that contains the actual gui for visualization.
        Returns:
        a panel that contains the actual gui for visualization.
      • isVisible

        protected boolean isVisible()
      • probe

        public void probe​(gov.nasa.worldwind.event.SelectEvent event)
      • init

        public void init()
        Description copied from interface: IDisplay
        Initializes the display. Called once before the display is made visible.
      • createBackgroundLayer

        protected void createBackgroundLayer()
        Create a simple background layer that is a single colored rectangle that covers the entire globe.
      • createStaticRasterLayer

        protected gov.nasa.worldwind.layers.RenderableLayer createStaticRasterLayer​(String filename,
                                                                                    boolean forceLongitudeFirstAxis)
        Adds a static raster layer from the provided file. The raster BufferedImage is created and added to the WWJ Globe so that it persists as long as the display exists, but is not updated with display updates.
        Parameters:
        filename - the GIS raster filename to display
        forceLongitudeFirstAxis - true if lon should be forced first axis in coverage loader
      • destroy

        public void destroy()
        !!! Destroy needs to properly dispose and shutdown of WorldWind objects to prevent memory leaks !!!!
        Specified by:
        destroy in interface IDisplay
        Overrides:
        destroy in class AbstractDisplay
      • setLayout

        public void setLayout​(Layout layout)
        Description copied from interface: IDisplay
        Sets the Layout for the display to use.
        Parameters:
        layout - the layout to use
      • setLayoutFrequency

        public void setLayoutFrequency​(IDisplay.LayoutFrequency frequency,
                                       int interval)
        Description copied from interface: IDisplay
        Sets the frequency of the layout.
        Parameters:
        frequency - the frequency of the layout
        interval - the interval if the frequency is AT_INTERVAL. The interval is in terms of number of calls to update()
      • update

        public void update()
        Description copied from interface: IDisplay
        Updates the state of the display to reflect whatever it is that it is displaying.
      • render

        public void render()
        Description copied from interface: Renderer
        Render the display. This rendering should take place asynchronously on the AWT thread.
      • setPause

        public void setPause​(boolean pause)
        Description copied from interface: Renderer
        Pause the rendering. The Renderer should update and render if pause is true, if possible. The rendering should take place asynchronously on the AWT thread.
      • getLayout

        public Layout getLayout()
        Description copied from interface: IDisplay
        Gets the layout the display uses
        Returns:
        a layout object
      • getRegisteredClasses

        public List<Class> getRegisteredClasses()
      • createEditor

        public DisplayEditorLifecycle createEditor​(JPanel panel)
        Description copied from interface: IDisplay
        Creates an DisplayEditor appropriate for editing this display.
        Parameters:
        panel - a JPanel with a BorderLayout to which editor components can be added
        Returns:
        an DisplayEditor appropriate for editing this display or null if this display cannot be edited.
      • resetHomeView

        public void resetHomeView()
        Description copied from interface: IDisplay
        Resets the home (initial) view of the display
      • toggleAnaglyphStereo

        public void toggleAnaglyphStereo()
      • registerToolBar

        public void registerToolBar​(JToolBar bar)
        Description copied from class: AbstractDisplay
        Registers the specified toolbar with this IDisplay. This IDisplay can then put buttons etc. are on this toolbar. This is a default no-op implementation.
        Specified by:
        registerToolBar in interface IDisplay
        Overrides:
        registerToolBar in class AbstractDisplay
        Parameters:
        bar - the bar to register
      • initGlobes

        protected void initGlobes​(GISDisplayDescriptor.VIEW_TYPE viewType)
        Initialize the WWJ globe (flat/globe)
        Parameters:
        viewType - the view type (flat/globe)
      • isFlatGlobe

        public boolean isFlatGlobe()
      • setTrackAgents

        public void setTrackAgents​(boolean trackAgents)
      • enableRoundGlobe

        public void enableRoundGlobe​(boolean round)
      • toggleInfoProbe

        public void toggleInfoProbe()
      • getWwglCanvas

        public gov.nasa.worldwind.WorldWindow getWwglCanvas()
      • getLayerPanel

        public LayerPanel getLayerPanel()
      • deIconified

        public void deIconified()
        Description copied from interface: IDisplay
        Notifies this IDisplay that its associated gui widget has been deIconified.
      • iconified

        public void iconified()
        Description copied from interface: IDisplay
        Notifies this IDisplay that its associated gui widget has been iconified.
      • closed

        public void closed()
        Description copied from interface: IDisplay
        Notifies this IDisplay that its associated gui widget has been closed.
      • setBackgroundColor

        public void setBackgroundColor​(Color backgroundColor)