order popup is now in the right position
This commit is contained in:
parent
4a68336f5a
commit
35e2160635
@ -55,12 +55,12 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" alignment="1" pref="400" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" alignment="0" pref="221" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
|
@ -90,6 +90,7 @@ public class OpenOrdersList extends javax.swing.JPanel {
|
||||
model.setRowCount(0);
|
||||
table.setFillsViewportHeight(true);
|
||||
updateModel();
|
||||
|
||||
}
|
||||
|
||||
public void initOrderList(Account account) {
|
||||
@ -179,11 +180,11 @@ public class OpenOrdersList extends javax.swing.JPanel {
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE)
|
||||
.addComponent(jScrollPane1)
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
@ -191,11 +192,11 @@ public class OpenOrdersList extends javax.swing.JPanel {
|
||||
|
||||
Point point = evt.getPoint();
|
||||
int currentRow = table.rowAtPoint(point);
|
||||
if (currentRow == -1) {
|
||||
|
||||
} else {
|
||||
|
||||
if (currentRow != -1) {
|
||||
|
||||
table.setRowSelectionInterval(currentRow, currentRow);
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
int nbuttons = MouseInfo.getNumberOfButtons();
|
||||
@ -204,9 +205,7 @@ public class OpenOrdersList extends javax.swing.JPanel {
|
||||
return;
|
||||
}
|
||||
|
||||
this.ctxMenu.show(this, evt.getX(), evt.getY());
|
||||
|
||||
System.out.printf("Button %d %d \n", nbuttons, button);
|
||||
ctxMenu.show(table, point.x,point.y);
|
||||
|
||||
}//GEN-LAST:event_tableMousePressed
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user