|
|
|
@ -329,7 +329,7 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
|
|
|
|
|
width = Math.max(width, calculateUIListMaxCellWidth(uiList.getModel(), uiList.getFontMetrics(uiList.getFont()))); |
|
|
|
|
} |
|
|
|
|
iterator = nameEdListMap.entrySet().iterator(); |
|
|
|
|
width += 40; |
|
|
|
|
width += 30; |
|
|
|
|
while (iterator.hasNext()) { |
|
|
|
|
Map.Entry<String, ListWrapperPane> entry = iterator.next(); |
|
|
|
|
ListWrapperPane wrapperPane = entry.getValue(); |
|
|
|
@ -349,7 +349,8 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
|
|
|
|
|
} else { |
|
|
|
|
text = element.toString(); |
|
|
|
|
} |
|
|
|
|
width = Math.max(width, fontMetrics.stringWidth(text)); |
|
|
|
|
//增加 10px 的左右间隔
|
|
|
|
|
width = Math.max(width, fontMetrics.stringWidth(text) + 10); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return width; |
|
|
|
@ -539,7 +540,8 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
|
|
|
|
|
label.setBackground(Color.WHITE); |
|
|
|
|
label.setForeground(Color.decode("#333334")); |
|
|
|
|
label.setFont(label.getFont().deriveFont(11F)); |
|
|
|
|
label.setPreferredSize(new Dimension(224, 26)); |
|
|
|
|
//预留 10px 的纵向滚动条的宽度
|
|
|
|
|
label.setPreferredSize(new Dimension(214, 26)); |
|
|
|
|
this.nameEdList = nameEdList; |
|
|
|
|
this.add(label, BorderLayout.NORTH); |
|
|
|
|
this.add(this.nameEdList, BorderLayout.CENTER); |
|
|
|
|