Browse Source
Merge in DESIGN/design from ~HADES/design:feature/x to feature/x * commit 'bc9e3a46d6e09f1b7634a8a03034d4408310f001': REPORT-70452 fix 绘制空border && 清空按钮展示逻辑调整 REPORT-70452 fix 绘制空border && 清空按钮展示逻辑调整 REPORT-70483 cid配置第二天推送,但是alphafine即刻就可以收到推送 REPORT-70452 alphafine搜索后,切换tab,文档tab下的状态不正确 && REPORT-70446 面板交互视觉问题feature/x
Hades
3 years ago
21 changed files with 536 additions and 122 deletions
@ -0,0 +1,44 @@
|
||||
package com.fr.design.actions.help.alphafine; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 11.0 |
||||
* Created by hades on 2022/4/26 |
||||
*/ |
||||
public class AlphaFineShortCutUtil { |
||||
|
||||
private static final String TYPE = "pressed"; |
||||
private static final String DISPLAY_TYPE = "+"; |
||||
private static final String BACK_SLASH = "BACK_SLASH"; |
||||
private static final String DISPLAY_BACK_SLASH = "\\"; |
||||
private static final String SLASH = "SLASH"; |
||||
private static final String DISPLAY_SLASH = "/"; |
||||
private static final String CONTROL = "CONTROL"; |
||||
private static final String DISPLAY_CONTROL = "ctrl"; |
||||
private static final String OPEN_BRACKET = "OPEN_BRACKET"; |
||||
private static final String DISPLAY_OPEN_BRACKET = "{"; |
||||
private static final String CLOSE_BRACKET = "CLOSE_BRACKET"; |
||||
private static final String DISPLAY_CLOSE_BRACKET = "}"; |
||||
private static final String COMMA = "COMMA"; |
||||
private static final String DISPLAY_COMMA = ","; |
||||
private static final String PERIOD = "PERIOD"; |
||||
private static final String DISPLAY_PERIOD = "."; |
||||
private static final String SEMICOLON = "SEMICOLON"; |
||||
private static final String DISPLAY_SEMICOLON = ";"; |
||||
private static final String QUOTE = "QUOTE"; |
||||
private static final String DISPLAY_QUOTE = "'"; |
||||
private static final String EQUALS = "EQUALS"; |
||||
private static final String DISPLAY_EQUALS = "+"; |
||||
private static final String MINUS = "MINUS"; |
||||
private static final String DISPLAY_MINUS = "-"; |
||||
private static final String COMMAND = "META"; |
||||
private static final String SMALL_COMMAND = "meta"; |
||||
private static final String DISPLAY_COMMAND = "\u2318"; |
||||
|
||||
public static String getDisplayShortCut(String shortCut) { |
||||
return shortCut.replace(TYPE, DISPLAY_TYPE).replace(BACK_SLASH, DISPLAY_BACK_SLASH).replace(SLASH, DISPLAY_SLASH) |
||||
.replace(CONTROL, DISPLAY_CONTROL).replace(OPEN_BRACKET, DISPLAY_OPEN_BRACKET).replace(CLOSE_BRACKET, DISPLAY_CLOSE_BRACKET) |
||||
.replace(COMMA, DISPLAY_COMMA).replace(PERIOD, DISPLAY_PERIOD).replace(SEMICOLON, DISPLAY_SEMICOLON).replace(QUOTE, DISPLAY_QUOTE) |
||||
.replace(EQUALS, DISPLAY_EQUALS).replace(MINUS, DISPLAY_MINUS).replace(COMMAND, DISPLAY_COMMAND).replace(SMALL_COMMAND, DISPLAY_COMMAND); |
||||
} |
||||
} |
@ -0,0 +1,14 @@
|
||||
package com.fr.design.mainframe.alphafine.exception; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 11.0 |
||||
* Created by hades on 2022/4/27 |
||||
*/ |
||||
public class AlphaFineNetworkException extends RuntimeException { |
||||
|
||||
public AlphaFineNetworkException() { |
||||
super("NetWork Error"); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,69 @@
|
||||
package com.fr.design.mainframe.alphafine.preview; |
||||
|
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.design.i18n.Toolkit; |
||||
import com.fr.design.layout.FRGUIPaneFactory; |
||||
import com.fr.design.mainframe.alphafine.AlphaFineConstants; |
||||
import com.fr.design.mainframe.share.ui.base.MouseClickListener; |
||||
import com.fr.general.IOUtils; |
||||
|
||||
import javax.swing.BorderFactory; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.SwingConstants; |
||||
import java.awt.BorderLayout; |
||||
import java.awt.Color; |
||||
import java.awt.Cursor; |
||||
import java.awt.FlowLayout; |
||||
import java.awt.event.MouseEvent; |
||||
|
||||
/** |
||||
* @author hades |
||||
* @version 11.0 |
||||
* Created by hades on 2022/4/28 |
||||
*/ |
||||
public class NetWorkFailedPane extends JPanel { |
||||
|
||||
private Runnable reload; |
||||
|
||||
public NetWorkFailedPane() { |
||||
this(() -> {}); |
||||
} |
||||
|
||||
public NetWorkFailedPane(Runnable reload) { |
||||
this.reload = reload; |
||||
this.setLayout(new BorderLayout()); |
||||
this.add(createInternetErrorPane()); |
||||
this.setPreferredSize(AlphaFineConstants.PREVIEW_SIZE); |
||||
this.setBackground(Color.WHITE); |
||||
} |
||||
|
||||
private JPanel createInternetErrorPane() { |
||||
JPanel panel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 5); |
||||
panel.setBackground(Color.WHITE); |
||||
UILabel imagePanel = new UILabel(IOUtils.readIcon("/com/fr/base/images/share/internet_error.png")); |
||||
imagePanel.setBorder(BorderFactory.createEmptyBorder(50, 280, 0, 0)); |
||||
panel.add(imagePanel); |
||||
UILabel uiLabel = tipLabel(Toolkit.i18nText("Fine-Design_Share_Internet_Connect_Failed")); |
||||
uiLabel.setBorder(BorderFactory.createEmptyBorder(0, 300, 0, 0)); |
||||
uiLabel.setForeground(Color.decode("#8F8F92")); |
||||
UILabel reloadLabel = tipLabel(Toolkit.i18nText("Fine-Design_Share_Online_Reload")); |
||||
reloadLabel.setBorder(BorderFactory.createEmptyBorder(0, 310, 0, 0)); |
||||
reloadLabel.setForeground(Color.decode("#419BF9")); |
||||
reloadLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); |
||||
reloadLabel.addMouseListener(new MouseClickListener() { |
||||
@Override |
||||
public void mousePressed(MouseEvent e) { |
||||
reload.run(); |
||||
} |
||||
}); |
||||
panel.add(uiLabel); |
||||
panel.add(reloadLabel); |
||||
return panel; |
||||
} |
||||
|
||||
private UILabel tipLabel(String text) { |
||||
UILabel tipLabel = new UILabel(text); |
||||
tipLabel.setHorizontalAlignment(SwingConstants.CENTER); |
||||
return tipLabel; |
||||
} |
||||
} |
Loading…
Reference in new issue