|
|
|
@ -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); |
|
|
|
|