Margin display
This commit is contained in:
parent
3a01f672eb
commit
f7c2b6266e
@ -36,9 +36,10 @@
|
||||
<Component class="javax.swing.JTable" name="assetTable">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
|
||||
<Table columnCount="2" rowCount="2">
|
||||
<Table columnCount="3" rowCount="2">
|
||||
<Column editable="false" title="Asset" type="java.lang.String"/>
|
||||
<Column editable="false" title="Ammount" type="java.lang.String"/>
|
||||
<Column editable="false" title="Margin" type="java.lang.String"/>
|
||||
</Table>
|
||||
</Property>
|
||||
<Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
|
||||
|
@ -62,9 +62,14 @@ public class AccountPanel extends javax.swing.JPanel implements EventListener{
|
||||
Double avail = account.getAvail(a);
|
||||
String astr = val.toString() + "/" + avail.toString();
|
||||
|
||||
Double mval = account.getMargin(a);
|
||||
Double mavail = account.getAvail(a);
|
||||
String mastr = mval.toString(); // + "/" + mavail.toString();
|
||||
|
||||
// model.setValueAt(ob1.getAccount().getOwner().getName(), row, 0);
|
||||
model.setValueAt(a.getSymbol(), row, 0);
|
||||
model.setValueAt(astr, row, 1);
|
||||
model.setValueAt(mastr, row, 2);
|
||||
row++;
|
||||
}
|
||||
|
||||
@ -84,18 +89,18 @@ public class AccountPanel extends javax.swing.JPanel implements EventListener{
|
||||
|
||||
assetTable.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
{null, null},
|
||||
{null, null}
|
||||
{null, null, null},
|
||||
{null, null, null}
|
||||
},
|
||||
new String [] {
|
||||
"Asset", "Ammount"
|
||||
"Asset", "Ammount", "Margin"
|
||||
}
|
||||
) {
|
||||
Class[] types = new Class [] {
|
||||
java.lang.String.class, java.lang.String.class
|
||||
java.lang.String.class, java.lang.String.class, java.lang.String.class
|
||||
};
|
||||
boolean[] canEdit = new boolean [] {
|
||||
false, false
|
||||
false, false, false
|
||||
};
|
||||
|
||||
public Class getColumnClass(int columnIndex) {
|
||||
|
Loading…
Reference in New Issue
Block a user