Browse Source

REPORT-75998 更改跳转逻辑,更改帮助文档Icon

release/11.0
Destiny.Lin 2 years ago
parent
commit
1fdd0cac88
  1. 2
      designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg
  2. 17
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java

2
designer-base/src/main/resources/com/fr/design/images/buttonicon/replace_help.svg

@ -1,3 +1,3 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15ZM8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM6.193 4.696C6.655 4.223 7.293 3.992 8.107 3.992C8.811 3.992 9.383 4.179 9.823 4.575C10.263 4.96 10.483 5.488 10.483 6.148C10.483 6.687 10.34 7.138 10.065 7.49C9.966 7.611 9.658 7.897 9.141 8.348C8.932 8.524 8.778 8.722 8.679 8.92C8.558 9.14 8.503 9.382 8.503 9.646V9.733C8.503 9.78823 8.45823 9.833 8.403 9.833H7.426C7.37077 9.833 7.326 9.78823 7.326 9.733V9.646C7.326 9.239 7.392 8.887 7.546 8.601C7.689 8.293 8.107 7.842 8.789 7.237L8.976 7.028C9.174 6.775 9.284 6.511 9.284 6.225C9.284 5.84 9.174 5.543 8.965 5.323C8.745 5.103 8.426 4.993 8.03 4.993C7.535 4.993 7.172 5.147 6.952 5.466C6.76786 5.71152 6.66935 6.05217 6.65646 6.48796C6.65482 6.54316 6.61023 6.588 6.555 6.588H5.6C5.54477 6.588 5.49986 6.54311 5.50122 6.4879C5.51978 5.7327 5.75038 5.13862 6.193 4.696ZM7.337 10.647C7.491 10.493 7.689 10.427 7.909 10.427C8.14 10.427 8.338 10.493 8.492 10.647C8.646 10.79 8.723 10.977 8.723 11.208C8.723 11.439 8.635 11.626 8.481 11.78C8.327 11.923 8.129 12 7.909 12C7.689 12 7.491 11.923 7.337 11.769C7.183 11.615 7.106 11.428 7.106 11.208C7.106 10.977 7.183 10.79 7.337 10.647Z" fill="#333334"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15ZM8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM6.193 4.696C6.655 4.223 7.293 3.992 8.107 3.992C8.811 3.992 9.383 4.179 9.823 4.575C10.263 4.96 10.483 5.488 10.483 6.148C10.483 6.687 10.34 7.138 10.065 7.49C9.966 7.611 9.658 7.897 9.141 8.348C8.932 8.524 8.778 8.722 8.679 8.92C8.558 9.14 8.503 9.382 8.503 9.646V9.733C8.503 9.78823 8.45823 9.833 8.403 9.833H7.426C7.37077 9.833 7.326 9.78823 7.326 9.733V9.646C7.326 9.239 7.392 8.887 7.546 8.601C7.689 8.293 8.107 7.842 8.789 7.237L8.976 7.028C9.174 6.775 9.284 6.511 9.284 6.225C9.284 5.84 9.174 5.543 8.965 5.323C8.745 5.103 8.426 4.993 8.03 4.993C7.535 4.993 7.172 5.147 6.952 5.466C6.76786 5.71152 6.66935 6.05217 6.65646 6.48796C6.65482 6.54316 6.61023 6.588 6.555 6.588H5.6C5.54477 6.588 5.49986 6.54311 5.50122 6.4879C5.51978 5.7327 5.75038 5.13862 6.193 4.696ZM7.337 10.647C7.491 10.493 7.689 10.427 7.909 10.427C8.14 10.427 8.338 10.493 8.492 10.647C8.646 10.79 8.723 10.977 8.723 11.208C8.723 11.439 8.635 11.626 8.481 11.78C8.327 11.923 8.129 12 7.909 12C7.689 12 7.491 11.923 7.337 11.769C7.183 11.615 7.106 11.428 7.106 11.208C7.106 10.977 7.183 10.79 7.337 10.647Z" fill="#419BF9"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

17
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java

@ -5,7 +5,8 @@ import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.share.ui.base.MouseClickListener;
import com.fr.log.FineLoggerFactory;
import com.fr.design.utils.BrowseUtils;
import com.fr.general.CloudCenter;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
@ -13,11 +14,8 @@ import javax.swing.Icon;
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Desktop;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.MouseEvent;
import java.net.URI;
/**
* 左侧面板
@ -30,6 +28,7 @@ public class ITReplaceWestPanel {
private JPanel leftPanel;
private UILabel iconLabel;
private static final Icon HELP_ICON = IconUtils.readIcon("com/fr/design/images/buttonicon/replace_help.svg");
private static final String HELP_URL = CloudCenter.getInstance().acquireUrlByKind("design.replace.help", "https://help.fanruan.com/finereport/doc-view-4954.html");
private static final int FILL_COUNT = 13;
public ITReplaceWestPanel() {
@ -52,18 +51,10 @@ public class ITReplaceWestPanel {
iconLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Replace_Tooltip"));
//设置游标
iconLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
iconLabel.setFont(new Font("Dialog", Font.BOLD, 12));
iconLabel.addMouseListener(new MouseClickListener() {
@Override
public void mouseClicked(MouseEvent e) {
Desktop desktop = Desktop.getDesktop();
try {
//创建URI统一资源标识符
URI uri = new URI("https://help.fanruan.com/finereport/doc-view-4954.html");
desktop.browse(uri);
} catch (Exception exception) {
FineLoggerFactory.getLogger().error(exception.getMessage(), exception);
}
BrowseUtils.browser(HELP_URL);
}
});
leftPanel.add(iconLabel);

Loading…
Cancel
Save