Browse Source

alphafine 选中状态的交互修改

master
XiaXiang 7 years ago
parent
commit
3921acd85e
  1. 11
      designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java
  2. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected1.png
  3. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected2.png
  4. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected3.png
  5. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected4.png
  6. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected5.png

11
designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java

@ -28,13 +28,18 @@ public class ContentCellRender implements ListCellRenderer<Object> {
panel.setBackground(null);
panel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
titleLabel.setText(" " + model.getName());
String iconUrl = "/com/fr/design/mainframe/alphafine/images/alphafine" + model.getType().getTypeValue() + ".png";
if (model.hasAction()) {
if (isSelected) {
String iconUrl = "/com/fr/design/mainframe/alphafine/images/selected" + model.getType().getTypeValue() + ".png";
panel.setBackground(AlphaFineConstants.BLUE);
titleLabel.setForeground(Color.white);
titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl)));
} else {
String iconUrl = "/com/fr/design/mainframe/alphafine/images/alphafine" + model.getType().getTypeValue() + ".png";
titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl)));
titleLabel.setForeground(AlphaFineConstants.BLACK);
}
titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl)));
titleLabel.setForeground(AlphaFineConstants.BLACK);
} else {
titleLabel.setIcon(null);
titleLabel.setForeground(AlphaFineConstants.MEDIUM_GRAY);

BIN
designer/src/com/fr/design/mainframe/alphafine/images/selected1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
designer/src/com/fr/design/mainframe/alphafine/images/selected2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
designer/src/com/fr/design/mainframe/alphafine/images/selected3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
designer/src/com/fr/design/mainframe/alphafine/images/selected4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
designer/src/com/fr/design/mainframe/alphafine/images/selected5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Loading…
Cancel
Save