diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java index 65071126dd1286317bc48b9afc5df9d6b1841b6c..b27c940d7a3825bb8b7ce8d7a003e82ecdea092e 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/RegistrationCPEventListener.java @@ -5,6 +5,7 @@ */ package cz.fidentis.analyst.gui; +import com.jogamp.opengl.GL2; import cz.fidentis.analyst.gui.canvas.Canvas; import cz.fidentis.analyst.gui.scene.DrawableMesh; import cz.fidentis.analyst.visitors.mesh.BoundingBox; @@ -204,4 +205,34 @@ public class RegistrationCPEventListener { canvas.renderScene(); } + public void setPrimaryLines() { + primaryFace.setRenderMode(GL2.GL_LINE); + canvas.renderScene(); + } + + public void setSecondaryLines() { + secondaryFace.setRenderMode(GL2.GL_LINE); + canvas.renderScene(); + } + + public void setPrimaryPoints() { + primaryFace.setRenderMode(GL2.GL_POINT); + canvas.renderScene(); + } + + public void setSecondaryPoints() { + secondaryFace.setRenderMode(GL2.GL_POINT); + canvas.renderScene(); + } + + public void setPrimaryFill() { + primaryFace.setRenderMode(GL2.GL_FILL); + canvas.renderScene(); + } + + public void setSecondaryFill() { + secondaryFace.setRenderMode(GL2.GL_FILL); + canvas.renderScene(); + } + } diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/DrawableMesh.java b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/DrawableMesh.java index 938434ed01e36fbe57ff9d8b78c29de3d29edb8c..8e460dae431104095062279647b74c75e95f4c3d 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/DrawableMesh.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/DrawableMesh.java @@ -1,5 +1,6 @@ package cz.fidentis.analyst.gui.scene; +import com.jogamp.opengl.GL2; import cz.fidentis.analyst.mesh.core.MeshFacet; import cz.fidentis.analyst.mesh.core.MeshModel; import java.awt.Color; @@ -26,6 +27,7 @@ public class DrawableMesh { private Vector3d translation = new Vector3d(0, 0, 0); private Vector3d rotation = new Vector3d(0, 0, 0); private Vector3d scale = new Vector3d(0, 0, 0); + private int renderMode = GL2.GL_FILL; /** * Constructor. @@ -123,4 +125,12 @@ public class DrawableMesh { this.highlights = highlights; } + public int getRenderMode() { + return renderMode; + } + + public void setRenderMode(int renderMode) { + this.renderMode = renderMode; + } + } diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java index f3d8df35e48b8493d3119ddcbd4f145220309d99..aa0b3b9b68597cfa8e1265e24c1d58624b59caa3 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/scene/SceneRenderer.java @@ -4,8 +4,6 @@ import com.jogamp.opengl.GL; import static com.jogamp.opengl.GL.GL_DEPTH_TEST; import static com.jogamp.opengl.GL.GL_FRONT_AND_BACK; import com.jogamp.opengl.GL2; -import static com.jogamp.opengl.GL2GL3.GL_FILL; -import static com.jogamp.opengl.GL2GL3.GL_LINE; import com.jogamp.opengl.glu.GLU; import cz.fidentis.analyst.mesh.core.MeshFacet; import java.awt.Color; @@ -122,15 +120,6 @@ public class SceneRenderer { upDirection.x, upDirection.y, upDirection.z); gl.glShadeModel(GL2.GL_SMOOTH); - //gl.glGetIntegerv(GL_VIEWPORT, viewport, 0); - //gl.glGetFloatv(GL_MODELVIEW_MATRIX, modelViewMatrix, 0); - //gl.glGetFloatv(GL_PROJECTION_MATRIX, projectionMatrix, 0); - - if (this.wireframe) { - gl.glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ); - } else { - gl.glPolygonMode( GL_FRONT_AND_BACK, GL_FILL); - } if (((DrawableMesh)drawables.toArray()[0]).getTransparency() != 1) { Collections.reverse((ArrayList)drawables); @@ -138,6 +127,7 @@ public class SceneRenderer { for (DrawableMesh obj: drawables) { + gl.glPolygonMode( GL_FRONT_AND_BACK, obj.getRenderMode()); setMaterial(obj); gl.glPushMatrix(); setTransformation(obj); diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.form b/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.form index 8bfe0555dfbd26d46aa84d749d698c63282ab49e..df9a2de7d19d8d3b6a0e8f6b8cb04dc246649ffe 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.form +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.form @@ -1,6 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> + <NonVisualComponents> + <Component class="javax.swing.ButtonGroup" name="primaryRenderModeGroup"> + </Component> + <Component class="javax.swing.ButtonGroup" name="secondaryRenerModeGroup"> + </Component> + </NonVisualComponents> <Properties> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Color blue="e2" green="e6" red="b0" type="rgb"/> @@ -37,7 +43,49 @@ <EmptySpace min="0" pref="0" max="32767" attributes="0"/> </Group> <Group type="102" attributes="0"> - <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="highlightsLabel" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="10" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="secondaryHighlightsCB" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="secondaryFillRB" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="fillLabel" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="primaryFillRB" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="renderModeLabel" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="linesLabel" min="-2" max="-2" attributes="0"/> + <Component id="primaryLinesRB" min="-2" max="-2" attributes="0"/> + <Component id="secondaryLinesRB" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="secondaryPointsRB" min="-2" max="-2" attributes="0"/> + <Component id="primaryPointsRB" min="-2" max="-2" attributes="0"/> + <Component id="pointsLabel" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <Component id="primaryHighlightsCB" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> <Component id="resetAllButton" alignment="0" min="-2" max="-2" attributes="0"/> <Group type="102" alignment="0" attributes="0"> <Group type="103" groupAlignment="0" max="-2" attributes="0"> @@ -208,20 +256,6 @@ </Group> </Group> </Group> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="-2" pref="297" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="highlightsLabel" min="-2" max="-2" attributes="0"/> - <Group type="102" alignment="0" attributes="0"> - <EmptySpace min="10" pref="10" max="-2" attributes="0"/> - <Group type="103" groupAlignment="0" attributes="0"> - <Component id="secondaryHighlightsCB" min="-2" max="-2" attributes="0"/> - <Component id="primaryHighlightsCB" min="-2" max="-2" attributes="0"/> - </Group> - </Group> - </Group> - <EmptySpace min="0" pref="0" max="32767" attributes="0"/> - </Group> </Group> </DimensionLayout> <DimensionLayout dim="1"> @@ -346,13 +380,44 @@ <Component id="jSeparator7" min="-2" pref="10" max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/> <Component id="featurePointsButton" min="-2" max="-2" attributes="0"/> - <EmptySpace min="-2" pref="73" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="70" max="-2" attributes="0"/> <Component id="highlightsLabel" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> <Component id="primaryHighlightsCB" min="-2" max="-2" attributes="0"/> - <EmptySpace type="unrelated" max="-2" attributes="0"/> - <Component id="secondaryHighlightsCB" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="196" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="secondaryHighlightsCB" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="23" max="32767" attributes="0"/> + <Component id="renderModeLabel" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="fillLabel" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="linesLabel" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pointsLabel" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="16" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="primaryLinesRB" min="-2" max="-2" attributes="0"/> + <Component id="primaryFillRB" min="-2" max="-2" attributes="0"/> + <Component id="primaryPointsRB" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="secondaryFillRB" min="-2" max="-2" attributes="0"/> + <Component id="secondaryLinesRB" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Component id="secondaryPointsRB" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="113" max="-2" attributes="0"/> + </Group> + </Group> </Group> </Group> </DimensionLayout> @@ -1284,5 +1349,117 @@ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="secondaryHighlightsCBActionPerformed"/> </Events> </Component> + <Component class="javax.swing.JLabel" name="renderModeLabel"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.renderModeLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="fillLabel"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.fillLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="linesLabel"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.linesLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="pointsLabel"> + <Properties> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.pointsLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JRadioButton" name="primaryFillRB"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="primaryRenderModeGroup"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.primaryFillRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="primaryFillRBActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="secondaryFillRB"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="secondaryRenerModeGroup"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.secondaryFillRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="secondaryFillRBActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="primaryLinesRB"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="primaryRenderModeGroup"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.primaryLinesRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="primaryLinesRBActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="secondaryLinesRB"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="secondaryRenerModeGroup"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.secondaryLinesRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="secondaryLinesRBActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="secondaryPointsRB"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="secondaryRenerModeGroup"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.secondaryPointsRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="secondaryPointsRBActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="primaryPointsRB"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="primaryRenderModeGroup"/> + </Property> + <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor"> + <ResourceString bundle="cz/fidentis/analyst/gui/tab/Bundle.properties" key="PostRegistrationCP.primaryPointsRB.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="primaryPointsRBActionPerformed"/> + </Events> + </Component> </SubComponents> </Form> diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.java b/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.java index 122a93cfaef726a101c151da41017d1b1b152554..138b06bd05af89b666b60c779d90b439275ec9b9 100644 --- a/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.java +++ b/GUI/src/main/java/cz/fidentis/analyst/gui/tab/PostRegistrationCP.java @@ -36,6 +36,8 @@ public class PostRegistrationCP extends javax.swing.JPanel { //transparencySlider.setValue(listener.getTransparencyRange()); primaryColorPanel.setBackground(listener.getDefaultPrimaryColor()); secondaryColorPanel.setBackground(listener.getDefaultSecondaryColor()); + primaryFillRB.setSelected(true); + secondaryFillRB.setSelected(true); resetAllButtonActionPerformed(null); } @@ -48,6 +50,8 @@ public class PostRegistrationCP extends javax.swing.JPanel { // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { + primaryRenderModeGroup = new javax.swing.ButtonGroup(); + secondaryRenerModeGroup = new javax.swing.ButtonGroup(); primaryColorPanel = new javax.swing.JPanel(); secondaryColorPanel = new javax.swing.JPanel(); transparencySlider = new javax.swing.JSlider(); @@ -120,6 +124,16 @@ public class PostRegistrationCP extends javax.swing.JPanel { highlightsLabel = new javax.swing.JLabel(); primaryHighlightsCB = new javax.swing.JCheckBox(); secondaryHighlightsCB = new javax.swing.JCheckBox(); + renderModeLabel = new javax.swing.JLabel(); + fillLabel = new javax.swing.JLabel(); + linesLabel = new javax.swing.JLabel(); + pointsLabel = new javax.swing.JLabel(); + primaryFillRB = new javax.swing.JRadioButton(); + secondaryFillRB = new javax.swing.JRadioButton(); + primaryLinesRB = new javax.swing.JRadioButton(); + secondaryLinesRB = new javax.swing.JRadioButton(); + secondaryPointsRB = new javax.swing.JRadioButton(); + primaryPointsRB = new javax.swing.JRadioButton(); setBackground(new java.awt.Color(176, 230, 226)); setPreferredSize(new java.awt.Dimension(405, 500)); @@ -633,6 +647,68 @@ public class PostRegistrationCP extends javax.swing.JPanel { } }); + org.openide.awt.Mnemonics.setLocalizedText(renderModeLabel, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.renderModeLabel.text")); // NOI18N + + org.openide.awt.Mnemonics.setLocalizedText(fillLabel, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.fillLabel.text")); // NOI18N + + org.openide.awt.Mnemonics.setLocalizedText(linesLabel, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.linesLabel.text")); // NOI18N + + org.openide.awt.Mnemonics.setLocalizedText(pointsLabel, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.pointsLabel.text")); // NOI18N + + primaryRenderModeGroup.add(primaryFillRB); + org.openide.awt.Mnemonics.setLocalizedText(primaryFillRB, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.primaryFillRB.text")); // NOI18N + primaryFillRB.setOpaque(false); + primaryFillRB.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + primaryFillRBActionPerformed(evt); + } + }); + + secondaryRenerModeGroup.add(secondaryFillRB); + org.openide.awt.Mnemonics.setLocalizedText(secondaryFillRB, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.secondaryFillRB.text")); // NOI18N + secondaryFillRB.setOpaque(false); + secondaryFillRB.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + secondaryFillRBActionPerformed(evt); + } + }); + + primaryRenderModeGroup.add(primaryLinesRB); + org.openide.awt.Mnemonics.setLocalizedText(primaryLinesRB, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.primaryLinesRB.text")); // NOI18N + primaryLinesRB.setOpaque(false); + primaryLinesRB.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + primaryLinesRBActionPerformed(evt); + } + }); + + secondaryRenerModeGroup.add(secondaryLinesRB); + org.openide.awt.Mnemonics.setLocalizedText(secondaryLinesRB, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.secondaryLinesRB.text")); // NOI18N + secondaryLinesRB.setOpaque(false); + secondaryLinesRB.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + secondaryLinesRBActionPerformed(evt); + } + }); + + secondaryRenerModeGroup.add(secondaryPointsRB); + org.openide.awt.Mnemonics.setLocalizedText(secondaryPointsRB, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.secondaryPointsRB.text")); // NOI18N + secondaryPointsRB.setOpaque(false); + secondaryPointsRB.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + secondaryPointsRBActionPerformed(evt); + } + }); + + primaryRenderModeGroup.add(primaryPointsRB); + org.openide.awt.Mnemonics.setLocalizedText(primaryPointsRB, org.openide.util.NbBundle.getMessage(PostRegistrationCP.class, "PostRegistrationCP.primaryPointsRB.text")); // NOI18N + primaryPointsRB.setOpaque(false); + primaryPointsRB.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + primaryPointsRBActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -648,9 +724,40 @@ public class PostRegistrationCP extends javax.swing.JPanel { .addComponent(jSeparator5, javax.swing.GroupLayout.Alignment.LEADING)) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(resetAllButton) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() + .addGap(40, 40, 40) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(highlightsLabel) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGap(10, 10, 10) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(secondaryHighlightsCB) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(secondaryFillRB) + .addComponent(fillLabel) + .addComponent(primaryFillRB)) + .addGap(30, 30, 30) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(renderModeLabel) + .addGroup(layout.createSequentialGroup() + .addGap(10, 10, 10) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(linesLabel) + .addComponent(primaryLinesRB) + .addComponent(secondaryLinesRB)) + .addGap(37, 37, 37) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(secondaryPointsRB) + .addComponent(primaryPointsRB) + .addComponent(pointsLabel))))) + .addComponent(primaryHighlightsCB))))) + .addComponent(resetAllButton, javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addGap(82, 82, 82) @@ -697,11 +804,11 @@ public class PostRegistrationCP extends javax.swing.JPanel { .addComponent(rightRotationZButton)) .addComponent(rotationZFTF) .addComponent(rotatZLabel))) - .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(jSeparator3) - .addComponent(jSeparator1) - .addComponent(jSeparator6) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 384, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jSeparator6, javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() .addComponent(transparencyButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -718,8 +825,8 @@ public class PostRegistrationCP extends javax.swing.JPanel { .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(secondaryLabel)))))) - .addComponent(jLabel1) - .addGroup(layout.createSequentialGroup() + .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(viewLabel) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) @@ -767,8 +874,8 @@ public class PostRegistrationCP extends javax.swing.JPanel { .addComponent(rightTranslationZButton)) .addComponent(translationZFTF) .addComponent(translZLabel))))) - .addComponent(jLabel4) - .addGroup(layout.createSequentialGroup() + .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(scaleButton, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(23, 23, 23) .addComponent(scaleMinusButton, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -780,20 +887,10 @@ public class PostRegistrationCP extends javax.swing.JPanel { .addComponent(scalePlusButton, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(scaleFTF, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addComponent(modelLabel) - .addComponent(colorButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(featurePointsButton)) + .addComponent(modelLabel, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(colorButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(featurePointsButton, javax.swing.GroupLayout.Alignment.LEADING)) .addContainerGap(146, Short.MAX_VALUE)))) - .addGroup(layout.createSequentialGroup() - .addGap(297, 297, 297) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(highlightsLabel) - .addGroup(layout.createSequentialGroup() - .addGap(10, 10, 10) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(secondaryHighlightsCB) - .addComponent(primaryHighlightsCB)))) - .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -903,13 +1000,36 @@ public class PostRegistrationCP extends javax.swing.JPanel { .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(featurePointsButton) - .addGap(73, 73, 73) + .addGap(70, 70, 70) .addComponent(highlightsLabel) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(primaryHighlightsCB) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) - .addComponent(secondaryHighlightsCB) - .addContainerGap(196, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(secondaryHighlightsCB) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE) + .addComponent(renderModeLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(fillLabel) + .addComponent(linesLabel) + .addComponent(pointsLabel)) + .addGap(16, 16, 16) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(primaryLinesRB) + .addComponent(primaryFillRB) + .addComponent(primaryPointsRB)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(secondaryFillRB) + .addComponent(secondaryLinesRB))) + .addComponent(secondaryPointsRB)) + .addGap(113, 113, 113)))) ); }// </editor-fold>//GEN-END:initComponents @@ -1168,11 +1288,36 @@ public class PostRegistrationCP extends javax.swing.JPanel { listener.removeSecondaryHighlights(); }//GEN-LAST:event_secondaryHighlightsCBActionPerformed + private void primaryFillRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_primaryFillRBActionPerformed + listener.setPrimaryFill(); + }//GEN-LAST:event_primaryFillRBActionPerformed + + private void primaryLinesRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_primaryLinesRBActionPerformed + listener.setPrimaryLines(); + }//GEN-LAST:event_primaryLinesRBActionPerformed + + private void primaryPointsRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_primaryPointsRBActionPerformed + listener.setPrimaryPoints(); + }//GEN-LAST:event_primaryPointsRBActionPerformed + + private void secondaryFillRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_secondaryFillRBActionPerformed + listener.setSecondaryFill(); + }//GEN-LAST:event_secondaryFillRBActionPerformed + + private void secondaryLinesRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_secondaryLinesRBActionPerformed + listener.setSecondaryLines(); + }//GEN-LAST:event_secondaryLinesRBActionPerformed + + private void secondaryPointsRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_secondaryPointsRBActionPerformed + listener.setSecondaryPoints(); + }//GEN-LAST:event_secondaryPointsRBActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton applyButton; private javax.swing.JButton colorButton; private javax.swing.JToggleButton featurePointsButton; + private javax.swing.JLabel fillLabel; private javax.swing.JButton frontButton; private javax.swing.JLabel highlightsLabel; private javax.swing.JLabel jLabel1; @@ -1198,11 +1343,18 @@ public class PostRegistrationCP extends javax.swing.JPanel { private javax.swing.JButton leftTranslationXButton; private javax.swing.JButton leftTranslationYButton; private javax.swing.JButton leftTranslationZButton; + private javax.swing.JLabel linesLabel; private javax.swing.JLabel modelLabel; + private javax.swing.JLabel pointsLabel; private javax.swing.JPanel primaryColorPanel; + private javax.swing.JRadioButton primaryFillRB; private javax.swing.JCheckBox primaryHighlightsCB; private javax.swing.JLabel primaryLabel; + private javax.swing.JRadioButton primaryLinesRB; + private javax.swing.JRadioButton primaryPointsRB; + private javax.swing.ButtonGroup primaryRenderModeGroup; private javax.swing.JButton profileButton; + private javax.swing.JLabel renderModeLabel; private javax.swing.JButton resetAllButton; private javax.swing.JButton rightRotationXButton; private javax.swing.JButton rightRotationYButton; @@ -1230,8 +1382,12 @@ public class PostRegistrationCP extends javax.swing.JPanel { private javax.swing.JButton scaleSmallMinusButton; private javax.swing.JButton scaleSmallPlusButton; private javax.swing.JPanel secondaryColorPanel; + private javax.swing.JRadioButton secondaryFillRB; private javax.swing.JCheckBox secondaryHighlightsCB; private javax.swing.JLabel secondaryLabel; + private javax.swing.JRadioButton secondaryLinesRB; + private javax.swing.JRadioButton secondaryPointsRB; + private javax.swing.ButtonGroup secondaryRenerModeGroup; private javax.swing.JLabel translXLabel; private javax.swing.JLabel translYLabel; private javax.swing.JLabel translZLabel; diff --git a/GUI/src/main/resources/cz/fidentis/analyst/gui/tab/Bundle.properties b/GUI/src/main/resources/cz/fidentis/analyst/gui/tab/Bundle.properties index cb6264e4d332aa02a8a851db5e0b3e2f736f2cf1..41465cb60c4c1527ed0a2d004040d05e5a641da0 100644 --- a/GUI/src/main/resources/cz/fidentis/analyst/gui/tab/Bundle.properties +++ b/GUI/src/main/resources/cz/fidentis/analyst/gui/tab/Bundle.properties @@ -76,3 +76,13 @@ PostRegistrationCP.rightTranslationXButton.text=>> PostRegistrationCP.highlightsLabel.text=highlights PostRegistrationCP.primaryHighlightsCB.text= PostRegistrationCP.secondaryHighlightsCB.text= +PostRegistrationCP.renderModeLabel.text=render mode +PostRegistrationCP.fillLabel.text=fill +PostRegistrationCP.linesLabel.text=lines +PostRegistrationCP.pointsLabel.text=points +PostRegistrationCP.primaryFillRB.text= +PostRegistrationCP.secondaryFillRB.text= +PostRegistrationCP.primaryLinesRB.text= +PostRegistrationCP.secondaryLinesRB.text= +PostRegistrationCP.secondaryPointsRB.text= +PostRegistrationCP.primaryPointsRB.text=