-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
73 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,39 @@ | ||
package edu.miami.cyto3d.internal; | ||
|
||
import javax.media.opengl.GLCapabilities; | ||
import javax.media.opengl.GLProfile; | ||
import javax.media.opengl.awt.GLCanvas; | ||
import javax.swing.JDialog; | ||
import javax.swing.JFrame; | ||
|
||
public class C3DApp { | ||
|
||
public static final String APP_NAME = "Cyto3D"; | ||
public static final String APP_NAME = "Cyto3D"; | ||
|
||
private final JDialog settingsDialog; | ||
private final JDialog settingsDialog; | ||
private final JFrame rendererFrame; | ||
|
||
public C3DApp(JFrame mainAppFrame) { | ||
settingsDialog = new JDialog(mainAppFrame, APP_NAME); | ||
} | ||
public C3DApp(JFrame mainAppFrame) { | ||
|
||
// initialize OpenGL context | ||
GLProfile glp = GLProfile.get(GLProfile.GL2); | ||
GLCapabilities glc = new GLCapabilities(glp); | ||
GLCanvas canvas = new GLCanvas(glc); | ||
|
||
// initialize settings dialog | ||
settingsDialog = new JDialog(mainAppFrame, APP_NAME); | ||
settingsDialog.setSize(600, 600); | ||
settingsDialog.setLocationRelativeTo(null); | ||
|
||
// initialize OpenGL renderer frame | ||
rendererFrame = new JFrame(APP_NAME); | ||
rendererFrame.setSize(600, 600); | ||
rendererFrame.setLocationRelativeTo(null); | ||
rendererFrame.add(canvas); | ||
} | ||
|
||
public void showSettings() { | ||
settingsDialog.setVisible(true); | ||
rendererFrame.setVisible(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters