From d812831420c14318ff4c042a33b93aa58c421e13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matej=20Kov=C3=A1r?= <>
Date: Mon, 12 Apr 2021 16:46:41 +0200
Subject: [PATCH] added 1:1 button

---
 .../analyst/gui/DashboardTopComponent.form    | 23 +++++++++++++++++--
 .../analyst/gui/DashboardTopComponent.java    | 16 +++++++++----
 .../cz/fidentis/analyst/gui/Bundle.properties |  1 +
 3 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/DashboardTopComponent.form b/GUI/src/main/java/cz/fidentis/analyst/gui/DashboardTopComponent.form
index 7a265773..a75afca0 100644
--- a/GUI/src/main/java/cz/fidentis/analyst/gui/DashboardTopComponent.form
+++ b/GUI/src/main/java/cz/fidentis/analyst/gui/DashboardTopComponent.form
@@ -60,7 +60,7 @@
                       <Component id="jPanel4" alignment="0" max="32767" attributes="0"/>
                       <Component id="jPanel5" alignment="0" max="32767" attributes="0"/>
                   </Group>
-                  <EmptySpace min="0" pref="457" max="32767" attributes="0"/>
+                  <EmptySpace min="0" pref="450" max="32767" attributes="0"/>
               </Group>
           </Group>
         </DimensionLayout>
@@ -191,7 +191,26 @@
               </Properties>
               <Constraints>
                 <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
-                  <GridBagConstraints gridX="5" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="16" insetsLeft="22" insetsBottom="13" insetsRight="150" anchor="18" weightX="0.0" weightY="0.0"/>
+                  <GridBagConstraints gridX="5" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="16" insetsLeft="22" insetsBottom="13" insetsRight="4" anchor="18" weightX="0.0" weightY="0.0"/>
+                </Constraint>
+              </Constraints>
+            </Component>
+            <Component class="javax.swing.JButton" name="analyzeButton1">
+              <Properties>
+                <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+                  <Color blue="f0" green="f0" red="b7" type="rgb"/>
+                </Property>
+                <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+                  <Font name="Tahoma" size="12" style="0"/>
+                </Property>
+                <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+                  <ResourceString bundle="cz/fidentis/analyst/gui/Bundle.properties" key="DashboardTopComponent.analyzeButton1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+                </Property>
+                <Property name="alignmentX" type="float" value="0.5"/>
+              </Properties>
+              <Constraints>
+                <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+                  <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="16" insetsLeft="43" insetsBottom="13" insetsRight="25" anchor="10" weightX="0.0" weightY="0.0"/>
                 </Constraint>
               </Constraints>
             </Component>
diff --git a/GUI/src/main/java/cz/fidentis/analyst/gui/DashboardTopComponent.java b/GUI/src/main/java/cz/fidentis/analyst/gui/DashboardTopComponent.java
index f529df3f..ba6637ba 100644
--- a/GUI/src/main/java/cz/fidentis/analyst/gui/DashboardTopComponent.java
+++ b/GUI/src/main/java/cz/fidentis/analyst/gui/DashboardTopComponent.java
@@ -47,8 +47,6 @@ public final class DashboardTopComponent extends TopComponent {
         putClientProperty(TopComponent.PROP_CLOSING_DISABLED, Boolean.TRUE);
         putClientProperty(TopComponent.PROP_DRAGGING_DISABLED, Boolean.TRUE);
         putClientProperty(TopComponent.PROP_UNDOCKING_DISABLED, Boolean.TRUE);
-        
-        //this.setSize(WIDTH, HEIGHT);
     }
 
     /**
@@ -69,6 +67,7 @@ public final class DashboardTopComponent extends TopComponent {
         deselectAllButton1 = new javax.swing.JButton();
         collapseButton1 = new javax.swing.JButton();
         inflateButton1 = new javax.swing.JButton();
+        analyzeButton1 = new javax.swing.JButton();
 
         setLayout(new java.awt.BorderLayout());
 
@@ -135,9 +134,17 @@ public final class DashboardTopComponent extends TopComponent {
         gridBagConstraints.gridx = 5;
         gridBagConstraints.gridy = 0;
         gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
-        gridBagConstraints.insets = new java.awt.Insets(16, 22, 13, 150);
+        gridBagConstraints.insets = new java.awt.Insets(16, 22, 13, 4);
         jPanel5.add(inflateButton1, gridBagConstraints);
 
+        analyzeButton1.setBackground(new java.awt.Color(183, 240, 240));
+        analyzeButton1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
+        org.openide.awt.Mnemonics.setLocalizedText(analyzeButton1, org.openide.util.NbBundle.getMessage(DashboardTopComponent.class, "DashboardTopComponent.analyzeButton1.text")); // NOI18N
+        analyzeButton1.setAlignmentX(0.5F);
+        gridBagConstraints = new java.awt.GridBagConstraints();
+        gridBagConstraints.insets = new java.awt.Insets(16, 43, 13, 25);
+        jPanel5.add(analyzeButton1, gridBagConstraints);
+
         javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
         jPanel1.setLayout(jPanel1Layout);
         jPanel1Layout.setHorizontalGroup(
@@ -146,7 +153,7 @@ public final class DashboardTopComponent extends TopComponent {
                 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                     .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                     .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addGap(0, 457, Short.MAX_VALUE))
+                .addGap(0, 450, Short.MAX_VALUE))
         );
         jPanel1Layout.setVerticalGroup(
             jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -162,6 +169,7 @@ public final class DashboardTopComponent extends TopComponent {
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
     private javax.swing.JButton addButton1;
+    private javax.swing.JButton analyzeButton1;
     private javax.swing.JButton collapseButton1;
     private javax.swing.JButton deselectAllButton1;
     private javax.swing.JButton inflateButton1;
diff --git a/GUI/src/main/resources/cz/fidentis/analyst/gui/Bundle.properties b/GUI/src/main/resources/cz/fidentis/analyst/gui/Bundle.properties
index ab9a02eb..76112423 100644
--- a/GUI/src/main/resources/cz/fidentis/analyst/gui/Bundle.properties
+++ b/GUI/src/main/resources/cz/fidentis/analyst/gui/Bundle.properties
@@ -11,3 +11,4 @@ DashboardTopComponent.deselectAllButton1.text=Deselect all
 DashboardTopComponent.selectAllButton1.text=Select all
 DashboardTopComponent.removeButton1.text=Remove
 DashboardTopComponent.addButton1.text=Add
+DashboardTopComponent.analyzeButton1.text=Open 1:1
-- 
GitLab