[cooja] dialogs/MessageList: Added @Override annotations
This commit is contained in:
parent
40f54a8e26
commit
927d9a3153
|
@ -130,6 +130,7 @@ public class MessageList extends JList {
|
|||
final BufferedReader stringInput = new BufferedReader(new InputStreamReader(input));
|
||||
|
||||
Thread readThread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
String readLine;
|
||||
try {
|
||||
|
@ -184,6 +185,7 @@ public class MessageList extends JList {
|
|||
messages.add(msg);
|
||||
|
||||
java.awt.EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updateModel();
|
||||
}
|
||||
|
@ -195,6 +197,7 @@ public class MessageList extends JList {
|
|||
((DefaultListModel) getModel()).clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setModel(ListModel model) {
|
||||
throw new IllegalArgumentException("changing model not permitted");
|
||||
}
|
||||
|
@ -203,16 +206,19 @@ public class MessageList extends JList {
|
|||
if (popup == null) {
|
||||
popup = new JPopupMenu();
|
||||
addMouseListener(new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.isPopupTrigger()) {
|
||||
popup.show(MessageList.this, e.getX(), e.getY());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
if (e.isPopupTrigger()) {
|
||||
popup.show(MessageList.this, e.getX(), e.getY());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
if (e.isPopupTrigger()) {
|
||||
popup.show(MessageList.this, e.getX(), e.getY());
|
||||
|
@ -230,6 +236,7 @@ public class MessageList extends JList {
|
|||
final JMenuItem hideNormalMenuItem = new JCheckBoxMenuItem("Hide normal output");
|
||||
hideNormalMenuItem.setEnabled(true);
|
||||
hideNormalMenuItem.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
MessageList.this.hideNormal = hideNormalMenuItem.isSelected();
|
||||
((MessageModel)getModel()).updateList();
|
||||
|
@ -240,6 +247,7 @@ public class MessageList extends JList {
|
|||
JMenuItem consoleOutputMenuItem = new JMenuItem("Output to console");
|
||||
consoleOutputMenuItem.setEnabled(true);
|
||||
consoleOutputMenuItem.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
MessageContainer[] messages = getMessages();
|
||||
System.out.println("\nCOMPILATION OUTPUT:\n");
|
||||
|
@ -257,6 +265,7 @@ public class MessageList extends JList {
|
|||
JMenuItem clipboardMenuItem = new JMenuItem("Copy to clipboard");
|
||||
clipboardMenuItem.setEnabled(true);
|
||||
clipboardMenuItem.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
|
||||
|
@ -299,6 +308,7 @@ public class MessageList extends JList {
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return message;
|
||||
}
|
||||
|
@ -318,6 +328,7 @@ public class MessageList extends JList {
|
|||
|
||||
private class MessageRenderer extends DefaultListCellRenderer {
|
||||
private Dimension nullDimension = new Dimension(0,0);
|
||||
@Override
|
||||
public Component getListCellRendererComponent(
|
||||
JList list,
|
||||
Object value,
|
||||
|
|
Loading…
Reference in a new issue