refactoring

This commit is contained in:
rusefi 2019-04-23 23:00:30 -04:00
parent 5ee54c3fe5
commit 9782acc425
1 changed files with 2 additions and 7 deletions

View File

@ -5,6 +5,7 @@ import com.rusefi.FileLog;
import com.rusefi.io.CommandQueue;
import com.rusefi.ui.RecentCommands;
import com.rusefi.ui.storage.Node;
import com.rusefi.ui.util.JTextFieldWithWidth;
import javax.swing.*;
import javax.swing.event.DocumentEvent;
@ -195,13 +196,7 @@ public class AnyCommand {
}
public static AnyCommand createField(Node config, String defaultCommand, boolean listenToCommands, boolean withCommandCaption) {
final JTextField text = new JTextField() {
@Override
public Dimension getPreferredSize() {
Dimension size = super.getPreferredSize();
return new Dimension(200, size.height);
}
};
final JTextField text = new JTextFieldWithWidth(200);
final AnyCommand command = new AnyCommand(text, config, defaultCommand, listenToCommands, withCommandCaption);
text.addActionListener(new ActionListener() {