File src/menu/ParamDynamicsMenu.form copied from file src/menu/ChanMenu.form (similarity 53%) (mode: 100644) (index 2c1e6d8..7b0a707) |
2 |
2 |
|
|
3 |
3 |
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo"> |
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JDialogFormInfo"> |
4 |
4 |
<Properties> |
<Properties> |
5 |
|
<Property name="defaultCloseOperation" type="int" value="0"/> |
|
|
5 |
|
<Property name="defaultCloseOperation" type="int" value="2"/> |
6 |
6 |
</Properties> |
</Properties> |
7 |
7 |
<SyntheticProperties> |
<SyntheticProperties> |
8 |
8 |
<SyntheticProperty name="formSizePolicy" type="int" value="1"/> |
<SyntheticProperty name="formSizePolicy" type="int" value="1"/> |
|
25 |
25 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
26 |
26 |
<Group type="102" alignment="0" attributes="0"> |
<Group type="102" alignment="0" attributes="0"> |
27 |
27 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
28 |
|
<Component id="jPanel1" max="32767" attributes="0"/> |
|
29 |
|
<EmptySpace max="-2" attributes="0"/> |
|
|
28 |
|
<Component id="jPanel1" min="-2" max="-2" attributes="0"/> |
|
29 |
|
<EmptySpace max="32767" attributes="0"/> |
30 |
30 |
</Group> |
</Group> |
31 |
31 |
</Group> |
</Group> |
32 |
32 |
</DimensionLayout> |
</DimensionLayout> |
33 |
33 |
<DimensionLayout dim="1"> |
<DimensionLayout dim="1"> |
34 |
34 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
35 |
|
<Group type="102" alignment="0" attributes="0"> |
|
|
35 |
|
<Group type="102" alignment="1" attributes="0"> |
36 |
36 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
37 |
37 |
<Component id="jPanel1" max="32767" attributes="0"/> |
<Component id="jPanel1" max="32767" attributes="0"/> |
38 |
38 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
|
46 |
46 |
<Layout> |
<Layout> |
47 |
47 |
<DimensionLayout dim="0"> |
<DimensionLayout dim="0"> |
48 |
48 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
49 |
|
<Group type="102" attributes="0"> |
|
|
49 |
|
<Group type="102" alignment="0" attributes="0"> |
50 |
50 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
51 |
51 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
52 |
|
<Component id="jScrollPane1" alignment="1" max="32767" attributes="0"/> |
|
53 |
|
<Group type="102" alignment="1" attributes="0"> |
|
54 |
|
<Component id="jButton2" min="-2" max="-2" attributes="0"/> |
|
55 |
|
<EmptySpace pref="113" max="32767" attributes="0"/> |
|
56 |
|
<Component id="jButton1" min="-2" max="-2" attributes="0"/> |
|
57 |
|
</Group> |
|
|
52 |
|
<Component id="jLabel1" alignment="0" max="32767" attributes="0"/> |
58 |
53 |
<Group type="102" alignment="0" attributes="0"> |
<Group type="102" alignment="0" attributes="0"> |
59 |
|
<Component id="jLabel1" min="-2" pref="94" max="-2" attributes="0"/> |
|
|
54 |
|
<Component id="jScrollPane1" min="-2" pref="105" max="-2" attributes="0"/> |
|
55 |
|
<EmptySpace type="unrelated" max="-2" attributes="0"/> |
|
56 |
|
<Group type="103" groupAlignment="0" attributes="0"> |
|
57 |
|
<Component id="jButton2" alignment="0" min="-2" max="-2" attributes="0"/> |
|
58 |
|
<Component id="jButton3" alignment="0" min="-2" max="-2" attributes="0"/> |
|
59 |
|
</Group> |
|
60 |
|
<EmptySpace type="separate" max="-2" attributes="0"/> |
|
61 |
|
<Component id="jScrollPane2" min="-2" pref="102" max="-2" attributes="0"/> |
60 |
62 |
<EmptySpace min="0" pref="0" max="32767" attributes="0"/> |
<EmptySpace min="0" pref="0" max="32767" attributes="0"/> |
61 |
63 |
</Group> |
</Group> |
|
64 |
|
<Group type="102" alignment="0" attributes="0"> |
|
65 |
|
<Component id="jButton1" min="-2" max="-2" attributes="0"/> |
|
66 |
|
<EmptySpace max="32767" attributes="0"/> |
|
67 |
|
<Component id="jButton4" min="-2" max="-2" attributes="0"/> |
|
68 |
|
</Group> |
62 |
69 |
</Group> |
</Group> |
63 |
70 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
64 |
71 |
</Group> |
</Group> |
|
67 |
74 |
<DimensionLayout dim="1"> |
<DimensionLayout dim="1"> |
68 |
75 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
69 |
76 |
<Group type="102" alignment="0" attributes="0"> |
<Group type="102" alignment="0" attributes="0"> |
70 |
|
<EmptySpace min="-2" pref="33" max="-2" attributes="0"/> |
|
71 |
77 |
<Component id="jLabel1" min="-2" max="-2" attributes="0"/> |
<Component id="jLabel1" min="-2" max="-2" attributes="0"/> |
72 |
|
<EmptySpace type="separate" max="-2" attributes="0"/> |
|
73 |
|
<Component id="jScrollPane1" min="-2" pref="130" max="-2" attributes="0"/> |
|
74 |
|
<EmptySpace type="unrelated" max="-2" attributes="0"/> |
|
|
78 |
|
<Group type="103" groupAlignment="0" attributes="0"> |
|
79 |
|
<Group type="102" alignment="0" attributes="0"> |
|
80 |
|
<EmptySpace min="-2" pref="55" max="-2" attributes="0"/> |
|
81 |
|
<Component id="jButton2" min="-2" max="-2" attributes="0"/> |
|
82 |
|
<EmptySpace type="separate" max="-2" attributes="0"/> |
|
83 |
|
<Component id="jButton3" min="-2" max="-2" attributes="0"/> |
|
84 |
|
</Group> |
|
85 |
|
<Group type="102" alignment="0" attributes="0"> |
|
86 |
|
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/> |
|
87 |
|
<Group type="103" groupAlignment="0" max="-2" attributes="0"> |
|
88 |
|
<Component id="jScrollPane2" alignment="0" max="32767" attributes="0"/> |
|
89 |
|
<Component id="jScrollPane1" alignment="0" pref="152" max="32767" attributes="0"/> |
|
90 |
|
</Group> |
|
91 |
|
</Group> |
|
92 |
|
</Group> |
|
93 |
|
<EmptySpace pref="68" max="32767" attributes="0"/> |
75 |
94 |
<Group type="103" groupAlignment="3" attributes="0"> |
<Group type="103" groupAlignment="3" attributes="0"> |
76 |
|
<Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> |
|
77 |
95 |
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> |
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> |
|
96 |
|
<Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/> |
78 |
97 |
</Group> |
</Group> |
79 |
|
<EmptySpace pref="21" max="32767" attributes="0"/> |
|
|
98 |
|
<EmptySpace max="-2" attributes="0"/> |
80 |
99 |
</Group> |
</Group> |
81 |
100 |
</Group> |
</Group> |
82 |
101 |
</DimensionLayout> |
</DimensionLayout> |
83 |
102 |
</Layout> |
</Layout> |
84 |
103 |
<SubComponents> |
<SubComponents> |
|
104 |
|
<Component class="javax.swing.JLabel" name="jLabel1"> |
|
105 |
|
<Properties> |
|
106 |
|
<Property name="text" type="java.lang.String" value="Выберите нужные координаты точек:"/> |
|
107 |
|
</Properties> |
|
108 |
|
</Component> |
85 |
109 |
<Container class="javax.swing.JScrollPane" name="jScrollPane1"> |
<Container class="javax.swing.JScrollPane" name="jScrollPane1"> |
86 |
110 |
<AuxValues> |
<AuxValues> |
87 |
111 |
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> |
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> |
|
109 |
133 |
</Container> |
</Container> |
110 |
134 |
<Component class="javax.swing.JButton" name="jButton1"> |
<Component class="javax.swing.JButton" name="jButton1"> |
111 |
135 |
<Properties> |
<Properties> |
112 |
|
<Property name="text" type="java.lang.String" value="Выбрать"/> |
|
|
136 |
|
<Property name="text" type="java.lang.String" value="Назад"/> |
113 |
137 |
</Properties> |
</Properties> |
|
138 |
|
<Events> |
|
139 |
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> |
|
140 |
|
</Events> |
114 |
141 |
</Component> |
</Component> |
115 |
142 |
<Component class="javax.swing.JButton" name="jButton2"> |
<Component class="javax.swing.JButton" name="jButton2"> |
116 |
143 |
<Properties> |
<Properties> |
117 |
|
<Property name="text" type="java.lang.String" value="Назад"/> |
|
|
144 |
|
<Property name="text" type="java.lang.String" value=">>"/> |
118 |
145 |
</Properties> |
</Properties> |
119 |
146 |
<Events> |
<Events> |
120 |
147 |
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> |
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> |
121 |
148 |
</Events> |
</Events> |
122 |
149 |
</Component> |
</Component> |
123 |
|
<Component class="javax.swing.JLabel" name="jLabel1"> |
|
|
150 |
|
<Component class="javax.swing.JButton" name="jButton3"> |
|
151 |
|
<Properties> |
|
152 |
|
<Property name="text" type="java.lang.String" value="<<"/> |
|
153 |
|
</Properties> |
|
154 |
|
<Events> |
|
155 |
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> |
|
156 |
|
</Events> |
|
157 |
|
</Component> |
|
158 |
|
<Container class="javax.swing.JScrollPane" name="jScrollPane2"> |
|
159 |
|
<AuxValues> |
|
160 |
|
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> |
|
161 |
|
</AuxValues> |
|
162 |
|
|
|
163 |
|
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> |
|
164 |
|
<SubComponents> |
|
165 |
|
<Component class="javax.swing.JList" name="jList2"> |
|
166 |
|
<Properties> |
|
167 |
|
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> |
|
168 |
|
<StringArray count="5"> |
|
169 |
|
<StringItem index="0" value="Item 1"/> |
|
170 |
|
<StringItem index="1" value="Item 2"/> |
|
171 |
|
<StringItem index="2" value="Item 3"/> |
|
172 |
|
<StringItem index="3" value="Item 4"/> |
|
173 |
|
<StringItem index="4" value="Item 5"/> |
|
174 |
|
</StringArray> |
|
175 |
|
</Property> |
|
176 |
|
</Properties> |
|
177 |
|
<AuxValues> |
|
178 |
|
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> |
|
179 |
|
</AuxValues> |
|
180 |
|
</Component> |
|
181 |
|
</SubComponents> |
|
182 |
|
</Container> |
|
183 |
|
<Component class="javax.swing.JButton" name="jButton4"> |
124 |
184 |
<Properties> |
<Properties> |
125 |
|
<Property name="text" type="java.lang.String" value="Выберите канал"/> |
|
|
185 |
|
<Property name="text" type="java.lang.String" value="OK"/> |
126 |
186 |
</Properties> |
</Properties> |
127 |
187 |
</Component> |
</Component> |
128 |
188 |
</SubComponents> |
</SubComponents> |
File src/menu/ParamDynamicsMenu.java added (mode: 100644) (index 0000000..1beabfe) |
|
1 |
|
/* |
|
2 |
|
* To change this license header, choose License Headers in Project Properties. |
|
3 |
|
* To change this template file, choose Tools | Templates |
|
4 |
|
* and open the template in the editor. |
|
5 |
|
*/ |
|
6 |
|
package menu; |
|
7 |
|
|
|
8 |
|
import java.text.DecimalFormat; |
|
9 |
|
import java.text.DecimalFormatSymbols; |
|
10 |
|
import java.util.ArrayList; |
|
11 |
|
import javax.swing.DefaultListModel; |
|
12 |
|
import lleak.helpers.*; |
|
13 |
|
|
|
14 |
|
/** |
|
15 |
|
* |
|
16 |
|
* @author tassy |
|
17 |
|
*/ |
|
18 |
|
public class ParamDynamicsMenu extends javax.swing.JDialog { |
|
19 |
|
|
|
20 |
|
private MainMenu parent = null; |
|
21 |
|
private DefaultListModel<String> lmod1 = new DefaultListModel<>(); |
|
22 |
|
private DefaultListModel<String> lmod2 = new DefaultListModel<>(); |
|
23 |
|
/** |
|
24 |
|
* Creates new form ParamDynamicsMenu |
|
25 |
|
*/ |
|
26 |
|
public ParamDynamicsMenu(MainMenu parent) { |
|
27 |
|
this.parent = parent; |
|
28 |
|
initComponents(); |
|
29 |
|
setInf(); |
|
30 |
|
jList1.setModel(lmod1); |
|
31 |
|
lmod2.clear(); |
|
32 |
|
jList2.setModel(lmod2); |
|
33 |
|
setLocationRelativeTo(parent); |
|
34 |
|
} |
|
35 |
|
|
|
36 |
|
/** |
|
37 |
|
* This method is called from within the constructor to initialize the form. |
|
38 |
|
* WARNING: Do NOT modify this code. The content of this method is always |
|
39 |
|
* regenerated by the Form Editor. |
|
40 |
|
*/ |
|
41 |
|
@SuppressWarnings("unchecked") |
|
42 |
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents |
|
43 |
|
private void initComponents() { |
|
44 |
|
|
|
45 |
|
jPanel1 = new javax.swing.JPanel(); |
|
46 |
|
jLabel1 = new javax.swing.JLabel(); |
|
47 |
|
jScrollPane1 = new javax.swing.JScrollPane(); |
|
48 |
|
jList1 = new javax.swing.JList<>(); |
|
49 |
|
jButton1 = new javax.swing.JButton(); |
|
50 |
|
jButton2 = new javax.swing.JButton(); |
|
51 |
|
jButton3 = new javax.swing.JButton(); |
|
52 |
|
jScrollPane2 = new javax.swing.JScrollPane(); |
|
53 |
|
jList2 = new javax.swing.JList<>(); |
|
54 |
|
jButton4 = new javax.swing.JButton(); |
|
55 |
|
|
|
56 |
|
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); |
|
57 |
|
|
|
58 |
|
jLabel1.setText("Выберите нужные координаты точек:"); |
|
59 |
|
|
|
60 |
|
jList1.setModel(new javax.swing.AbstractListModel<String>() { |
|
61 |
|
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; |
|
62 |
|
public int getSize() { return strings.length; } |
|
63 |
|
public String getElementAt(int i) { return strings[i]; } |
|
64 |
|
}); |
|
65 |
|
jScrollPane1.setViewportView(jList1); |
|
66 |
|
|
|
67 |
|
jButton1.setText("Назад"); |
|
68 |
|
jButton1.addActionListener(new java.awt.event.ActionListener() { |
|
69 |
|
public void actionPerformed(java.awt.event.ActionEvent evt) { |
|
70 |
|
jButton1ActionPerformed(evt); |
|
71 |
|
} |
|
72 |
|
}); |
|
73 |
|
|
|
74 |
|
jButton2.setText(">>"); |
|
75 |
|
jButton2.addActionListener(new java.awt.event.ActionListener() { |
|
76 |
|
public void actionPerformed(java.awt.event.ActionEvent evt) { |
|
77 |
|
jButton2ActionPerformed(evt); |
|
78 |
|
} |
|
79 |
|
}); |
|
80 |
|
|
|
81 |
|
jButton3.setText("<<"); |
|
82 |
|
jButton3.addActionListener(new java.awt.event.ActionListener() { |
|
83 |
|
public void actionPerformed(java.awt.event.ActionEvent evt) { |
|
84 |
|
jButton3ActionPerformed(evt); |
|
85 |
|
} |
|
86 |
|
}); |
|
87 |
|
|
|
88 |
|
jList2.setModel(new javax.swing.AbstractListModel<String>() { |
|
89 |
|
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; |
|
90 |
|
public int getSize() { return strings.length; } |
|
91 |
|
public String getElementAt(int i) { return strings[i]; } |
|
92 |
|
}); |
|
93 |
|
jScrollPane2.setViewportView(jList2); |
|
94 |
|
|
|
95 |
|
jButton4.setText("OK"); |
|
96 |
|
|
|
97 |
|
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); |
|
98 |
|
jPanel1.setLayout(jPanel1Layout); |
|
99 |
|
jPanel1Layout.setHorizontalGroup( |
|
100 |
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
101 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
102 |
|
.addContainerGap() |
|
103 |
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
104 |
|
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
105 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
106 |
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
107 |
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) |
|
108 |
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
109 |
|
.addComponent(jButton2) |
|
110 |
|
.addComponent(jButton3)) |
|
111 |
|
.addGap(18, 18, 18) |
|
112 |
|
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
113 |
|
.addGap(0, 0, Short.MAX_VALUE)) |
|
114 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
115 |
|
.addComponent(jButton1) |
|
116 |
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
117 |
|
.addComponent(jButton4))) |
|
118 |
|
.addContainerGap()) |
|
119 |
|
); |
|
120 |
|
jPanel1Layout.setVerticalGroup( |
|
121 |
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
122 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
123 |
|
.addComponent(jLabel1) |
|
124 |
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
125 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
126 |
|
.addGap(55, 55, 55) |
|
127 |
|
.addComponent(jButton2) |
|
128 |
|
.addGap(18, 18, 18) |
|
129 |
|
.addComponent(jButton3)) |
|
130 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
131 |
|
.addGap(16, 16, 16) |
|
132 |
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) |
|
133 |
|
.addComponent(jScrollPane2) |
|
134 |
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)))) |
|
135 |
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE) |
|
136 |
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
|
137 |
|
.addComponent(jButton1) |
|
138 |
|
.addComponent(jButton4)) |
|
139 |
|
.addContainerGap()) |
|
140 |
|
); |
|
141 |
|
|
|
142 |
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); |
|
143 |
|
getContentPane().setLayout(layout); |
|
144 |
|
layout.setHorizontalGroup( |
|
145 |
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
146 |
|
.addGroup(layout.createSequentialGroup() |
|
147 |
|
.addContainerGap() |
|
148 |
|
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
149 |
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) |
|
150 |
|
); |
|
151 |
|
layout.setVerticalGroup( |
|
152 |
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
153 |
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() |
|
154 |
|
.addContainerGap() |
|
155 |
|
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
156 |
|
.addContainerGap()) |
|
157 |
|
); |
|
158 |
|
|
|
159 |
|
pack(); |
|
160 |
|
}// </editor-fold>//GEN-END:initComponents |
|
161 |
|
|
|
162 |
|
private void setInf() { |
|
163 |
|
lmod1.clear(); |
|
164 |
|
ChanProfReader cpr = new ChanProfReader(parent.getRootDir() + parent.getCr().getChan()); |
|
165 |
|
ChanTxtReader ctr = new ChanTxtReader(parent.getRootDir() + cpr.getChans().get(0).getFile()); //TODO: добавление геометри по выбранному каналу |
|
166 |
|
GeomReader gr = new GeomReader(parent.getRootDir() + ctr.getGeom()); |
|
167 |
|
|
|
168 |
|
DecimalFormatSymbols dfs = new DecimalFormatSymbols(); |
|
169 |
|
dfs.setDecimalSeparator('.'); |
|
170 |
|
DecimalFormat decimalFormat = new DecimalFormat("#.####"); |
|
171 |
|
decimalFormat.setDecimalFormatSymbols(dfs); |
|
172 |
|
|
|
173 |
|
ArrayList<Double> pointsInTime = gr.getChanCoord(); |
|
174 |
|
for (Double p : pointsInTime) { |
|
175 |
|
lmod1.addElement(decimalFormat.format(p)); |
|
176 |
|
} |
|
177 |
|
|
|
178 |
|
} |
|
179 |
|
|
|
180 |
|
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed |
|
181 |
|
// back |
|
182 |
|
this.setVisible(false); |
|
183 |
|
parent.setVisible(true); |
|
184 |
|
}//GEN-LAST:event_jButton1ActionPerformed |
|
185 |
|
|
|
186 |
|
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed |
|
187 |
|
// select |
|
188 |
|
String selVal = jList1.getSelectedValue(); |
|
189 |
|
int ind = jList1.getSelectedIndex(); |
|
190 |
|
if (!selVal.isEmpty()) { |
|
191 |
|
lmod2.addElement(selVal); |
|
192 |
|
lmod1.remove(ind); |
|
193 |
|
jList1.setModel(lmod1); |
|
194 |
|
jList2.setModel(lmod2); |
|
195 |
|
|
|
196 |
|
//TODO: сортировка списков после добавления/удаления |
|
197 |
|
} |
|
198 |
|
|
|
199 |
|
}//GEN-LAST:event_jButton2ActionPerformed |
|
200 |
|
|
|
201 |
|
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed |
|
202 |
|
// unselect |
|
203 |
|
String selVal = jList2.getSelectedValue(); |
|
204 |
|
int ind = jList2.getSelectedIndex(); |
|
205 |
|
if (!selVal.isEmpty()) { |
|
206 |
|
lmod1.addElement(selVal); |
|
207 |
|
lmod2.remove(ind); |
|
208 |
|
jList1.setModel(lmod1); |
|
209 |
|
jList2.setModel(lmod2); |
|
210 |
|
} |
|
211 |
|
}//GEN-LAST:event_jButton3ActionPerformed |
|
212 |
|
|
|
213 |
|
|
|
214 |
|
|
|
215 |
|
// Variables declaration - do not modify//GEN-BEGIN:variables |
|
216 |
|
private javax.swing.JButton jButton1; |
|
217 |
|
private javax.swing.JButton jButton2; |
|
218 |
|
private javax.swing.JButton jButton3; |
|
219 |
|
private javax.swing.JButton jButton4; |
|
220 |
|
private javax.swing.JLabel jLabel1; |
|
221 |
|
private javax.swing.JList<String> jList1; |
|
222 |
|
private javax.swing.JList<String> jList2; |
|
223 |
|
private javax.swing.JPanel jPanel1; |
|
224 |
|
private javax.swing.JScrollPane jScrollPane1; |
|
225 |
|
private javax.swing.JScrollPane jScrollPane2; |
|
226 |
|
// End of variables declaration//GEN-END:variables |
|
227 |
|
} |
File src/menu/TimeMenu.form changed (mode: 100644) (index 996847f..0954f82) |
32 |
32 |
</DimensionLayout> |
</DimensionLayout> |
33 |
33 |
<DimensionLayout dim="1"> |
<DimensionLayout dim="1"> |
34 |
34 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
35 |
|
<Group type="102" alignment="0" attributes="0"> |
|
|
35 |
|
<Group type="102" alignment="1" attributes="0"> |
36 |
36 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
37 |
37 |
<Component id="jPanel1" max="32767" attributes="0"/> |
<Component id="jPanel1" max="32767" attributes="0"/> |
38 |
38 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
|
49 |
49 |
<Group type="102" attributes="0"> |
<Group type="102" attributes="0"> |
50 |
50 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
51 |
51 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
52 |
|
<Component id="jLabel1" max="32767" attributes="0"/> |
|
|
52 |
|
<Component id="jLabel1" pref="280" max="32767" attributes="0"/> |
53 |
53 |
<Group type="102" attributes="0"> |
<Group type="102" attributes="0"> |
|
54 |
|
<Component id="jScrollPane1" min="-2" pref="105" max="-2" attributes="0"/> |
|
55 |
|
<EmptySpace type="unrelated" max="-2" attributes="0"/> |
54 |
56 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
55 |
|
<Component id="jScrollPane1" min="-2" pref="181" max="-2" attributes="0"/> |
|
56 |
|
<Component id="jButton1" alignment="0" min="-2" max="-2" attributes="0"/> |
|
|
57 |
|
<Component id="jButton2" min="-2" max="-2" attributes="0"/> |
|
58 |
|
<Component id="jButton3" min="-2" max="-2" attributes="0"/> |
57 |
59 |
</Group> |
</Group> |
58 |
|
<EmptySpace min="0" pref="179" max="32767" attributes="0"/> |
|
|
60 |
|
<EmptySpace min="0" pref="0" max="32767" attributes="0"/> |
|
61 |
|
</Group> |
|
62 |
|
<Group type="102" alignment="0" attributes="0"> |
|
63 |
|
<Component id="jButton1" min="-2" max="-2" attributes="0"/> |
|
64 |
|
<EmptySpace max="32767" attributes="0"/> |
|
65 |
|
<Component id="jButton4" min="-2" max="-2" attributes="0"/> |
59 |
66 |
</Group> |
</Group> |
60 |
67 |
</Group> |
</Group> |
61 |
68 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
62 |
69 |
</Group> |
</Group> |
|
70 |
|
<Group type="102" alignment="1" attributes="0"> |
|
71 |
|
<EmptySpace max="32767" attributes="0"/> |
|
72 |
|
<Component id="jScrollPane2" min="-2" pref="102" max="-2" attributes="0"/> |
|
73 |
|
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/> |
|
74 |
|
</Group> |
63 |
75 |
</Group> |
</Group> |
64 |
76 |
</DimensionLayout> |
</DimensionLayout> |
65 |
77 |
<DimensionLayout dim="1"> |
<DimensionLayout dim="1"> |
66 |
78 |
<Group type="103" groupAlignment="0" attributes="0"> |
<Group type="103" groupAlignment="0" attributes="0"> |
67 |
79 |
<Group type="102" alignment="0" attributes="0"> |
<Group type="102" alignment="0" attributes="0"> |
68 |
|
<EmptySpace max="-2" attributes="0"/> |
|
69 |
80 |
<Component id="jLabel1" min="-2" max="-2" attributes="0"/> |
<Component id="jLabel1" min="-2" max="-2" attributes="0"/> |
70 |
|
<EmptySpace max="-2" attributes="0"/> |
|
71 |
|
<Component id="jScrollPane1" min="-2" pref="152" max="-2" attributes="0"/> |
|
|
81 |
|
<Group type="103" groupAlignment="0" attributes="0"> |
|
82 |
|
<Group type="102" alignment="0" attributes="0"> |
|
83 |
|
<EmptySpace min="-2" pref="55" max="-2" attributes="0"/> |
|
84 |
|
<Component id="jButton2" min="-2" max="-2" attributes="0"/> |
|
85 |
|
<EmptySpace type="separate" max="-2" attributes="0"/> |
|
86 |
|
<Component id="jButton3" min="-2" max="-2" attributes="0"/> |
|
87 |
|
</Group> |
|
88 |
|
<Group type="102" alignment="0" attributes="0"> |
|
89 |
|
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/> |
|
90 |
|
<Group type="103" groupAlignment="0" max="-2" attributes="0"> |
|
91 |
|
<Component id="jScrollPane2" max="32767" attributes="0"/> |
|
92 |
|
<Component id="jScrollPane1" pref="152" max="32767" attributes="0"/> |
|
93 |
|
</Group> |
|
94 |
|
</Group> |
|
95 |
|
</Group> |
72 |
96 |
<EmptySpace pref="68" max="32767" attributes="0"/> |
<EmptySpace pref="68" max="32767" attributes="0"/> |
73 |
|
<Component id="jButton1" min="-2" max="-2" attributes="0"/> |
|
|
97 |
|
<Group type="103" groupAlignment="3" attributes="0"> |
|
98 |
|
<Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> |
|
99 |
|
<Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/> |
|
100 |
|
</Group> |
74 |
101 |
<EmptySpace max="-2" attributes="0"/> |
<EmptySpace max="-2" attributes="0"/> |
75 |
102 |
</Group> |
</Group> |
76 |
103 |
</Group> |
</Group> |
|
115 |
142 |
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> |
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> |
116 |
143 |
</Events> |
</Events> |
117 |
144 |
</Component> |
</Component> |
|
145 |
|
<Component class="javax.swing.JButton" name="jButton2"> |
|
146 |
|
<Properties> |
|
147 |
|
<Property name="text" type="java.lang.String" value=">>"/> |
|
148 |
|
</Properties> |
|
149 |
|
<Events> |
|
150 |
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> |
|
151 |
|
</Events> |
|
152 |
|
</Component> |
|
153 |
|
<Component class="javax.swing.JButton" name="jButton3"> |
|
154 |
|
<Properties> |
|
155 |
|
<Property name="text" type="java.lang.String" value="<<"/> |
|
156 |
|
</Properties> |
|
157 |
|
<Events> |
|
158 |
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> |
|
159 |
|
</Events> |
|
160 |
|
</Component> |
|
161 |
|
<Container class="javax.swing.JScrollPane" name="jScrollPane2"> |
|
162 |
|
<AuxValues> |
|
163 |
|
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> |
|
164 |
|
</AuxValues> |
|
165 |
|
|
|
166 |
|
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> |
|
167 |
|
<SubComponents> |
|
168 |
|
<Component class="javax.swing.JList" name="jList2"> |
|
169 |
|
<Properties> |
|
170 |
|
<Property name="model" type="javax.swing.ListModel" editor="org.netbeans.modules.form.editors2.ListModelEditor"> |
|
171 |
|
<StringArray count="5"> |
|
172 |
|
<StringItem index="0" value="Item 1"/> |
|
173 |
|
<StringItem index="1" value="Item 2"/> |
|
174 |
|
<StringItem index="2" value="Item 3"/> |
|
175 |
|
<StringItem index="3" value="Item 4"/> |
|
176 |
|
<StringItem index="4" value="Item 5"/> |
|
177 |
|
</StringArray> |
|
178 |
|
</Property> |
|
179 |
|
</Properties> |
|
180 |
|
<AuxValues> |
|
181 |
|
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> |
|
182 |
|
</AuxValues> |
|
183 |
|
</Component> |
|
184 |
|
</SubComponents> |
|
185 |
|
</Container> |
|
186 |
|
<Component class="javax.swing.JButton" name="jButton4"> |
|
187 |
|
<Properties> |
|
188 |
|
<Property name="text" type="java.lang.String" value="OK"/> |
|
189 |
|
</Properties> |
|
190 |
|
</Component> |
118 |
191 |
</SubComponents> |
</SubComponents> |
119 |
192 |
</Container> |
</Container> |
120 |
193 |
</SubComponents> |
</SubComponents> |
File src/menu/TimeMenu.java changed (mode: 100644) (index 2ce0838..2cc6784) |
... |
... |
import java.text.DecimalFormat; |
9 |
9 |
import java.text.DecimalFormatSymbols; |
import java.text.DecimalFormatSymbols; |
10 |
10 |
import java.util.ArrayList; |
import java.util.ArrayList; |
11 |
11 |
import javax.swing.DefaultListModel; |
import javax.swing.DefaultListModel; |
12 |
|
import lleak.helpers.TimeInterval; |
|
13 |
12 |
import lleak.helpers.TimeReader; |
import lleak.helpers.TimeReader; |
14 |
13 |
|
|
15 |
14 |
/** |
/** |
|
... |
... |
import lleak.helpers.TimeReader; |
17 |
16 |
* @author tassy |
* @author tassy |
18 |
17 |
*/ |
*/ |
19 |
18 |
public class TimeMenu extends javax.swing.JDialog { |
public class TimeMenu extends javax.swing.JDialog { |
|
19 |
|
|
20 |
20 |
private MainMenu parent = null; |
private MainMenu parent = null; |
21 |
|
private DefaultListModel<String> lmod = new DefaultListModel<>(); |
|
|
21 |
|
private DefaultListModel<String> lmod1 = new DefaultListModel<>(); |
|
22 |
|
private DefaultListModel<String> lmod2 = new DefaultListModel<>(); |
|
23 |
|
|
22 |
24 |
/** |
/** |
23 |
25 |
* Creates new form TimeMenu |
* Creates new form TimeMenu |
24 |
26 |
*/ |
*/ |
|
... |
... |
public class TimeMenu extends javax.swing.JDialog { |
26 |
28 |
this.parent = parent; |
this.parent = parent; |
27 |
29 |
initComponents(); |
initComponents(); |
28 |
30 |
setInf(); |
setInf(); |
29 |
|
jList1.setModel(lmod); |
|
|
31 |
|
jList1.setModel(lmod1); |
|
32 |
|
lmod2.clear(); |
|
33 |
|
jList2.setModel(lmod2); |
30 |
34 |
setLocationRelativeTo(parent); |
setLocationRelativeTo(parent); |
31 |
35 |
} |
} |
32 |
|
|
|
33 |
|
private void setInf(){ |
|
34 |
|
lmod.clear(); |
|
|
36 |
|
|
|
37 |
|
private void setInf() { |
|
38 |
|
lmod1.clear(); |
35 |
39 |
TimeReader tr = new TimeReader(parent.getRootDir() + parent.getCr().getTime()); |
TimeReader tr = new TimeReader(parent.getRootDir() + parent.getCr().getTime()); |
36 |
|
|
|
37 |
|
|
|
|
40 |
|
|
38 |
41 |
DecimalFormatSymbols dfs = new DecimalFormatSymbols(); |
DecimalFormatSymbols dfs = new DecimalFormatSymbols(); |
39 |
42 |
dfs.setDecimalSeparator('.'); |
dfs.setDecimalSeparator('.'); |
40 |
43 |
DecimalFormat decimalFormat = new DecimalFormat("#.####"); |
DecimalFormat decimalFormat = new DecimalFormat("#.####"); |
41 |
44 |
decimalFormat.setDecimalFormatSymbols(dfs); |
decimalFormat.setDecimalFormatSymbols(dfs); |
42 |
|
|
|
|
45 |
|
|
43 |
46 |
ArrayList<Double> pointsInTime = tr.getPointsInTime(); |
ArrayList<Double> pointsInTime = tr.getPointsInTime(); |
44 |
47 |
for (Double p : pointsInTime) { |
for (Double p : pointsInTime) { |
45 |
|
lmod.addElement(decimalFormat.format(p)); |
|
|
48 |
|
lmod1.addElement(decimalFormat.format(p)); |
46 |
49 |
} |
} |
47 |
|
|
|
|
50 |
|
|
48 |
51 |
} |
} |
49 |
52 |
|
|
50 |
53 |
/** |
/** |
|
... |
... |
public class TimeMenu extends javax.swing.JDialog { |
61 |
64 |
jScrollPane1 = new javax.swing.JScrollPane(); |
jScrollPane1 = new javax.swing.JScrollPane(); |
62 |
65 |
jList1 = new javax.swing.JList<>(); |
jList1 = new javax.swing.JList<>(); |
63 |
66 |
jButton1 = new javax.swing.JButton(); |
jButton1 = new javax.swing.JButton(); |
|
67 |
|
jButton2 = new javax.swing.JButton(); |
|
68 |
|
jButton3 = new javax.swing.JButton(); |
|
69 |
|
jScrollPane2 = new javax.swing.JScrollPane(); |
|
70 |
|
jList2 = new javax.swing.JList<>(); |
|
71 |
|
jButton4 = new javax.swing.JButton(); |
64 |
72 |
|
|
65 |
73 |
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); |
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); |
66 |
74 |
|
|
|
... |
... |
public class TimeMenu extends javax.swing.JDialog { |
80 |
88 |
} |
} |
81 |
89 |
}); |
}); |
82 |
90 |
|
|
|
91 |
|
jButton2.setText(">>"); |
|
92 |
|
jButton2.addActionListener(new java.awt.event.ActionListener() { |
|
93 |
|
public void actionPerformed(java.awt.event.ActionEvent evt) { |
|
94 |
|
jButton2ActionPerformed(evt); |
|
95 |
|
} |
|
96 |
|
}); |
|
97 |
|
|
|
98 |
|
jButton3.setText("<<"); |
|
99 |
|
jButton3.addActionListener(new java.awt.event.ActionListener() { |
|
100 |
|
public void actionPerformed(java.awt.event.ActionEvent evt) { |
|
101 |
|
jButton3ActionPerformed(evt); |
|
102 |
|
} |
|
103 |
|
}); |
|
104 |
|
|
|
105 |
|
jList2.setModel(new javax.swing.AbstractListModel<String>() { |
|
106 |
|
String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; |
|
107 |
|
public int getSize() { return strings.length; } |
|
108 |
|
public String getElementAt(int i) { return strings[i]; } |
|
109 |
|
}); |
|
110 |
|
jScrollPane2.setViewportView(jList2); |
|
111 |
|
|
|
112 |
|
jButton4.setText("OK"); |
|
113 |
|
|
83 |
114 |
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); |
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); |
84 |
115 |
jPanel1.setLayout(jPanel1Layout); |
jPanel1.setLayout(jPanel1Layout); |
85 |
116 |
jPanel1Layout.setHorizontalGroup( |
jPanel1Layout.setHorizontalGroup( |
|
... |
... |
public class TimeMenu extends javax.swing.JDialog { |
87 |
118 |
.addGroup(jPanel1Layout.createSequentialGroup() |
.addGroup(jPanel1Layout.createSequentialGroup() |
88 |
119 |
.addContainerGap() |
.addContainerGap() |
89 |
120 |
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
90 |
|
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
|
121 |
|
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 280, Short.MAX_VALUE) |
91 |
122 |
.addGroup(jPanel1Layout.createSequentialGroup() |
.addGroup(jPanel1Layout.createSequentialGroup() |
|
123 |
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
124 |
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) |
92 |
125 |
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
93 |
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
94 |
|
.addComponent(jButton1)) |
|
95 |
|
.addGap(0, 179, Short.MAX_VALUE))) |
|
|
126 |
|
.addComponent(jButton2) |
|
127 |
|
.addComponent(jButton3)) |
|
128 |
|
.addGap(0, 0, Short.MAX_VALUE)) |
|
129 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
130 |
|
.addComponent(jButton1) |
|
131 |
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
132 |
|
.addComponent(jButton4))) |
96 |
133 |
.addContainerGap()) |
.addContainerGap()) |
|
134 |
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() |
|
135 |
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
136 |
|
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
137 |
|
.addGap(18, 18, 18)) |
97 |
138 |
); |
); |
98 |
139 |
jPanel1Layout.setVerticalGroup( |
jPanel1Layout.setVerticalGroup( |
99 |
140 |
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
100 |
141 |
.addGroup(jPanel1Layout.createSequentialGroup() |
.addGroup(jPanel1Layout.createSequentialGroup() |
101 |
|
.addContainerGap() |
|
102 |
142 |
.addComponent(jLabel1) |
.addComponent(jLabel1) |
103 |
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) |
|
104 |
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE) |
|
|
143 |
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
|
144 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
145 |
|
.addGap(55, 55, 55) |
|
146 |
|
.addComponent(jButton2) |
|
147 |
|
.addGap(18, 18, 18) |
|
148 |
|
.addComponent(jButton3)) |
|
149 |
|
.addGroup(jPanel1Layout.createSequentialGroup() |
|
150 |
|
.addGap(16, 16, 16) |
|
151 |
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) |
|
152 |
|
.addComponent(jScrollPane2) |
|
153 |
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)))) |
105 |
154 |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE) |
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE) |
106 |
|
.addComponent(jButton1) |
|
|
155 |
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) |
|
156 |
|
.addComponent(jButton1) |
|
157 |
|
.addComponent(jButton4)) |
107 |
158 |
.addContainerGap()) |
.addContainerGap()) |
108 |
159 |
); |
); |
109 |
160 |
|
|
|
... |
... |
public class TimeMenu extends javax.swing.JDialog { |
118 |
169 |
); |
); |
119 |
170 |
layout.setVerticalGroup( |
layout.setVerticalGroup( |
120 |
171 |
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
121 |
|
.addGroup(layout.createSequentialGroup() |
|
|
172 |
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() |
122 |
173 |
.addContainerGap() |
.addContainerGap() |
123 |
174 |
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
124 |
175 |
.addContainerGap()) |
.addContainerGap()) |
|
... |
... |
public class TimeMenu extends javax.swing.JDialog { |
133 |
184 |
parent.setVisible(true); |
parent.setVisible(true); |
134 |
185 |
}//GEN-LAST:event_jButton1ActionPerformed |
}//GEN-LAST:event_jButton1ActionPerformed |
135 |
186 |
|
|
136 |
|
|
|
|
187 |
|
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed |
|
188 |
|
// select |
|
189 |
|
String selVal = jList1.getSelectedValue(); |
|
190 |
|
int ind = jList1.getSelectedIndex(); |
|
191 |
|
if (!selVal.isEmpty()) { |
|
192 |
|
lmod2.addElement(selVal); |
|
193 |
|
lmod1.remove(ind); |
|
194 |
|
jList1.setModel(lmod1); |
|
195 |
|
jList2.setModel(lmod2); |
|
196 |
|
|
|
197 |
|
//TODO: сортировка списков после добавления/удаления |
|
198 |
|
} |
|
199 |
|
|
|
200 |
|
|
|
201 |
|
}//GEN-LAST:event_jButton2ActionPerformed |
|
202 |
|
|
|
203 |
|
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed |
|
204 |
|
// unselect |
|
205 |
|
String selVal = jList2.getSelectedValue(); |
|
206 |
|
int ind = jList2.getSelectedIndex(); |
|
207 |
|
if (!selVal.isEmpty()) { |
|
208 |
|
lmod1.addElement(selVal); |
|
209 |
|
lmod2.remove(ind); |
|
210 |
|
jList1.setModel(lmod1); |
|
211 |
|
jList2.setModel(lmod2); |
|
212 |
|
} |
|
213 |
|
|
|
214 |
|
}//GEN-LAST:event_jButton3ActionPerformed |
|
215 |
|
|
137 |
216 |
|
|
138 |
217 |
// Variables declaration - do not modify//GEN-BEGIN:variables |
// Variables declaration - do not modify//GEN-BEGIN:variables |
139 |
218 |
private javax.swing.JButton jButton1; |
private javax.swing.JButton jButton1; |
|
219 |
|
private javax.swing.JButton jButton2; |
|
220 |
|
private javax.swing.JButton jButton3; |
|
221 |
|
private javax.swing.JButton jButton4; |
140 |
222 |
private javax.swing.JLabel jLabel1; |
private javax.swing.JLabel jLabel1; |
141 |
223 |
private javax.swing.JList<String> jList1; |
private javax.swing.JList<String> jList1; |
|
224 |
|
private javax.swing.JList<String> jList2; |
142 |
225 |
private javax.swing.JPanel jPanel1; |
private javax.swing.JPanel jPanel1; |
143 |
226 |
private javax.swing.JScrollPane jScrollPane1; |
private javax.swing.JScrollPane jScrollPane1; |
|
227 |
|
private javax.swing.JScrollPane jScrollPane2; |
144 |
228 |
// End of variables declaration//GEN-END:variables |
// End of variables declaration//GEN-END:variables |
145 |
229 |
} |
} |