From 4f17f588fe9e7eed1879a562337731bc10183c92 Mon Sep 17 00:00:00 2001 From: icklesteve Date: Tue, 28 Aug 2018 09:58:56 +0100 Subject: [PATCH] CBUS Console Spotbugs --- .../cbus/swing/console/CbusConsolePane.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/java/src/jmri/jmrix/can/cbus/swing/console/CbusConsolePane.java b/java/src/jmri/jmrix/can/cbus/swing/console/CbusConsolePane.java index ae737d558c4c..d9a72d7bce23 100644 --- a/java/src/jmri/jmrix/can/cbus/swing/console/CbusConsolePane.java +++ b/java/src/jmri/jmrix/can/cbus/swing/console/CbusConsolePane.java @@ -130,7 +130,7 @@ public class CbusConsolePane extends jmri.jmrix.can.swing.CanPanel implements Ca protected JPanel statsPane; protected JPanel rxPacketPane; protected JPanel sendPacketPane; - protected JPanel SendEvPane; + protected JPanel sendEvPane; protected JPanel logOptionspane; protected JRadioButton onButton = new JRadioButton(); @@ -602,35 +602,35 @@ public void actionPerformed(ActionEvent e) { }); // Pane for constructing event to send - SendEvPane = new JPanel(); + sendEvPane = new JPanel(); - SendEvPane.setVisible(true); + sendEvPane.setVisible(true); showSendEventCheckBox.setSelected(false); - SendEvPane.setBorder(BorderFactory.createTitledBorder( + sendEvPane.setBorder(BorderFactory.createTitledBorder( BorderFactory.createEtchedBorder(), Bundle.getMessage("ButtonSendEvent"))); nnField = new JTextField("0", 5); nnField.setToolTipText("" + Bundle.getMessage("ToolTipNodeNumber") + "
" + Bundle.getMessage("ToolTipPrefix") + ""); - SendEvPane.add(nodeNumberLabel); - SendEvPane.add(nnField); + sendEvPane.add(nodeNumberLabel); + sendEvPane.add(nnField); evField = new JTextField("0", 5); evField.setToolTipText("" + Bundle.getMessage("ToolTipEvent") + "
" + Bundle.getMessage("ToolTipPrefix") + ""); - SendEvPane.add(eventLabel); - SendEvPane.add(evField); + sendEvPane.add(eventLabel); + sendEvPane.add(evField); onOffGroup.add(onButton); onOffGroup.add(offButton); - SendEvPane.add(onButton); - SendEvPane.add(offButton); - SendEvPane.add(sendEvButton); - SendEvPane.add(decimalCheckBoxC); - SendEvPane.setVisible(false); - southPane.add(SendEvPane); + sendEvPane.add(onButton); + sendEvPane.add(offButton); + sendEvPane.add(sendEvButton); + sendEvPane.add(decimalCheckBoxC); + sendEvPane.setVisible(false); + southPane.add(sendEvPane); add(southPane, BorderLayout.SOUTH); @@ -680,7 +680,7 @@ public void actionPerformed(ActionEvent e) { showSendEventCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - SendEvPane.setVisible(showSendEventCheckBox.isSelected()); + sendEvPane.setVisible(showSendEventCheckBox.isSelected()); } }); @@ -738,7 +738,7 @@ public void actionPerformed(java.awt.event.ActionEvent e) { ActionListener logenteraction = ae -> { - TextToLogButtonActionPerformed(ae); + textToLogButtonActionPerformed(ae); }; logenterButton.addActionListener(logenteraction); @@ -969,7 +969,7 @@ public void openLogFileActionPerformed(java.awt.event.ActionEvent e) throws IOEx } - public void TextToLogButtonActionPerformed(java.awt.event.ActionEvent e) { + public void textToLogButtonActionPerformed(java.awt.event.ActionEvent e) { nextLine(entryField.getText() + "\n", entryField.getText() + "\n", "", -1); } @@ -1435,7 +1435,7 @@ public CbusHighlightPainter(Color color) { * Keeps the message log windows to a reasonable length * https://community.oracle.com/thread/1373400 */ - public class TextAreaFIFO extends JTextArea implements DocumentListener { + protected static class TextAreaFIFO extends JTextArea implements DocumentListener { private int maxLines; public TextAreaFIFO(int lines) {