NASA World Wind

gov.nasa.worldwindx.examples
Class SplitPaneUsage

java.lang.Object
  extended by gov.nasa.worldwindx.examples.SplitPaneUsage

public class SplitPaneUsage
extends Object

Illustrates how to use World Wind 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.


Nested Class Summary
static class SplitPaneUsage.AppPanel
           
 
Constructor Summary
SplitPaneUsage()
           
 
Method Summary
static void main(String[] args)
           
static void start(String appName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitPaneUsage

public SplitPaneUsage()
Method Detail

main

public static void main(String[] args)

start

public static void start(String appName)

NASA World Wind