forked from fanruan/design
Browse Source
* commit '29177fb1fedae9b6bbcf6ae2a82d929a339bdee5': 修改:换一种方式获取参数面板高度 修改 删除多余导包 REPORT-34739 自适应布局下调整绝对画布块高度,绝对画布块乱跳并导致撤销功能失效 【问题原因】在调整绝对画布块的高度时,因为前面对绝对画布块的backupBounds做了处理,忽略了参数面板块高度带来的偏移量,所以会导致其乱跳并且撤销出错 【改动方案】在com.fr.design.designer.beans.adapters.layout.FRFitLayoutAdapter.fix(com.fr.design.designer.creator.XCreator)方法中加个判断,如果是绝对画布块,就将漏算的偏移量加上 REPORT-40515 jar包更新到最新后普通用户切换远程目录失败 REPORT-38688 设计器在双屏下拖动会有卡屏的现象 REPORT-38688 设计器在双屏下拖动会有卡屏的现象 REPORT-40027 NPE REPORT-40027 代码修改 REPORT-40646 去掉无用的代码 REPORT-40646 远程设计对接平台密码策略 REPORT-40027 缓存模板的组件树展开路径,在切换模板的时候保证组件树的展开research/10.0
superman
4 years ago
11 changed files with 398 additions and 104 deletions
@ -0,0 +1,55 @@
|
||||
package com.fr.design.dialog.link; |
||||
|
||||
import com.fr.design.gui.ilable.UILabel; |
||||
import com.fr.log.FineLoggerFactory; |
||||
import com.fr.stable.StringUtils; |
||||
import java.awt.Color; |
||||
import java.awt.Desktop; |
||||
import java.awt.Font; |
||||
import java.net.URI; |
||||
import javax.swing.JEditorPane; |
||||
import javax.swing.event.HyperlinkEvent; |
||||
|
||||
/** |
||||
* 用来构建JOptionPane带超链的消息提示 |
||||
* |
||||
* @author hades |
||||
* @version 10.0 |
||||
* Created by hades on 2020/10/23 |
||||
*/ |
||||
public class MessageWithLink extends JEditorPane { |
||||
|
||||
public MessageWithLink(String message, String linkName, String link) { |
||||
super("text/html", "<html><body style=\"" + getStyle() + "\">" + message + "<a href=\"" + link + "\">" + linkName + "</a>" + "</body></html>"); |
||||
addHyperlinkListener(e -> { |
||||
if (e.getEventType().equals(HyperlinkEvent.EventType.ACTIVATED)) { |
||||
try { |
||||
Desktop.getDesktop().browse(URI.create(link)); |
||||
} catch (Exception exception) { |
||||
FineLoggerFactory.getLogger().error(exception.getMessage(), exception); |
||||
} |
||||
} |
||||
}); |
||||
setEditable(false); |
||||
setBorder(null); |
||||
} |
||||
|
||||
public MessageWithLink(String linkName, String link ) { |
||||
this(StringUtils.EMPTY, linkName, link); |
||||
} |
||||
|
||||
private static StringBuilder getStyle() { |
||||
// 构建和相同风格样式
|
||||
UILabel label = new UILabel(); |
||||
Font font = label.getFont(); |
||||
Color color = label.getBackground(); |
||||
|
||||
StringBuilder style = new StringBuilder("font-family:" + font.getFamily() + ";"); |
||||
style.append("font-weight:").append(font.isBold() ? "bold" : "normal").append(";"); |
||||
style.append("font-size:").append(font.getSize()).append("pt;"); |
||||
style.append("background-color: rgb(").append(color.getRed()).append(",").append(color.getGreen()).append(",").append(color.getBlue()).append(");"); |
||||
|
||||
return style; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,22 @@
|
||||
package com.fr.design.mainframe; |
||||
|
||||
/** |
||||
* @Author: Yuan.Wang |
||||
* @Date: 2020/10/27 |
||||
*/ |
||||
public class JTemplateActionListenerAdapter implements JTemplateActionListener { |
||||
@Override |
||||
public void templateOpened(JTemplate<?, ?> jt) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void templateSaved(JTemplate<?, ?> jt) { |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void templateClosed(JTemplate<?, ?> jt) { |
||||
|
||||
} |
||||
} |
Loading…
Reference in new issue