Link samples table to GUI events
This commit is contained in:
@@ -87,15 +87,18 @@ public class MainPanel extends Panel {
|
||||
@Override
|
||||
public void valueChanged(ListSelectionEvent e) {
|
||||
try {
|
||||
String add = String.valueOf(tableSamples.getModel().getValueAt(tableSamples.getSelectedRow(), 3));
|
||||
if (!add.trim().isEmpty()) {
|
||||
String cur = Controller.getInstance().getCurrentSelection();
|
||||
if (cur != null) {
|
||||
cur = cur.substring(0, 2);
|
||||
}
|
||||
if (!add.equals(cur)) {
|
||||
Puck puck = Controller.getInstance().getPuck(add);
|
||||
Controller.getInstance().selectPuck(puck);
|
||||
int selection = tableSamples.getSelectedRow();
|
||||
if (selection>=0){
|
||||
String add = String.valueOf(tableSamples.getModel().getValueAt(selection, 3));
|
||||
if (!add.trim().isEmpty()) {
|
||||
String cur = Controller.getInstance().getCurrentSelection();
|
||||
if (cur != null) {
|
||||
cur = cur.substring(0, 2);
|
||||
}
|
||||
if (!add.equals(cur)) {
|
||||
Puck puck = Controller.getInstance().getPuck(add);
|
||||
Controller.getInstance().selectPuck(puck);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
|
||||
Reference in New Issue
Block a user