Class SplitPaneUsage


  • public class SplitPaneUsage
    extends java.lang.Object
    Illustrates how to use WorldWind within a Swing JSplitPane. Doing so is mostly straightforward, but in order to work around a Swing bug the WorldWindow must be placed within a JPanel and that JPanel's minimum preferred size must be set to zero (both width and height). See the code that does this in the first few lines of the AppPanel constructor below.

    This example also illustrates another bug in Swing that does not have a known workaround: the WorldWindow does not resize when a vertical split-pane's one-touch-expand widget is clicked if that split-pane contains a horizontal split-plane that contains the WorldWindow. If the one-touch widget is clicked on the bottom pane of this example, that pane will expand to the full height of the window but the WorldWindow will not change size and will display on top of the expanded pane. (The horizontal split pane's one-touch behavior works correctly.) If the panes are rearranged so that the WorldWindow and the bottom panel are in one vertical split pane, and that split pane is the right component of the horizontal split pane containing the layer panel, then the one-touch widgets work correctly for both JSplitPanes. This bug is related only to the one-touch widget. Moving the vertical split-pane interactively via the split-pane's handle works correctly.

    • Constructor Summary

      Constructors 
      Constructor Description
      SplitPaneUsage()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      static void start​(java.lang.String appName)  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SplitPaneUsage

        public SplitPaneUsage()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
      • start

        public static void start​(java.lang.String appName)