Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 02e108f1d4f9a647c06e0aa27c8a665d989cb32d 1 parent d850d05
Jan Hahnisch authored
View
4 src/mpv5/ui/dialogs/subcomponents/ItemTextAreaDialog.java
@@ -211,4 +211,8 @@ public JTable getParentTable() {
public void setParentTable(JTable parentTable) {
this.parentTable = parentTable;
}
+
+ public void setQuantity(Double valueOf) {
+ labeledSpinner1.setValue(valueOf);
+ }
}
View
16 src/mpv5/ui/panels/ItemPanel.form
@@ -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,7 +1371,7 @@
<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"/>
@@ -1379,7 +1379,7 @@
</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>
View
1  src/mpv5/ui/panels/ItemPanel.java
@@ -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;
View
8 src/mpv5/utils/renderer/TextAreaCellEditor.java
@@ -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 Owner
anti43 added a note

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

@digger-bw Collaborator
@digger-bw Collaborator
@anti43 Owner
anti43 added a note
@digger-bw Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ }
dialog.setVisible(true);
}
});
@anti43

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

@digger-bw
@digger-bw
@anti43
@digger-bw
Please sign in to comment.
Something went wrong with that request. Please try again.