Browse Source
* commit 'ad25855ae09fdef39a62dc9b55d4fb8d7fe088c2': (35 commits) REPORT-61505 导出-导出事件-模板保存问题 REPORT-58538 适配平台支持服务器数据集权限 REPORT-61510 组件埋点版本由jartime更换成jar版本 REPORT-61338 设计器主题-主题配色修改保存后出现异常空白提示框 CHART-21579 模版主题编辑页面-图表-系列-渐变色的色值联动逻辑修改 REPORT-60896 mac目录蒙层结束后有遗留透明块 REPORT-61299 popupMenu的子组件高亮不需要弹窗 REPORT-61338 设计器主题-主题配色修改保存后出现异常空白提示框 REPORT-61366 FR11决策报表的报表块对应的单元格样式问题 REPORT-59682 埋点设计 REPORT-61299 弹窗类面板高亮区域不加白边 REPORT-61437 导出-导出事件-自定义命名-提示文字会消失 REPORT-60896 代码还原 REPORT-61301 布局推荐-mac设计器全屏时,固定布局/非固定布局的弹窗飘移 REPORT-61301 布局推荐-mac设计器全屏时,固定布局/非固定布局的弹窗飘移 无JIRA任务 引导任务的组件替换下 REPORT-61415 主题色颜色选择框黑色列不符合设计 REPORT-61413 【主题切换】cpt预览图里的左上角斜线单元格应该和小标题格式一致 REPORT-60896 引导蒙层有残留阴影 REPORT-61207 引导相关字体显示不对且被截断 ...feature/x
50 changed files with 580 additions and 361 deletions
@ -0,0 +1,28 @@
|
||||
package com.fr.design.mainframe.guide.utils; |
||||
|
||||
import com.fr.base.GraphHelper; |
||||
|
||||
import javax.swing.BorderFactory; |
||||
import javax.swing.JTextPane; |
||||
import javax.swing.text.MutableAttributeSet; |
||||
import javax.swing.text.SimpleAttributeSet; |
||||
import javax.swing.text.StyleConstants; |
||||
import java.awt.FontMetrics; |
||||
import java.awt.Insets; |
||||
|
||||
public class GuideUIUtils { |
||||
public static void setTextPaneLineHeight(JTextPane pane, int lineHeight) { |
||||
pane.selectAll(); |
||||
pane.setMargin(new Insets(0,0,0,0)); |
||||
MutableAttributeSet set = new SimpleAttributeSet(pane.getParagraphAttributes()); |
||||
FontMetrics fontMetrics = GraphHelper.getFontMetrics(pane.getFont()); |
||||
int delta = (lineHeight - fontMetrics.getHeight()) / 2 * 2 ; |
||||
if (delta > 0) { |
||||
StyleConstants.setLineSpacing(set, delta/ 2.0f / fontMetrics.getHeight()); |
||||
pane.setParagraphAttributes(set, false); |
||||
int dis = fontMetrics.getDescent() - fontMetrics.getLeading(); |
||||
int marginTop = dis > 0 ? ((delta - dis) / 2 + dis) : ((delta - dis) / 2); |
||||
pane.setBorder(BorderFactory.createEmptyBorder(marginTop, 0,0,0)); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,49 @@
|
||||
package com.fr.design.mainframe.share.ui.actions; |
||||
|
||||
import com.fr.design.gui.imenu.UIMenuItem; |
||||
import com.fr.design.mainframe.share.ui.constants.ColorConstants; |
||||
|
||||
import javax.swing.Action; |
||||
import javax.swing.BorderFactory; |
||||
import javax.swing.SwingConstants; |
||||
import java.awt.Dimension; |
||||
import java.awt.Insets; |
||||
|
||||
/** |
||||
* @author Starryi |
||||
* @version 1.0 |
||||
* Created by Starryi on 2021/10/20 |
||||
*/ |
||||
public class SharedComponentMenuItem extends UIMenuItem { |
||||
public SharedComponentMenuItem(Action action) { |
||||
super(action); |
||||
setBackground(ColorConstants.BACKGROUND); |
||||
setUI(new SharedComponentMenuItemUI()); |
||||
setHorizontalAlignment(SwingConstants.LEFT); |
||||
setVerticalAlignment(SwingConstants.CENTER); |
||||
setBorder(BorderFactory.createEmptyBorder()); |
||||
setIcon(null); |
||||
setIconTextGap(4); |
||||
} |
||||
|
||||
@Override |
||||
public Dimension getPreferredSize() { |
||||
Dimension dimension = super.getPreferredSize(); |
||||
return new Dimension(dimension.width, dimension.height + 8); |
||||
} |
||||
|
||||
@Override |
||||
public Dimension getMinimumSize() { |
||||
return new Dimension(0, 0); |
||||
} |
||||
|
||||
@Override |
||||
public Insets getInsets() { |
||||
return new Insets(0, 0, 0, 0); |
||||
} |
||||
|
||||
@Override |
||||
public String getText() { |
||||
return super.getText().trim(); |
||||
} |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.fr.design.mainframe.share.ui.actions; |
||||
|
||||
import com.fr.design.actions.UpdateAction; |
||||
import com.fr.design.gui.imenu.UIMenuItem; |
||||
|
||||
/** |
||||
* @author Starryi |
||||
* @version 1.0 |
||||
* Created by Starryi on 2021/10/20 |
||||
*/ |
||||
public abstract class SharedComponentPopupAction extends UpdateAction { |
||||
@Override |
||||
public UIMenuItem createMenuItem() { |
||||
Object object = this.getValue(SharedComponentMenuItem.class.getName()); |
||||
if (object == null) { |
||||
SharedComponentMenuItem menuItem = newSharedComponentMenuItem(); |
||||
// 设置名字用作单元测
|
||||
menuItem.setName(getName()); |
||||
setPressedIcon4Button(menuItem); |
||||
setDisabledIcon4Button(menuItem); |
||||
object = menuItem; |
||||
|
||||
this.putValue(SharedComponentMenuItem.class.getName(), object); |
||||
} |
||||
return (SharedComponentMenuItem) object; |
||||
} |
||||
|
||||
protected SharedComponentMenuItem newSharedComponentMenuItem() { |
||||
return new SharedComponentMenuItem(this); |
||||
} |
||||
} |
@ -0,0 +1,32 @@
|
||||
package com.fr.design.mainframe.share.ui.actions; |
||||
|
||||
import com.fr.design.gui.imenu.UIPopupMenu; |
||||
|
||||
import javax.swing.BorderFactory; |
||||
import java.awt.Dimension; |
||||
import java.awt.Insets; |
||||
|
||||
/** |
||||
* @author Starryi |
||||
* @version 1.0 |
||||
* Created by Starryi on 2021/10/20 |
||||
*/ |
||||
public class SharedComponentPopupMenu extends UIPopupMenu { |
||||
public SharedComponentPopupMenu() { |
||||
setBorder(BorderFactory.createEmptyBorder()); |
||||
setRadius(2); |
||||
} |
||||
|
||||
@Override |
||||
public Insets getInsets() { |
||||
return new Insets(2, 2, 2, 2); |
||||
} |
||||
|
||||
@Override |
||||
public Dimension getMinimumSize() { |
||||
Dimension dimension = super.getMinimumSize(); |
||||
dimension.width = 0; |
||||
dimension.height = 0; |
||||
return dimension; |
||||
} |
||||
} |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 49 KiB |
Loading…
Reference in new issue