mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-09 08:15:09 +03:00
ComboBox: simplified code in configureEditor()
This commit is contained in:
@@ -356,13 +356,9 @@ public class FlatComboBoxUI
|
|||||||
protected void configureEditor() {
|
protected void configureEditor() {
|
||||||
super.configureEditor();
|
super.configureEditor();
|
||||||
|
|
||||||
if( editor instanceof JTextField ) {
|
// remove default text field border from editor
|
||||||
JTextField textField = (JTextField) editor;
|
if( editor instanceof JTextField && ((JTextField)editor).getBorder() instanceof FlatTextBorder )
|
||||||
|
((JTextField)editor).setBorder( BorderFactory.createEmptyBorder() );
|
||||||
// remove default text field border from editor
|
|
||||||
if( textField.getBorder() instanceof FlatTextBorder )
|
|
||||||
textField.setBorder( BorderFactory.createEmptyBorder() );
|
|
||||||
}
|
|
||||||
|
|
||||||
// explicitly make non-opaque
|
// explicitly make non-opaque
|
||||||
if( editor instanceof JComponent )
|
if( editor instanceof JComponent )
|
||||||
@@ -554,7 +550,6 @@ public class FlatComboBoxUI
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Dimension getDisplaySize() {
|
protected Dimension getDisplaySize() {
|
||||||
|
|
||||||
paddingBorder.uninstall();
|
paddingBorder.uninstall();
|
||||||
Dimension displaySize = super.getDisplaySize();
|
Dimension displaySize = super.getDisplaySize();
|
||||||
paddingBorder.uninstall();
|
paddingBorder.uninstall();
|
||||||
|
|||||||
Reference in New Issue
Block a user