From 444dfc613a86e9c4995fa46b1dcc00a64e2284ce Mon Sep 17 00:00:00 2001 From: XiaXiang Date: Sun, 9 Jul 2017 18:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=8A=A8=E7=94=BB=E6=98=AF?= =?UTF-8?q?=EF=BC=8C=E6=B6=88=E9=99=A4=E6=96=87=E5=AD=97=E4=BD=8D=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/alphafine/cell/render/TitleCellRender.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java index ca1890ea82..c5329da68c 100644 --- a/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java +++ b/designer/src/com/fr/design/mainframe/alphafine/cell/render/TitleCellRender.java @@ -12,6 +12,7 @@ import java.awt.*; * Created by XiaXiang on 2017/4/20. */ public class TitleCellRender implements ListCellRenderer { + private static final int LOAD_OFFSET = 28; @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { @@ -23,9 +24,9 @@ public class TitleCellRender implements ListCellRenderer { panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0)); titleLabel.setText(moreModel.getName()); titleLabel.setFont(AlphaFineConstants.SMALL_FONT); + titleLabel.setForeground(AlphaFineConstants.DARK_GRAY); showMoreLabel.setFont(AlphaFineConstants.SMALL_FONT); showMoreLabel.setText(moreModel.getContent()); - titleLabel.setForeground(AlphaFineConstants.DARK_GRAY); showMoreLabel.setForeground(AlphaFineConstants.DARK_GRAY); panel.add(titleLabel, BorderLayout.WEST); if (moreModel.isNeedMore()) { @@ -37,7 +38,8 @@ public class TitleCellRender implements ListCellRenderer { //设置cell的加载动画 imageIcon.setImageObserver(list); UILabel loadingLabel = new UILabel(imageIcon); - panel.add(loadingLabel, BorderLayout.SOUTH); + loadingLabel.setBorder(BorderFactory.createEmptyBorder(LOAD_OFFSET,0,0,0)); + panel.add(loadingLabel, 0); } panel.setPreferredSize(new Dimension(list.getFixedCellWidth(), AlphaFineConstants.CELL_TITLE_HEIGHT)); return panel;