Unlimited sell order works now
This commit is contained in:
@ -91,9 +91,10 @@
|
||||
<Component class="javax.swing.JComboBox" name="typeComboBox">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="2">
|
||||
<StringItem index="0" value="Buy "/>
|
||||
<StringItem index="1" value="Sell"/>
|
||||
<StringArray count="3">
|
||||
<StringItem index="0" value="Buy Limit"/>
|
||||
<StringItem index="1" value="Sell Limit"/>
|
||||
<StringItem index="2" value="Sell"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
@ -53,8 +53,8 @@ public class CreateOrderDialog extends javax.swing.JDialog {
|
||||
public CreateOrderDialog(java.awt.Frame parent, boolean modal, Account account, OrderType type) {
|
||||
this(parent, modal);
|
||||
this.account = account;
|
||||
typeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[]{"Buy ", "Sell"}));
|
||||
typeList = new OrderType[]{OrderType.BUYLIMIT, OrderType.SELLLIMIT};
|
||||
typeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[]{"Buy Lim", "Sell Lim", "Sell"}));
|
||||
typeList = new OrderType[]{OrderType.BUYLIMIT, OrderType.SELLLIMIT, OrderType.SELL};
|
||||
for (int i = 0; i < typeList.length; i++) {
|
||||
if (typeList[i] == type) {
|
||||
this.typeComboBox.setSelectedIndex(i);
|
||||
@ -123,7 +123,7 @@ public class CreateOrderDialog extends javax.swing.JDialog {
|
||||
}
|
||||
});
|
||||
|
||||
typeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Buy ", "Sell" }));
|
||||
typeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Buy Limit", "Sell Limit", "Sell" }));
|
||||
|
||||
limitSpinner.setModel(new javax.swing.SpinnerNumberModel(0.0d, 0.0d, null, 0.1d));
|
||||
|
||||
|
Reference in New Issue
Block a user