Browse Source

Merge pull request #1248 in BA/design from ~XIAOXIA/design:release/9.0 to release/9.0

* commit '971184d426167090f74473e4e511df7537c4c6c8':
  sitecenter
  rt
  rt
  高分辨率图片
  在alphafine上试用一下高清图标
  快捷键交互优化
master
superman 7 years ago
parent
commit
e7e89f6a3b
  1. 17
      designer/src/com/fr/design/mainframe/alphafine/AlphaFineConstants.java
  2. 12
      designer/src/com/fr/design/mainframe/alphafine/cell/render/ContentCellRender.java
  3. 26
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  4. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/alphafine1@2x.png
  5. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/alphafine2@2x.png
  6. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/alphafine3@2x.png
  7. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/alphafine4@2x.png
  8. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/alphafine5@2x.png
  9. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/alphafine_close@2x.png
  10. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/bigsearch@2x.png
  11. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/no_result@2x.png
  12. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/noresult@2x.png
  13. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/opening@2x.gif
  14. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected1@2x.png
  15. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected2@2x.png
  16. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected3@2x.png
  17. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected4@2x.png
  18. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/selected5@2x.png
  19. BIN
      designer/src/com/fr/design/mainframe/alphafine/images/smallsearch@2x.png
  20. 5
      designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java

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

