diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java index 0b5c7b61e..3f198f230 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/CellStyleListEditPane.java @@ -30,9 +30,11 @@ import com.fr.stable.Nameable; import com.fr.stable.StringUtils; import javax.swing.BorderFactory; +import javax.swing.DefaultListModel; import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JPanel; +import javax.swing.ListModel; import javax.swing.SwingUtilities; import java.awt.BorderLayout; import java.awt.Component; @@ -101,7 +103,7 @@ public class CellStyleListEditPane extends JListControlPane { @Override protected JNameEdList createJNameList() { - JNameEdList nameEdList = super.createJNameList(); + JNameEdList nameEdList = new NoIconNamedList(new DefaultListModel()); nameEdList.setCellEditor(new UnEditableListCellEditor(new UITextField())); nameEdList.setCellRenderer(new NoIconNameableListCellRenderer()); return nameEdList; @@ -294,6 +296,17 @@ public class CellStyleListEditPane extends JListControlPane { return component; } } + private class NoIconNamedList extends JNameEdList { + + public NoIconNamedList(ListModel dataModel) { + super(dataModel); + } + + @Override + public int getIconWidth() { + return 0; + } + } private class UnEditableListCellEditor extends DefaultListCellEditor { public UnEditableListCellEditor(UITextField textField) {