Permalink
Browse files

fixing Item input handling (take the amount from line to the popup)

  • Loading branch information...
1 parent d850d05 commit 02e108f1d4f9a647c06e0aa27c8a665d989cb32d Jan Hahnisch committed Jul 29, 2013
@@ -211,4 +211,8 @@ public JTable getParentTable() {
public void setParentTable(JTable parentTable) {
this.parentTable = parentTable;
}
+
+ public void setQuantity(Double valueOf) {
+ labeledSpinner1.setValue(valueOf);
+ }
}
@@ -91,7 +91,7 @@
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="jPanel5" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
- <Component id="jSplitPane2" pref="266" max="32767" attributes="0"/>
+ <Component id="jSplitPane2" pref="246" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -1057,7 +1057,7 @@
<Group type="102" alignment="0" attributes="0">
<Component id="itemPanel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
- <Component id="jScrollPane3" pref="926" max="32767" attributes="0"/>
+ <Component id="jScrollPane3" pref="928" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -1130,7 +1130,7 @@
<Component id="upItem" min="-2" max="-2" attributes="1"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="upItem1" min="-2" max="-2" attributes="1"/>
- <EmptySpace pref="21" max="32767" attributes="0"/>
+ <EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -1337,13 +1337,13 @@
<SubComponents>
<Component class="javax.swing.JTable" name="proptable">
<Properties>
- <Property name="autoCreateRowSorter" type="boolean" value="true"/>
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
<Table columnCount="2" rowCount="20">
<Column editable="true" title="" type="java.lang.Object"/>
<Column editable="true" title="" type="java.lang.Object"/>
</Table>
</Property>
+ <Property name="autoCreateRowSorter" type="boolean" value="true"/>
<Property name="name" type="java.lang.String" value="proptable" noResource="true"/>
<Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
<JTableSelectionModel selectionMode="0"/>
@@ -1371,15 +1371,15 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
- <EmptySpace pref="529" max="32767" attributes="0"/>
+ <EmptySpace pref="528" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="addfile" alignment="0" min="-2" pref="24" max="-2" attributes="0"/>
<Component id="removefile" alignment="0" min="-2" pref="24" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
- <Component id="jScrollPane2" pref="522" max="32767" attributes="0"/>
+ <Component id="jScrollPane2" pref="521" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
</Group>
</Group>
@@ -1391,10 +1391,10 @@
<Component id="addfile" min="-2" max="-2" attributes="1"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="removefile" min="-2" max="-2" attributes="1"/>
- <EmptySpace pref="17" max="32767" attributes="0"/>
+ <EmptySpace pref="8" max="32767" attributes="0"/>
</Group>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
- <Component id="jScrollPane2" alignment="1" pref="79" max="32767" attributes="0"/>
+ <Component id="jScrollPane2" alignment="1" pref="70" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -70,7 +70,6 @@
import mpv5.ui.beans.MPCBSelectionChangeReceiver;
import mpv5.ui.dialogs.DialogForFile;
import mpv5.ui.dialogs.ScheduleDayEvent;
-import mpv5.ui.dialogs.Search2;
import mpv5.ui.dialogs.subcomponents.*;
import mpv5.ui.misc.MPTable;
import mpv5.ui.misc.Position;
@@ -36,6 +36,7 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
+import java.math.BigDecimal;
import javax.swing.DefaultCellEditor;
import javax.swing.JDialog;
@@ -49,8 +50,10 @@
import mpv5.db.objects.Product;
import mpv5.db.objects.SubItem;
import mpv5.ui.dialogs.subcomponents.ActivityTextAreaDialog;
+import mpv5.ui.dialogs.subcomponents.ItemTextAreaDialog;
import mpv5.ui.dialogs.subcomponents.ProductSelectDialog3;
import mpv5.utils.models.MPTableModel;
+import mpv5.utils.numberformat.FormatNumber;
public class TextAreaCellEditor extends DefaultCellEditor implements ActionListener {
protected final static String CANCEL = "CANCEL";
@@ -150,6 +153,11 @@ public void run() {
((ActivityTextAreaDialog) dialog).setSelectedProduct(
Integer.valueOf(table.getValueAt(row, 9).toString()), table.getValueAt(row, column).toString());
}
+ if (dialog instanceof ItemTextAreaDialog && !table.getValueAt(row, 2).equals(0)) {
+ Log.Debug(this, "ItemTextDialog");
+ ((ItemTextAreaDialog) dialog).setQuantity(
+ Double.parseDouble(table.getValueAt(row, 2).toString()));
@anti43

anti43 Jul 30, 2013

Owner

ist das immer in der form 2.3 ? nie mit komma, keine benutzereingabe?

@digger-bw

digger-bw via email Jul 30, 2013

Collaborator
@digger-bw

digger-bw via email Jul 30, 2013

Collaborator
@anti43

anti43 via email Jul 30, 2013

Owner
@digger-bw

digger-bw via email Jul 30, 2013

Collaborator
+ }
dialog.setVisible(true);
}
});

0 comments on commit 02e108f

Please sign in to comment.