xiaoxia 8 years ago
parent
commit
2475c5e553
  1. 4
      designer/src/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
  2. 2
      designer/src/com/fr/design/mainframe/alphafine/cell/cellRender/ContentCellRender.java
  3. 6
      designer/src/com/fr/design/mainframe/alphafine/cell/cellRender/TitleCellRender.java

4
designer/src/com/fr/design/mainframe/alphafine/AlphaFineConstants.java

@ -39,8 +39,12 @@ public class AlphaFineConstants {
public static final Dimension CLOSE_BUTTON_SIZE = new Dimension(40, 40); public static final Dimension CLOSE_BUTTON_SIZE = new Dimension(40, 40);
public static final Color WHITE = new Color(0xf9f9f9);
public static final Color GRAY = new Color(0xd2d2d2); public static final Color GRAY = new Color(0xd2d2d2);
public static final Color LIGHT_GRAY = new Color(0xcccccc);
public static final Color BLUE = new Color(0x3394f0); public static final Color BLUE = new Color(0x3394f0);
public static final Color BLACK = new Color(0x222222); public static final Color BLACK = new Color(0x222222);

2
designer/src/com/fr/design/mainframe/alphafine/cell/cellRender/ContentCellRender.java

@ -40,7 +40,7 @@ public class ContentCellRender implements ListCellRenderer<Object> {
name.setHorizontalTextPosition(SwingConstants.RIGHT); name.setHorizontalTextPosition(SwingConstants.RIGHT);
if (model.getDescription() != null) { if (model.getDescription() != null) {
content.setText("-" + model.getDescription()); content.setText("-" + model.getDescription());
content.setForeground(new Color(0xcccccc)); content.setForeground(AlphaFineConstants.LIGHT_GRAY);
panel.add(content, BorderLayout.CENTER); panel.add(content, BorderLayout.CENTER);
} }
panel.add(name, BorderLayout.WEST); panel.add(name, BorderLayout.WEST);

6
designer/src/com/fr/design/mainframe/alphafine/cell/cellRender/TitleCellRender.java

@ -21,14 +21,14 @@ public class TitleCellRender implements ListCellRenderer<Object> {
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) { public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
MoreModel moreModel = (MoreModel)value; MoreModel moreModel = (MoreModel)value;
JPanel panel = new JPanel(new BorderLayout()); JPanel panel = new JPanel(new BorderLayout());
panel.setBackground(new Color(0xf9f9f9)); panel.setBackground(AlphaFineConstants.WHITE);
panel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0)); panel.setBorder(BorderFactory.createEmptyBorder(0,15,0,0));
name.setText(moreModel.getName()); name.setText(moreModel.getName());
name.setFont(AlphaFineConstants.SMALL_FONT); name.setFont(AlphaFineConstants.SMALL_FONT);
more.setFont(AlphaFineConstants.SMALL_FONT); more.setFont(AlphaFineConstants.SMALL_FONT);
more.setText(moreModel.getContent()); more.setText(moreModel.getContent());
name.setForeground(new Color(0x666666)); name.setForeground(AlphaFineConstants.DARK_GRAY);
more.setForeground(new Color(0x666666)); more.setForeground(AlphaFineConstants.DARK_GRAY);
panel.add(name, BorderLayout.WEST); panel.add(name, BorderLayout.WEST);
if (moreModel.isNeedMore()) { if (moreModel.isNeedMore()) {
this.more.setBorder(BorderFactory.createEmptyBorder(0,0,0,10)); this.more.setBorder(BorderFactory.createEmptyBorder(0,0,0,10));

Loading…
Cancel
Save