* commit 'ced57339906156c4e3f3bdea38cbb170c662b4ec': (22 commits) REPORT-61276 决策报表-最新的release包,打开决策报表会打开一个空cpt;新建frm正常 REPORT-61205 标准色视觉修改 REPORT-61275 部分任务默认工具栏展开 REPORT-61267 【FR11】【组件背景分离】组件复用-组件标题图案的“图案相对位置”切换不生效了,只有在重新上传图案的时候才生效;“位置”也不生效 REPORT-61249 视觉图变动 无JIRA任务 换一下svg图片,原来的svg图片有点变形 REPORT-61237【固定布局-原布局推荐4.1】决策报表-自适应布局-新建空白模板,切换到固定布局,此时无法往设计画布里拖入组件 REPORT-61055 【主题获取】主题导出插件几个小问题 REPORT-60991 导出参数设置面板添加无响应 REPORT-52578 10.0兼容新自适应插件的同步代码在11.0中需要改成异步的 REPORT-61105 & REPORT-61096 & REPORT-61012 控件联动及兼容老模板调整 REPORT-61177 解决引导页弹窗展示变成半透明的问题 REPORT-61207 行间距减小,放在window上文字截断 REPORT-61219 【主题获取】右键有主题的组件,鼠标从获取主题滑到详细说明,两个都被选中了 REPORT-60942 加载图视觉更新 REPORT-61125 交互优化更新 REPORT-60993 导出-导出事件-事件内容没有初始化 REPORT-58796 REPORT-60982 主题获取-点击获取主题后网络较慢时过渡不合理 REPORT-58796 ...feature/x
@ -0,0 +1,98 @@
|
||||
package com.fr.design.mainframe.guide.ui; |
||||
|
||||
import javax.swing.JPanel; |
||||
import javax.swing.Timer; |
||||
import java.awt.AlphaComposite; |
||||
import java.awt.BasicStroke; |
||||
import java.awt.Color; |
||||
import java.awt.Composite; |
||||
import java.awt.Dimension; |
||||
import java.awt.Graphics; |
||||
import java.awt.Graphics2D; |
||||
import java.awt.Image; |
||||
import java.awt.Point; |
||||
import java.awt.RenderingHints; |
||||
import java.awt.Stroke; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-10-23 |
||||
*/ |
||||
public class GuideLoadingPane extends JPanel { |
||||
private static final BasicStroke STROKE = new BasicStroke(4); |
||||
private static final int FPS = 30; |
||||
private static final int START_ANGLE = 90; |
||||
private static GuideLoadingPane imagePanel; |
||||
private Image image; |
||||
private int angle; |
||||
private Timer timer; |
||||
|
||||
public static GuideLoadingPane getInstance() { |
||||
if (imagePanel == null) { |
||||
imagePanel = new GuideLoadingPane(); |
||||
} |
||||
return imagePanel; |
||||
} |
||||
|
||||
public GuideLoadingPane() { |
||||
this.setOpaque(false); |
||||
this.setPreferredSize(new Dimension(50, 50)); |
||||
timer = new Timer(1000 / FPS, new ActionListener() { |
||||
@Override |
||||
public void actionPerformed(ActionEvent e) { |
||||
repaint(); |
||||
angle -= 180 / FPS; // 5 degrees per 100 ms = 50 degrees/second
|
||||
if (angle > -270) { |
||||
angle += 2 * 360; |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
|
||||
public void start() { |
||||
angle = START_ANGLE; |
||||
timer.start(); |
||||
} |
||||
|
||||
public void stop() { |
||||
timer.stop(); |
||||
} |
||||
|
||||
@Override |
||||
public void paintComponent(Graphics g) { |
||||
super.paintComponent(g); |
||||
Graphics2D g2 = (Graphics2D) g; |
||||
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
||||
|
||||
Composite oldComposite = g2.getComposite(); |
||||
Stroke oldStroke = g2.getStroke(); |
||||
|
||||
g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER)); |
||||
|
||||
int d = Math.min(getWidth(), getHeight()); |
||||
int r = d / 2; |
||||
Point circlePoint = new Point(getWidth() / 2, getHeight() / 2); |
||||
|
||||
g2.setColor(Color.WHITE); |
||||
g2.fillOval(circlePoint.x - r, circlePoint.y - r, d, d); |
||||
|
||||
g2.setColor(Color.BLACK); |
||||
int waitCircleD = d / 10; |
||||
int waitCircleR = waitCircleD / 2; |
||||
|
||||
g2.fillOval(circlePoint.x - r / 3 - waitCircleR, circlePoint.y - waitCircleR, waitCircleD, waitCircleD); |
||||
g2.fillOval(circlePoint.x - waitCircleR, circlePoint.y - waitCircleR, waitCircleD, waitCircleD); |
||||
g2.fillOval(circlePoint.x + r / 3 - waitCircleR, circlePoint.y - waitCircleR, waitCircleD, waitCircleD); |
||||
|
||||
|
||||
g2.setStroke(STROKE); |
||||
g2.setColor(Color.decode("#419BF9")); |
||||
|
||||
int lineWidth = (int) STROKE.getLineWidth(); |
||||
g2.drawArc(circlePoint.x - r + lineWidth / 2 , circlePoint.y - r + lineWidth / 2, d - lineWidth, d - lineWidth, angle, -90); |
||||
|
||||
g2.setStroke(oldStroke); |
||||
g2.setComposite(oldComposite); |
||||
} |
||||
} |
@ -1,28 +0,0 @@
|
||||
package com.fr.design.mainframe.guide.ui; |
||||
|
||||
import javax.swing.JPanel; |
||||
import java.awt.Graphics; |
||||
import java.awt.Image; |
||||
import java.awt.Toolkit; |
||||
|
||||
/** |
||||
* Created by kerry on 2020-10-23 |
||||
*/ |
||||
public class ImagePanel extends JPanel { |
||||
|
||||
|
||||
private Image image; |
||||
|
||||
public ImagePanel(String imagePath) { |
||||
image = Toolkit.getDefaultToolkit().createImage(ImagePanel.class |
||||
.getResource(imagePath)); |
||||
} |
||||
|
||||
@Override |
||||
public void paintComponent(Graphics g) { |
||||
super.paintComponent(g); |
||||
if (image != null) { |
||||
g.drawImage(image, 0, 0, getWidth(), getHeight(), this); |
||||
} |
||||
} |
||||
} |
Before Width: | Height: | Size: 485 B |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 401 B |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 567 B |
After Width: | Height: | Size: 2.1 KiB |
@ -0,0 +1,54 @@
|
||||
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 com.fr.general.IOUtils; |
||||
|
||||
import javax.swing.Action; |
||||
import javax.swing.BorderFactory; |
||||
import javax.swing.Icon; |
||||
import java.awt.Graphics; |
||||
|
||||
/** |
||||
* @author Starryi |
||||
* @version 1.0 |
||||
* Created by Starryi on 2021/10/19 |
||||
*/ |
||||
public class LoadingMenuItem extends UIMenuItem { |
||||
private boolean loading = false; |
||||
|
||||
private final Icon profileIcon = IOUtils.readIcon("/com/fr/design/form/images/loading.gif"); |
||||
|
||||
public LoadingMenuItem(Action action) { |
||||
super(action); |
||||
setOpaque(true); |
||||
setBackground(ColorConstants.BACKGROUND); |
||||
setUI(new SharedComponentActionMenuItemUI()); |
||||
} |
||||
|
||||
public void startLoading() { |
||||
loading = true; |
||||
setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 20)); |
||||
revalidate(); |
||||
repaint(); |
||||
} |
||||
|
||||
public void stopLoading() { |
||||
loading = false; |
||||
setBorder(BorderFactory.createEmptyBorder()); |
||||
revalidate(); |
||||
repaint(); |
||||
} |
||||
|
||||
public boolean isLoading() { |
||||
return loading; |
||||
} |
||||
|
||||
@Override |
||||
protected void paintBorder(Graphics g) { |
||||
super.paintBorder(g); |
||||
if (loading) { |
||||
profileIcon.paintIcon(this, g, getWidth() - 20, 0); |
||||
} |
||||
} |
||||
} |
After Width: | Height: | Size: 3.3 KiB |