Commit ebe0c40f authored by Mihai Herda's avatar Mihai Herda
Browse files

Opt button for watch expressions and conditional breakpoints now has

"Opt" written on it, so you can see it's a button.

Default watch expressions and conditional breakpoints are now "false".
parent b5e25ce8
......@@ -145,10 +145,10 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
dataEntries = new ArrayList<String[]>();
String[] s = new String[3];
s[0] = " ";
s[1] = "A.i <= B.k";
s[1] = "false";
s[2] = "false";
dataEntries.add(s);
mainInterface.getControlFacade().createConditionalBreakpoint(0, "A.i <= B.k");
mainInterface.getControlFacade().createConditionalBreakpoint(0, "false");
tableModel = new DefaultTableModel(createDataFromList(), columnTitles) {
@Override
public boolean isCellEditable(int row, int column) {
......@@ -157,8 +157,8 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
};
table = new JTable(tableModel);
table.setToolTipText(CB_TOOLTIP);
table.getColumnModel().getColumn(0).setPreferredWidth(5);
table.getColumnModel().getColumn(1).setPreferredWidth(150);
table.getColumnModel().getColumn(0).setPreferredWidth(30);
table.getColumnModel().getColumn(1).setPreferredWidth(130);
table.getColumnModel().getColumn(2).setPreferredWidth(5);
table.addMouseListener(new MouseListener() {
@Override
......@@ -255,7 +255,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
int row = this.table.getRowCount();
idMap.put(row, currentHighestId + 1);
currentHighestId++;
String[] newRow = { " ", "A.i <= B.k", "" };
String[] newRow = { "Opt", "false", "" };
tableModel.addRow(newRow);
// ArrayList<Object[]> dataAsList = new ArrayList<>(dataEntries.length);
// dataAsList.addAll(Arrays.asList(dataEntries));
......@@ -272,7 +272,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
int row = this.table.getRowCount();
idMap.put(row, id);
currentHighestId = Math.max(currentHighestId, id);
String[] newRow = { " ", "A.i <= B.k", " " };
String[] newRow = { "Opt", "false", " " };
tableModel.addRow(newRow);
dataEntries.add(newRow);
this.updateUI();
......@@ -306,7 +306,7 @@ public class ConditionalBreakpointPanel extends ExpressionPanel {
//Option Cell Renderer
private class ButtonCellRenderer extends DefaultTableCellRenderer{
private static final long serialVersionUID = 1L;
private final JButton btn = new JButton("");
private final JButton btn = new JButton("Opt");
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
......
......@@ -119,7 +119,7 @@ public class WatchExpressionPanel extends ExpressionPanel {
addButton.addActionListener(e -> {
addRow();
mainInterface.getControlFacade().createWatchExpression(currentHighestId, "A.i * B.k");
mainInterface.getControlFacade().createWatchExpression(currentHighestId, "false");
getWatchExpressionPanel(mainInterface).updateUI();
saveWEs();
});
......@@ -144,10 +144,10 @@ public class WatchExpressionPanel extends ExpressionPanel {
dataEntries = new ArrayList<String[]>();
String[] s = new String[3];
s[0] = " ";
s[1] = "A.i * B.k";
s[1] = "false";
s[2] = " ";
dataEntries.add(s);
mainInterface.getControlFacade().createWatchExpression(0, "A.i * B.k");
mainInterface.getControlFacade().createWatchExpression(0, "false");
tableModel = new DefaultTableModel(createDataFromList(), columnTitles) {
@Override
......@@ -157,8 +157,8 @@ public class WatchExpressionPanel extends ExpressionPanel {
};
table = new JTable(tableModel);
table.setToolTipText(WE_TOOLTIP);
table.getColumnModel().getColumn(0).setPreferredWidth(5);
table.getColumnModel().getColumn(1).setPreferredWidth(150);
table.getColumnModel().getColumn(0).setPreferredWidth(30);
table.getColumnModel().getColumn(1).setPreferredWidth(130);
table.getColumnModel().getColumn(2).setPreferredWidth(10);
table.addMouseListener(new MouseListener() {
@Override
......@@ -269,7 +269,7 @@ public class WatchExpressionPanel extends ExpressionPanel {
int row = this.table.getRowCount();
idMap.put(row, currentHighestId + 1);
currentHighestId += 1;
String[] newRow = { " ", "A.i * B.k", " " };
String[] newRow = { " ", "false", " " };
tableModel.addRow(newRow);
// ArrayList<Object[]> dataAsList = new ArrayList<>(dataEntries.length);
// dataAsList.addAll(Arrays.asList(dataEntries));
......@@ -286,7 +286,7 @@ public class WatchExpressionPanel extends ExpressionPanel {
int row = this.table.getRowCount();
idMap.put(row, id);
currentHighestId = Math.max(currentHighestId, id);
String[] newRow = { " ", "A.i * B.k", " " };
String[] newRow = { " ", "false", " " };
tableModel.addRow(newRow);
dataEntries.add(newRow);
this.updateUI();
......@@ -318,7 +318,7 @@ public class WatchExpressionPanel extends ExpressionPanel {
//Option Cell Renderer
private class ButtonCellRenderer extends DefaultTableCellRenderer{
private static final long serialVersionUID = 1L;
private final JButton btn = new JButton("");
private final JButton btn = new JButton("Opt");
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment