Commit 4ef49eed authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Merge branch 'ref-moving-buttons-into-EditWindow' into 'master'

Move panel into AddEditWindow

See merge request grp-fidentis/analyst2!428
parents fd35b451 4f086733
Loading
Loading
Loading
Loading
+13 −14
Original line number Diff line number Diff line
@@ -143,7 +143,6 @@ public class FeaturePointsAction extends ControlPanelAction<FeaturePointsPanel>

            case AbstractAddEditWindow.ACTION_SAVE_CHANGES:
                if (saveChanges()) {
                    getControlPanel().setVisibleMovePanel(false);
                    getControlPanel().changeStateButtonsWhenEdit(false);
                    hoverFeaturePoint(workingFP, false);
                    workingFP = null;
@@ -155,7 +154,6 @@ public class FeaturePointsAction extends ControlPanelAction<FeaturePointsPanel>

            case AbstractAddEditWindow.ACTION_CANCEL_CHANGES:
                closeEditLandmarkWindow();
                getControlPanel().setVisibleMovePanel(false);
                workingFP.rollbackPosition();
                hoverFeaturePoint(workingFP, false);
                workingFP = null;
@@ -238,7 +236,7 @@ public class FeaturePointsAction extends ControlPanelAction<FeaturePointsPanel>
                        .refreshPanel(this, getPrimaryFeaturePoints(), selectedFeaturePoints);
                break;

            case FeaturePointsPanel.ACTION_MOVE_FEATURE_POINT:
            case FineTunePanel.ACTION_MOVE_FEATURE_POINT:
                moveFeaturePointOnMesh(ae);
                break;
                
@@ -571,20 +569,22 @@ public class FeaturePointsAction extends ControlPanelAction<FeaturePointsPanel>
     * @param ae ActionEvent
     */
    private void moveFeaturePointOnMesh(ActionEvent ae) {
        if (workingFP == null) {
        if (workingFP == null || addEditWindow == null) {
            return;
        }

        Vector3d moveVector = new Vector3d();
        if (ae.getSource() == getControlPanel().getMoveRightButton()) {
            moveVector.set(getControlPanel().getMovementSlider().getValue().doubleValue(), 0, 0);
        } else if (ae.getSource() == getControlPanel().getMoveLeftButton()) {
            moveVector.set(-getControlPanel().getMovementSlider().getValue().doubleValue(), 0, 0);
        } else if (ae.getSource() == getControlPanel().getMoveUpButton()) {
            moveVector.set(0, getControlPanel().getMovementSlider().getValue().doubleValue(), 0);
        } else if (ae.getSource() == getControlPanel().getMoveDownButton()) {
            moveVector.set(0, -getControlPanel().getMovementSlider().getValue().doubleValue(), 0);
        } else if (ae.getSource() == getControlPanel().getRollbackMoveButton()) {
        double moveDistance = addEditWindow.getFineTunePanel().getMovementSlider().getValue().doubleValue();

        if (ae.getSource() == addEditWindow.getFineTunePanel().getMoveRightButton()) {
            moveVector.set(moveDistance, 0, 0);
        } else if (ae.getSource() == addEditWindow.getFineTunePanel().getMoveLeftButton()) {
            moveVector.set(-moveDistance, 0, 0);
        } else if (ae.getSource() == addEditWindow.getFineTunePanel().getMoveUpButton()) {
            moveVector.set(0, moveDistance, 0);
        } else if (ae.getSource() == addEditWindow.getFineTunePanel().getMoveDownButton()) {
            moveVector.set(0, -moveDistance, 0);
        } else if (ae.getSource() == addEditWindow.getFineTunePanel().getRollbackMoveButton()) {
            workingFP.rollbackPosition();
            return;
        }
@@ -621,7 +621,6 @@ public class FeaturePointsAction extends ControlPanelAction<FeaturePointsPanel>
            return;
        }
        getControlPanel().changeStateButtonsWhenEdit(true);
        getControlPanel().setVisibleMovePanel(true);
        hoverFeaturePoint(editLand, true);

        workingFpMode = ENABLE_CHANGE_FP_POSITION;
+6 −162
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@
                  <Component id="jPanel3" max="32767" attributes="0"/>
                  <Component id="sizePanel" max="32767" attributes="0"/>
              </Group>
              <Group type="103" groupAlignment="0" attributes="0">
              <Group type="103" groupAlignment="0" max="-2" attributes="0">
                  <Group type="102" attributes="0">
                      <EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
@@ -40,11 +39,6 @@
                      <Component id="saveToFileButton" max="32767" attributes="0"/>
                  </Group>
              </Group>
                  <Group type="102" alignment="0" attributes="0">
                      <EmptySpace max="-2" attributes="0"/>
                      <Component id="moveFpPanel" min="-2" max="-2" attributes="0"/>
                  </Group>
              </Group>
              <EmptySpace min="141" pref="362" max="32767" attributes="0"/>
          </Group>
      </Group>
@@ -54,11 +48,7 @@
          <Group type="102" alignment="0" attributes="0">
              <EmptySpace max="-2" attributes="0"/>
              <Group type="103" groupAlignment="0" attributes="0">
                  <Group type="102" alignment="0" attributes="0">
                      <Component id="secondaryPointsPanel" min="-2" max="-2" attributes="0"/>
                      <EmptySpace max="-2" attributes="0"/>
                      <Component id="moveFpPanel" min="-2" max="-2" attributes="0"/>
                  </Group>
                  <Component id="secondaryPointsPanel" alignment="0" min="-2" max="-2" attributes="0"/>
                  <Group type="102" alignment="0" attributes="0">
                      <Component id="jPanel2" min="-2" max="-2" attributes="0"/>
                      <EmptySpace max="-2" attributes="0"/>
@@ -435,152 +425,6 @@
        </Component>
      </SubComponents>
    </Container>
    <Container class="javax.swing.JPanel" name="moveFpPanel">
      <Properties>
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
          <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
            <TitledBorder title="Fine tune feature point:">
              <ResourceString PropertyName="titleX" bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveFpPanel.border.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
              <Font PropertyName="font" name="Dialog" size="14" style="1"/>
            </TitledBorder>
          </Border>
        </Property>
      </Properties>

      <Layout>
        <DimensionLayout dim="0">
          <Group type="103" groupAlignment="0" attributes="0">
              <Group type="102" alignment="0" attributes="0">
                  <EmptySpace min="-2" pref="122" max="-2" attributes="0"/>
                  <Component id="moveLeftButton" min="-2" pref="26" max="-2" attributes="0"/>
                  <EmptySpace max="-2" attributes="0"/>
                  <Group type="103" groupAlignment="0" attributes="0">
                      <Group type="102" alignment="0" attributes="0">
                          <Component id="rollbackMoveButton" min="-2" pref="26" max="-2" attributes="0"/>
                          <EmptySpace max="-2" attributes="0"/>
                          <Component id="moveRightButton" min="-2" pref="26" max="-2" attributes="0"/>
                      </Group>
                      <Component id="moveUpButton" min="-2" pref="26" max="-2" attributes="0"/>
                      <Component id="moveDownButton" min="-2" pref="26" max="-2" attributes="0"/>
                  </Group>
                  <EmptySpace pref="129" max="32767" attributes="0"/>
              </Group>
              <Group type="102" alignment="1" attributes="0">
                  <EmptySpace max="-2" attributes="0"/>
                  <Component id="movementSlider" max="32767" attributes="0"/>
                  <EmptySpace max="-2" attributes="0"/>
              </Group>
          </Group>
        </DimensionLayout>
        <DimensionLayout dim="1">
          <Group type="103" groupAlignment="0" attributes="0">
              <Group type="102" alignment="0" attributes="0">
                  <Component id="moveUpButton" min="-2" pref="26" max="-2" attributes="0"/>
                  <EmptySpace max="-2" attributes="0"/>
                  <Group type="103" groupAlignment="3" attributes="0">
                      <Component id="rollbackMoveButton" alignment="3" min="-2" pref="26" max="-2" attributes="0"/>
                      <Component id="moveLeftButton" alignment="3" min="-2" pref="26" max="-2" attributes="0"/>
                      <Component id="moveRightButton" alignment="3" min="-2" pref="26" max="-2" attributes="0"/>
                  </Group>
                  <EmptySpace max="-2" attributes="0"/>
                  <Component id="moveDownButton" min="-2" pref="26" max="-2" attributes="0"/>
                  <EmptySpace pref="7" max="32767" attributes="0"/>
                  <Component id="movementSlider" min="-2" pref="20" max="-2" attributes="0"/>
                  <EmptySpace max="-2" attributes="0"/>
              </Group>
          </Group>
        </DimensionLayout>
      </Layout>
      <SubComponents>
        <Component class="javax.swing.JButton" name="moveRightButton">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="Dialog" size="18" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveRightButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveRightButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[0, 0, 1, 0]"/>
            </Property>
          </Properties>
        </Component>
        <Component class="javax.swing.JButton" name="moveLeftButton">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="Dialog" size="18" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveLeftButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveLeftButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[0, 0, 1, 0]"/>
            </Property>
          </Properties>
        </Component>
        <Component class="javax.swing.JButton" name="moveUpButton">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="Dialog" size="18" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveUpButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveUpButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[0, 1, 0, 0]"/>
            </Property>
          </Properties>
        </Component>
        <Component class="javax.swing.JButton" name="moveDownButton">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="Dialog" size="18" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveDownButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.moveDownButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[0, 1, 0, 0]"/>
            </Property>
          </Properties>
        </Component>
        <Component class="javax.swing.JButton" name="rollbackMoveButton">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="Dialog" size="14" style="1"/>
            </Property>
            <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.rollbackMoveButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.rollbackMoveButton.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[0, 0, 1, 0]"/>
            </Property>
          </Properties>
        </Component>
        <Component class="cz.fidentis.analyst.gui.elements.SpinSlider" name="movementSlider">
          <Properties>
            <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
              <ResourceString bundle="cz/fidentis/analyst/gui/task/featurepoints/Bundle.properties" key="FeaturePointsPanel.movementSlider.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
            </Property>
          </Properties>
        </Component>
      </SubComponents>
    </Container>
    <Container class="javax.swing.JPanel" name="sizePanel">
      <Properties>
        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+10 −146

File changed.

Preview size limit exceeded, changes collapsed.

+182 −0

File added.

Preview size limit exceeded, changes collapsed.

+184 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading