Renamed context menu item: 'Focus' -> 'Show in'
This commit is contained in:
parent
bdd164e003
commit
e6673bd3f6
|
@ -69,6 +69,7 @@ import javax.swing.JPopupMenu;
|
||||||
import javax.swing.JScrollPane;
|
import javax.swing.JScrollPane;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
|
import javax.swing.KeyStroke;
|
||||||
import javax.swing.RowFilter;
|
import javax.swing.RowFilter;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
@ -294,8 +295,7 @@ public class LogListener extends VisPlugin {
|
||||||
logTable.addKeyListener(new KeyAdapter() {
|
logTable.addKeyListener(new KeyAdapter() {
|
||||||
public void keyPressed(KeyEvent e) {
|
public void keyPressed(KeyEvent e) {
|
||||||
if (e.getKeyCode() == KeyEvent.VK_SPACE) {
|
if (e.getKeyCode() == KeyEvent.VK_SPACE) {
|
||||||
timeLineAction.actionPerformed(null);
|
showInAllAction.actionPerformed(null);
|
||||||
radioLoggerAction.actionPerformed(null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -349,7 +349,9 @@ public class LogListener extends VisPlugin {
|
||||||
popupMenu.addSeparator();
|
popupMenu.addSeparator();
|
||||||
popupMenu.add(new JMenuItem(saveAction));
|
popupMenu.add(new JMenuItem(saveAction));
|
||||||
popupMenu.addSeparator();
|
popupMenu.addSeparator();
|
||||||
JMenu focusMenu = new JMenu("Focus (Space)");
|
JMenu focusMenu = new JMenu("Show in");
|
||||||
|
focusMenu.add(new JMenuItem(showInAllAction));
|
||||||
|
focusMenu.addSeparator();
|
||||||
focusMenu.add(new JMenuItem(timeLineAction));
|
focusMenu.add(new JMenuItem(timeLineAction));
|
||||||
focusMenu.add(new JMenuItem(radioLoggerAction));
|
focusMenu.add(new JMenuItem(radioLoggerAction));
|
||||||
popupMenu.add(focusMenu);
|
popupMenu.add(focusMenu);
|
||||||
|
@ -697,7 +699,7 @@ public class LogListener extends VisPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private Action timeLineAction = new AbstractAction("in Timeline ") {
|
private Action timeLineAction = new AbstractAction("Timeline") {
|
||||||
private static final long serialVersionUID = -6358463434933029699L;
|
private static final long serialVersionUID = -6358463434933029699L;
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
int view = logTable.getSelectedRow();
|
int view = logTable.getSelectedRow();
|
||||||
|
@ -720,7 +722,7 @@ public class LogListener extends VisPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private Action radioLoggerAction = new AbstractAction("in Radio Logger") {
|
private Action radioLoggerAction = new AbstractAction("Radio Logger") {
|
||||||
private static final long serialVersionUID = -3041714249257346688L;
|
private static final long serialVersionUID = -3041714249257346688L;
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
int view = logTable.getSelectedRow();
|
int view = logTable.getSelectedRow();
|
||||||
|
@ -743,7 +745,18 @@ public class LogListener extends VisPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private Action showInAllAction = new AbstractAction("All") {
|
||||||
|
private static final long serialVersionUID = -8433490108577001803L;
|
||||||
|
{
|
||||||
|
putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
timeLineAction.actionPerformed(null);
|
||||||
|
radioLoggerAction.actionPerformed(null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private Action clearAction = new AbstractAction("Clear") {
|
private Action clearAction = new AbstractAction("Clear") {
|
||||||
private static final long serialVersionUID = -2115620313183440224L;
|
private static final long serialVersionUID = -2115620313183440224L;
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ import javax.swing.JSplitPane;
|
||||||
import javax.swing.JTable;
|
import javax.swing.JTable;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
import javax.swing.JTextPane;
|
import javax.swing.JTextPane;
|
||||||
|
import javax.swing.KeyStroke;
|
||||||
import javax.swing.event.ListSelectionEvent;
|
import javax.swing.event.ListSelectionEvent;
|
||||||
import javax.swing.event.ListSelectionListener;
|
import javax.swing.event.ListSelectionListener;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
|
@ -279,8 +280,7 @@ public class RadioLogger extends VisPlugin {
|
||||||
dataTable.addKeyListener(new KeyAdapter() {
|
dataTable.addKeyListener(new KeyAdapter() {
|
||||||
public void keyPressed(KeyEvent e) {
|
public void keyPressed(KeyEvent e) {
|
||||||
if (e.getKeyCode() == KeyEvent.VK_SPACE) {
|
if (e.getKeyCode() == KeyEvent.VK_SPACE) {
|
||||||
timeLineAction.actionPerformed(null);
|
showInAllAction.actionPerformed(null);
|
||||||
logListenerAction.actionPerformed(null);
|
|
||||||
} else if (e.getKeyCode() == KeyEvent.VK_F &&
|
} else if (e.getKeyCode() == KeyEvent.VK_F &&
|
||||||
(e.getModifiers() & KeyEvent.CTRL_MASK) != 0) {
|
(e.getModifiers() & KeyEvent.CTRL_MASK) != 0) {
|
||||||
searchField.setVisible(true);
|
searchField.setVisible(true);
|
||||||
|
@ -323,7 +323,9 @@ public class RadioLogger extends VisPlugin {
|
||||||
popupMenu.add(new JMenuItem(saveAction));
|
popupMenu.add(new JMenuItem(saveAction));
|
||||||
popupMenu.addSeparator();
|
popupMenu.addSeparator();
|
||||||
|
|
||||||
JMenu focusMenu = new JMenu("Focus (Space)");
|
JMenu focusMenu = new JMenu("Show in");
|
||||||
|
focusMenu.add(new JMenuItem(showInAllAction));
|
||||||
|
focusMenu.addSeparator();
|
||||||
focusMenu.add(new JMenuItem(timeLineAction));
|
focusMenu.add(new JMenuItem(timeLineAction));
|
||||||
focusMenu.add(new JMenuItem(logListenerAction));
|
focusMenu.add(new JMenuItem(logListenerAction));
|
||||||
popupMenu.add(focusMenu);
|
popupMenu.add(focusMenu);
|
||||||
|
@ -828,7 +830,7 @@ public class RadioLogger extends VisPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private Action timeLineAction = new AbstractAction("in Timeline") {
|
private Action timeLineAction = new AbstractAction("Timeline") {
|
||||||
private static final long serialVersionUID = -4035633464748224192L;
|
private static final long serialVersionUID = -4035633464748224192L;
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
int selectedRow = dataTable.getSelectedRow();
|
int selectedRow = dataTable.getSelectedRow();
|
||||||
|
@ -848,7 +850,7 @@ public class RadioLogger extends VisPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private Action logListenerAction = new AbstractAction("in Log Listener") {
|
private Action logListenerAction = new AbstractAction("Log Listener") {
|
||||||
private static final long serialVersionUID = 1985006491187878651L;
|
private static final long serialVersionUID = 1985006491187878651L;
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
int selectedRow = dataTable.getSelectedRow();
|
int selectedRow = dataTable.getSelectedRow();
|
||||||
|
@ -868,6 +870,17 @@ public class RadioLogger extends VisPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private Action showInAllAction = new AbstractAction("All") {
|
||||||
|
private static final long serialVersionUID = -3888292108886138128L;
|
||||||
|
{
|
||||||
|
putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0, true));
|
||||||
|
}
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
timeLineAction.actionPerformed(null);
|
||||||
|
logListenerAction.actionPerformed(null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private Properties aliases = null;
|
private Properties aliases = null;
|
||||||
private Action aliasAction = new AbstractAction("Assign alias") {
|
private Action aliasAction = new AbstractAction("Assign alias") {
|
||||||
private static final long serialVersionUID = -1678771087456128721L;
|
private static final long serialVersionUID = -1678771087456128721L;
|
||||||
|
|
|
@ -882,6 +882,14 @@ public class TimeLine extends VisPlugin {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private Action showInAllAction = new AbstractAction("All") {
|
||||||
|
private static final long serialVersionUID = -2458733078524773995L;
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
logListenerAction.actionPerformed(null);
|
||||||
|
radioLoggerAction.actionPerformed(null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
private boolean executionDetails = false;
|
private boolean executionDetails = false;
|
||||||
private boolean radioChannels = false;
|
private boolean radioChannels = false;
|
||||||
private Action executionDetailsAction = new AbstractAction("Show execution details in tooltips") {
|
private Action executionDetailsAction = new AbstractAction("Show execution details in tooltips") {
|
||||||
|
@ -1368,7 +1376,9 @@ public class TimeLine extends VisPlugin {
|
||||||
|
|
||||||
popupMenu.addSeparator();
|
popupMenu.addSeparator();
|
||||||
|
|
||||||
JMenu focusMenu = new JMenu("Focus");
|
JMenu focusMenu = new JMenu("Show in");
|
||||||
|
focusMenu.add(new JMenuItem(showInAllAction));
|
||||||
|
focusMenu.addSeparator();
|
||||||
focusMenu.add(new JMenuItem(logListenerAction));
|
focusMenu.add(new JMenuItem(logListenerAction));
|
||||||
focusMenu.add(new JMenuItem(radioLoggerAction));
|
focusMenu.add(new JMenuItem(radioLoggerAction));
|
||||||
popupMenu.add(focusMenu);
|
popupMenu.add(focusMenu);
|
||||||
|
@ -1399,8 +1409,7 @@ public class TimeLine extends VisPlugin {
|
||||||
/* Focus on double-click */
|
/* Focus on double-click */
|
||||||
if (System.currentTimeMillis() - lastClick < 250) {
|
if (System.currentTimeMillis() - lastClick < 250) {
|
||||||
popupLocation = e.getPoint();
|
popupLocation = e.getPoint();
|
||||||
logListenerAction.actionPerformed(null);
|
showInAllAction.actionPerformed(null);
|
||||||
radioLoggerAction.actionPerformed(null);
|
|
||||||
|
|
||||||
long time = (long) ((double)popupLocation.x*currentPixelDivisor);
|
long time = (long) ((double)popupLocation.x*currentPixelDivisor);
|
||||||
Plugin[] plugins = simulation.getGUI().getStartedPlugins();
|
Plugin[] plugins = simulation.getGUI().getStartedPlugins();
|
||||||
|
|
Loading…
Reference in a new issue