@ -66,24 +66,25 @@ public class AlphaFineConstants {
public static final Font GREATER_FONT = new Font("Song_TypeFace", 0, 20); 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_SEARCH_URL = SiteCenter.getInstance().acquireUrlByKind("plugin.searchAPI");
public static final String PLUGIN_URL = "http://shop.finereport.com/plugin/"; public static final String PLUGIN_URL = SiteCenter.getInstance().acquireUrlByKind("af.plugin");
public static final String REUSE_URL = "http://shop.finereport.com/reuse/"; public static final String REUSE_URL = SiteCenter.getInstance().acquireUrlByKind("af.reuse");
public static final String DOCUMENT_DOC_URL = "http://help.finereport.com/doc-view-"; public static final String DOCUMENT_DOC_URL = SiteCenter.getInstance().acquireUrlByKind("af.doc_view");
public static final String DOCUMENT_SEARCH_URL = "http://help.finereport.com/?api-search-title-"; public static final String DOCUMENT_SEARCH_URL = SiteCenter.getInstance().acquireUrlByKind("af.doc_search");
public static final String DOCUMENT_INFORMATION_URL = "http://help.finereport.com/?api-search-did-"; public static final String DOCUMENT_INFORMATION_URL = SiteCenter.getInstance().acquireUrlByKind("af.doc_info");
public static final String PLUGIN_IMAGE_URL = "http://shopres.finereport.com/"; public static final String PLUGIN_IMAGE_URL = SiteCenter.getInstance().acquireUrlByKind("af.plugin_image");
public static final String CLOUD_SERVER_URL = "http://cloud.fanruan.com/api/monitor/record_of_afsearch/single"; public static final String CLOUD_SERVER_URL = SiteCenter.getInstance().acquireUrlByKind("af.record");
public static final String SEARCH_API = "http://cloud.fanruan.com/api/intelligence/search/recommend?searchKey="; public static final String SEARCH_API = SiteCenter.getInstance().acquireUrlByKind("af.cloud_search");
} }

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

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

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.alphafine.component; package com.fr.design.mainframe.alphafine.component;
import com.bulenkov.iconloader.IconLoader;
import com.fr.base.ConfigManager; import com.fr.base.ConfigManager;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -21,12 +22,16 @@ import com.fr.design.mainframe.alphafine.preview.DocumentPreviewPane;
import com.fr.design.mainframe.alphafine.preview.FilePreviewPane; import com.fr.design.mainframe.alphafine.preview.FilePreviewPane;
import com.fr.design.mainframe.alphafine.preview.NoResultPane; import com.fr.design.mainframe.alphafine.preview.NoResultPane;
import com.fr.design.mainframe.alphafine.preview.PluginPreviewPane; import com.fr.design.mainframe.alphafine.preview.PluginPreviewPane;
import com.fr.design.mainframe.alphafine.search.manager.*; import com.fr.design.mainframe.alphafine.search.manager.ActionSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.DocumentSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.FileSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.PluginSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.RecentSearchManager;
import com.fr.design.mainframe.alphafine.search.manager.RecommendSearchManager;
import com.fr.form.main.Form; import com.fr.form.main.Form;
import com.fr.form.main.FormIO; import com.fr.form.main.FormIO;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.io.TemplateWorkBookIO; import com.fr.io.TemplateWorkBookIO;
@ -44,7 +49,13 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener; import javax.swing.event.ListSelectionListener;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.AWTEventListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
@ -134,7 +145,7 @@ public class AlphaFineDialog extends UIDialog {
private void initComponents() { private void initComponents() {
initSearchTextField(); initSearchTextField();
JPanel topPane = new JPanel(new BorderLayout()); 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.setPreferredSize(AlphaFineConstants.ICON_LABEL_SIZE);
iconLabel.setOpaque(true); iconLabel.setOpaque(true);
iconLabel.setBackground(Color.WHITE); iconLabel.setBackground(Color.WHITE);
@ -149,7 +160,7 @@ public class AlphaFineDialog extends UIDialog {
} }
}; };
closeButton.setPreferredSize(AlphaFineConstants.CLOSE_BUTTON_SIZE); closeButton.setPreferredSize(AlphaFineConstants.CLOSE_BUTTON_SIZE);
closeButton.setIcon(new ImageIcon(getClass().getResource("/com/fr/design/mainframe/alphafine/images/alphafine_close.png"))); closeButton.setIcon(IconLoader.getIcon(AlphaFineConstants.IMAGE_URL + "alphafine_close.png"));
closeButton.set4ToolbarButton(); closeButton.set4ToolbarButton();
closeButton.setBorderPainted(false); closeButton.setBorderPainted(false);
closeButton.setRolloverEnabled(false); closeButton.setRolloverEnabled(false);
@ -345,7 +356,7 @@ public class AlphaFineDialog extends UIDialog {
*/ */
private void removeLeftPane() { private void removeLeftPane() {
if (searchListModel.isEmpty() && defaultPane == null) { 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.remove(leftSearchResultPane);
searchResultPane.add(defaultPane, BorderLayout.WEST); searchResultPane.add(defaultPane, BorderLayout.WEST);
refreshContainer(); refreshContainer();
@ -556,7 +567,7 @@ public class AlphaFineDialog extends UIDialog {
break; break;
case ACTION: case ACTION:
rightSearchResultPane.removeAll(); 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(); validate();
repaint(); repaint();
break; break;
@ -698,6 +709,7 @@ public class AlphaFineDialog extends UIDialog {
/** /**
* 处理搜索结果 * 处理搜索结果
*
* @param selectedValue * @param selectedValue
*/ */
private void dealWithSearchResult(AlphaCellModel selectedValue) { private void dealWithSearchResult(AlphaCellModel selectedValue) {

BIN
designer/src/com/fr/design/mainframe/alphafine/images/alphafine1@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

BIN
designer/src/com/fr/design/mainframe/alphafine/images/alphafine2@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

BIN
designer/src/com/fr/design/mainframe/alphafine/images/alphafine3@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

BIN
designer/src/com/fr/design/mainframe/alphafine/images/alphafine4@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

BIN
designer/src/com/fr/design/mainframe/alphafine/images/alphafine5@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

BIN
designer/src/com/fr/design/mainframe/alphafine/images/alphafine_close@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

BIN
designer/src/com/fr/design/mainframe/alphafine/images/bigsearch@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

BIN
designer/src/com/fr/design/mainframe/alphafine/images/no_result@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
designer/src/com/fr/design/mainframe/alphafine/images/noresult@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
designer/src/com/fr/design/mainframe/alphafine/images/opening@2x.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

BIN
designer/src/com/fr/design/mainframe/alphafine/images/smallsearch@2x.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

5
designer/src/com/fr/design/mainframe/alphafine/preview/NoResultPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.alphafine.preview; package com.fr.design.mainframe.alphafine.preview;
import com.bulenkov.iconloader.IconLoader;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.alphafine.AlphaFineConstants; import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.general.FRFont; import com.fr.general.FRFont;
@ -11,14 +12,14 @@ import java.awt.*;
* Created by XiaXiang on 2017/8/14. * Created by XiaXiang on 2017/8/14.
*/ */
public class NoResultPane extends JPanel { public class NoResultPane extends JPanel {
public NoResultPane(String title, Icon icon) { public NoResultPane(String title, String iconUrl) {
setLayout(new BorderLayout()); setLayout(new BorderLayout());
setBackground(Color.white); setBackground(Color.white);
setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT)); setPreferredSize(new Dimension(AlphaFineConstants.LEFT_WIDTH, AlphaFineConstants.CONTENT_HEIGHT));
UILabel image = new UILabel(); UILabel image = new UILabel();
image.setPreferredSize(new Dimension(150, 111)); image.setPreferredSize(new Dimension(150, 111));
image.setHorizontalAlignment(SwingConstants.CENTER); image.setHorizontalAlignment(SwingConstants.CENTER);
image.setIcon(icon); image.setIcon(IconLoader.getIcon(iconUrl));
image.setBorder(BorderFactory.createEmptyBorder(100,0,0,0)); image.setBorder(BorderFactory.createEmptyBorder(100,0,0,0));
UILabel description = new UILabel(title); UILabel description = new UILabel(title);
description.setForeground(AlphaFineConstants.MEDIUM_GRAY); description.setForeground(AlphaFineConstants.MEDIUM_GRAY);

Loading…
Cancel
Save