Browse Source

REPORT-40853 提交单元格组多次点击卡死 && REPORT-40843 选中单元格,点击到样式-单元格,最小化设计器后再打开设计器崩溃

bugfix/10.0
hades 4 years ago
parent
commit
0f4cae075f
  1. 3
      designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBackgroundPane.java
  2. 10
      designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBar.java
  3. 4
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

3
designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBackgroundPane.java

@ -26,6 +26,7 @@ import java.awt.event.ActionListener;
*/
public class GradientBackgroundPane extends BackgroundDetailPane {
private static final long serialVersionUID = -6854603990673031897L;
public static final int DEFAULT_GRADIENT_WIDTH = 254;
private UIRadioButton left2right, top2bottom;
private GradientBar gradientBar;
@ -41,7 +42,7 @@ public class GradientBackgroundPane extends BackgroundDetailPane {
// neil:增加渐变色拖动条
JPanel gradientPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel blankJp = new JPanel();
gradientBar = new GradientBar(4, 254);
gradientBar = new GradientBar(4, DEFAULT_GRADIENT_WIDTH);
blankJp.add(gradientBar);
UILabel jl = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Drag_To_Select_Gradient"));
jl.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20));

10
designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBar.java

@ -192,7 +192,15 @@ public class GradientBar extends JComponent implements UIObserver, ColorSelectab
}
float[] dist = new float[list.size()];
for (int i = 0; i < list.size(); i++) {
dist[i] = (float) ((list.get(i).getX() - 4) / (max - 4));
double value = list.get(i).getX() - 4;
double defaultMax = max - 4;
if (Double.compare(value, defaultMax) > 0) {
// 设置了预定义的渐变色 渐变色起始位置比较大 然后由预定义样式切换到自定义样式 做下等比例转换
dist[i] = (float) (value / (GradientBackgroundPane.DEFAULT_GRADIENT_WIDTH - 4));
list.get(i).setX(max * dist[i]);
} else {
dist[i] = (float) (value / defaultMax);
}
}
LinearGradientPaint paint = new LinearGradientPaint(start, end, dist, c);

4
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -53,6 +53,7 @@ import javax.swing.BorderFactory;
import javax.swing.DefaultCellEditor;
import javax.swing.DefaultComboBoxModel;
import javax.swing.Icon;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
@ -867,13 +868,14 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
textLabel = new UILabel();
textLabel.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
vPaneDLG.setAlwaysOnTop(true);
vPaneDLG.setVisible(true);
}
});
vPane = new ValuePane(types);
vPaneDLG = vPane.showSmallWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
vPaneDLG = vPane.showSmallWindow(new JFrame(), new DialogActionAdapter() {
public void doOk() {
fireEditingStopped(); // Make the renderer
// reappear.

Loading…
Cancel
Save