package pointGroups.gui;

import java.awt.BorderLayout;
import java.util.concurrent.Future;

import javax.swing.JButton;
import javax.swing.JPanel;

import de.jreality.plugin.JRViewer;
import de.jreality.scene.Viewer;


public class PointPicker
  extends JPanel
{

  private static final long serialVersionUID = -3642299900579728806L;

  protected Future<JRViewer> viewerFuture;
  protected JRViewer pointPickerViewer;
  protected Viewer pointPickerView;

  public PointPicker() {
    super();

    setLayout(new BorderLayout());

    JButton button3 = new JButton("VIEW");
    PointPicker.this.add(button3, BorderLayout.PAGE_END);

    viewerFuture = UiViewer.viewerFactory(this);
  }

  public void dispose() {
    UiViewer.dispose(viewerFuture);
  }
}

@@ -52,44 +52,8 @@
 out;
-%0Aimport java.util.concurrent.Future;
 %0A%0Aim
@@ -129,56 +129,27 @@
 ity.
-plugin.JRViewer;%0Aimport de.jreality.scene.Viewer
+geometry.Primitives
 ;%0A%0A%0A
@@ -280,113 +280,52 @@
 ted 
-Future%3CJRViewer%3E viewerFuture;%0A  protected JRViewer pointPickerViewer;%0A  protected Viewer pointPickerView
+final UiViewer uiViewer = new UiViewer(this)
 ;%0A%0A 
@@ -508,50 +508,52 @@
     
-viewerFuture = UiViewer.viewerFactory(this
+uiViewer.setGeometry(Primitives.cylinder(15)
 );%0A 
@@ -586,17 +586,17 @@
 ) %7B%0A    
-U
+u
 iViewer.
@@ -607,20 +607,8 @@
 ose(
-viewerFuture
 );%0A 

use the UiViewer to manage jReality in the PointPicker