Browse Source

在alphafine上试用一下高清图标

master
XiaXiang 7 years ago
parent
commit
351c240c60
  1. 2
      designer/src/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
  2. 12
      designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java
  3. 9
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

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

@ -66,7 +66,7 @@ public class AlphaFineConstants {
public static final Font GREATER_FONT = new Font("Song_TypeFace", 0, 20);
public static final String IMAGE_URL = "/com/fr/design/mainframe/alphafine/images/";
public static final String PLUGIN_SEARCH_URL = SiteCenter.getInstance().acquireUrlByKind("plugin.searchAPI");
public static final String PLUGIN_URL = "http://shop.finereport.com/plugin/";

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.alphafine.cell.render;
import com.bulenkov.iconloader.IconLoader;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel;
@ -15,6 +16,9 @@ import java.awt.*;
*/
public class ContentCellRender implements ListCellRenderer<Object> {
private static final int OFFSET = 45;
private static final String SELECTED_PATH = AlphaFineConstants.IMAGE_URL + "selected";
private static final String CELL_PATH = AlphaFineConstants.IMAGE_URL + "alphafine";
private static final String SUFFIX = ".png";
@Override
public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
@ -30,13 +34,13 @@ public class ContentCellRender implements ListCellRenderer<Object> {
titleLabel.setText(" " + model.getName());
if (model.hasAction()) {
if (isSelected) {
String iconUrl = "/com/fr/design/mainframe/alphafine/images/selected" + model.getType().getTypeValue() + ".png";
String iconUrl = SELECTED_PATH + model.getType().getTypeValue() + SUFFIX;
panel.setBackground(AlphaFineConstants.BLUE);
titleLabel.setForeground(Color.WHITE);
titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl)));
titleLabel.setIcon(IconLoader.getIcon(iconUrl));
} else {
String iconUrl = "/com/fr/design/mainframe/alphafine/images/alphafine" + model.getType().getTypeValue() + ".png";
titleLabel.setIcon(new ImageIcon(IOUtils.readImage(iconUrl)));
String iconUrl = CELL_PATH + model.getType().getTypeValue() + SUFFIX;
titleLabel.setIcon(IconLoader.getIcon(iconUrl));
titleLabel.setForeground(AlphaFineConstants.BLACK);
}

9
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.alphafine.component;
import com.bulenkov.iconloader.IconLoader;
import com.fr.base.ConfigManager;
import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager;
@ -134,7 +135,7 @@ public class AlphaFineDialog extends UIDialog {
private void initComponents() {
initSearchTextField();
JPanel topPane = new JPanel(new BorderLayout());
UILabel iconLabel = new UILabel(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/bigsearch.png")));
UILabel iconLabel = new UILabel(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + "bigsearch.png"));
iconLabel.setPreferredSize(AlphaFineConstants.ICON_LABEL_SIZE);
iconLabel.setOpaque(true);
iconLabel.setBackground(Color.WHITE);
@ -149,7 +150,7 @@ public class AlphaFineDialog extends UIDialog {
}
};
closeButton.setPreferredSize(AlphaFineConstants.CLOSE_BUTTON_SIZE);
closeButton.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/alphafine_close.png")));
closeButton.setIcon(IOUtils.readIcon(AlphaFineConstants.IMAGE_URL + "alphafine_close.png"));
closeButton.set4ToolbarButton();
closeButton.setBorderPainted(false);
closeButton.setRolloverEnabled(false);
@ -345,7 +346,7 @@ public class AlphaFineDialog extends UIDialog {
*/
private void removeLeftPane() {
if (searchListModel.isEmpty() && defaultPane == null) {
defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/no_result.png"));
defaultPane = new NoResultPane(Inter.getLocText("FR-Designer-AlphaFine_NO_Result"), AlphaFineConstants.IMAGE_URL + "no_result.png");
searchResultPane.remove(leftSearchResultPane);
searchResultPane.add(defaultPane, BorderLayout.WEST);
refreshContainer();
@ -556,7 +557,7 @@ public class AlphaFineDialog extends UIDialog {
break;
case ACTION:
rightSearchResultPane.removeAll();
rightSearchResultPane.add(new NoResultPane(Inter.getLocText("FR-Designer_NoResult"), IOUtils.readIcon("/com/fr/design/mainframe/alphafine/images/noresult.png")));
rightSearchResultPane.add(new NoResultPane(Inter.getLocText("FR-Designer_NoResult"), AlphaFineConstants.IMAGE_URL + "noresult.png"));
validate();
repaint();
break;

Loading…
Cancel
Save