Trivial code cleanup

This commit is contained in:
Vhati 2017-12-10 20:20:19 -05:00
parent ec2403a984
commit f873a1d17a
4 changed files with 6 additions and 5 deletions

View file

@ -111,7 +111,7 @@ public class FieldEditorPanel extends JPanel {
if ( contentType == ContentType.WRAPPED_LABEL ) { if ( contentType == ContentType.WRAPPED_LABEL ) {
gridC.anchor = GridBagConstraints.WEST; gridC.anchor = GridBagConstraints.WEST;
JTextArea valueArea = new JTextArea(); JTextArea valueArea = new JTextArea();
valueArea.setBackground(null); valueArea.setBackground( null );
valueArea.setEditable( false ); valueArea.setEditable( false );
valueArea.setBorder( null ); valueArea.setBorder( null );
valueArea.setLineWrap( true ); valueArea.setLineWrap( true );
@ -383,12 +383,14 @@ public class FieldEditorPanel extends JPanel {
@Override @Override
public void removeAll() { public void removeAll() {
wrappedLabelMap.clear();
labelMap.clear(); labelMap.clear();
stringMap.clear(); stringMap.clear();
intMap.clear(); intMap.clear();
boolMap.clear(); boolMap.clear();
sliderMap.clear(); sliderMap.clear();
comboMap.clear(); comboMap.clear();
chooserMap.clear();
reminderMap.clear(); reminderMap.clear();
super.removeAll(); super.removeAll();
gridC = new GridBagConstraints(); gridC = new GridBagConstraints();

View file

@ -881,7 +881,7 @@ public class ManagerFrame extends JFrame implements ActionListener, ModsScanObse
} }
} }
catch ( IOException f ) { catch ( IOException f ) {
log.error( "Error opening mods/ folder", f ); log.error( String.format( "Error opening %s/ folder", backupDir.getName() ), f );
} }
} }
} }

View file

@ -100,7 +100,7 @@ public class ModXMLSandbox extends JFrame implements ActionListener {
this.datsDir = datsDir; this.datsDir = datsDir;
Font sandboxFont = new Font( "Monospaced", Font.PLAIN, 13 ); Font sandboxFont = new Font( Font.MONOSPACED, Font.PLAIN, 13 );
mainArea = new JTextArea(); mainArea = new JTextArea();
mainArea.setTabSize( 4 ); mainArea.setTabSize( 4 );

View file

@ -14,7 +14,6 @@ import javax.swing.JButton;
import javax.swing.JCheckBox; import javax.swing.JCheckBox;
import javax.swing.JDialog; import javax.swing.JDialog;
import javax.swing.JFileChooser; import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JScrollPane; import javax.swing.JScrollPane;
import javax.swing.JTextField; import javax.swing.JTextField;
@ -55,6 +54,7 @@ public class SlipstreamConfigDialog extends JDialog implements ActionListener {
editorPanel = new FieldEditorPanel( false ); editorPanel = new FieldEditorPanel( false );
editorPanel.setBorder( BorderFactory.createEmptyBorder( 10, 10, 0, 10 ) ); editorPanel.setBorder( BorderFactory.createEmptyBorder( 10, 10, 0, 10 ) );
editorPanel.setNameWidth( 250 ); editorPanel.setNameWidth( 250 );
editorPanel.addRow( ALLOW_ZIP, ContentType.BOOLEAN ); editorPanel.addRow( ALLOW_ZIP, ContentType.BOOLEAN );
editorPanel.addTextRow( "Treat .zip files as .ftl files." ); editorPanel.addTextRow( "Treat .zip files as .ftl files." );
editorPanel.addSeparatorRow(); editorPanel.addSeparatorRow();
@ -142,7 +142,6 @@ public class SlipstreamConfigDialog extends JDialog implements ActionListener {
}); });
} }
@Override @Override
public void actionPerformed( ActionEvent e ) { public void actionPerformed( ActionEvent e ) {
Object source = e.getSource(); Object source = e.getSource();