|
@@ -1,19 +1,13 @@
|
|
|
package de.andreasvoelker;
|
|
package de.andreasvoelker;
|
|
|
|
|
|
|
|
-import com.jogamp.opengl.GLCapabilities;
|
|
|
|
|
-import com.jogamp.opengl.GLProfile;
|
|
|
|
|
-import com.jogamp.opengl.awt.GLCanvas;
|
|
|
|
|
-import com.jogamp.opengl.util.Animator;
|
|
|
|
|
import net.miginfocom.swing.MigLayout;
|
|
import net.miginfocom.swing.MigLayout;
|
|
|
|
|
|
|
|
import javax.swing.*;
|
|
import javax.swing.*;
|
|
|
import java.io.*;
|
|
import java.io.*;
|
|
|
-import java.util.Locale;
|
|
|
|
|
-import java.util.Scanner;
|
|
|
|
|
|
|
|
|
|
public class MainWindows extends JFrame {
|
|
public class MainWindows extends JFrame {
|
|
|
- JButton button;
|
|
|
|
|
- BlochFrame blochFrame;
|
|
|
|
|
|
|
+ final JButton button;
|
|
|
|
|
+ final BlochFrame blochFrame;
|
|
|
|
|
|
|
|
MainWindows(){
|
|
MainWindows(){
|
|
|
super("BlochRender");
|
|
super("BlochRender");
|
|
@@ -24,10 +18,18 @@ public class MainWindows extends JFrame {
|
|
|
button = new JButton("Select File");
|
|
button = new JButton("Select File");
|
|
|
button.addActionListener(e -> chooseFile());
|
|
button.addActionListener(e -> chooseFile());
|
|
|
|
|
|
|
|
|
|
+ JLabel label = new JLabel("<html>Select a file with a trajectory to visualize it on a bloch sphere.<br>" +
|
|
|
|
|
+ "Each line consist of four floats separated by spaces.<br>"+
|
|
|
|
|
+ "The floats should be: time, occupation, real part of polarization, imaginary part of polarization.<br><br>"+
|
|
|
|
|
+ "The time is encoded as color and can be changed by changing the file \"colormap.png\".<br>"+
|
|
|
|
|
+ "Changes to the colormap currently require to restart this application.</html>");
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
setLayout(new MigLayout("fill"));
|
|
setLayout(new MigLayout("fill"));
|
|
|
|
|
|
|
|
add(blochFrame, "grow, span 1 2");
|
|
add(blochFrame, "grow, span 1 2");
|
|
|
add(button, "wrap");
|
|
add(button, "wrap");
|
|
|
|
|
+ add(label);
|
|
|
this.pack();
|
|
this.pack();
|
|
|
|
|
|
|
|
}
|
|
}
|