Browse Source

Merge pull request #70 in DESIGN/design from ~PLOUGH/10-design:feature/10.0 to feature/10.0

* commit '5f31501cef025d8ef98538db5c88018d81424827':
  无JIRA任务,修复打包失败的问题
  REPORT-6123 取色框缩放问题
  REPORT-6048 [设计器]绝对画布块中的组件不跟随自适应
  REPORT-6090 单元格添加超链接-悬浮窗图表和超链接-悬浮元素有问题
master
superman 7 years ago
parent
commit
58e8bd2451
  1. 1
      designer-base/src/com/fr/design/style/color/ColorSelectDialog.java
  2. 10
      designer-chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java
  3. 10
      designer-form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java
  4. 3
      designer-form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java
  5. 9
      designer-form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java
  6. 1
      designer-form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java
  7. 7
      designer-realize/src/com/fr/design/mainframe/ElementCasePane.java

1
designer-base/src/com/fr/design/style/color/ColorSelectDialog.java

@ -85,6 +85,7 @@ public class ColorSelectDialog extends MiddleChartDialog{
this.add(pane,BorderLayout.NORTH); this.add(pane,BorderLayout.NORTH);
this.setBasicDialogSize(545,500); this.setBasicDialogSize(545,500);
this.setResizable(false);
JPanel buttonPane = new JPanel(); JPanel buttonPane = new JPanel();
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));

10
designer-chart/src/com/fr/design/chart/series/SeriesCondition/impl/ChartHyperRelateFloatLinkPane.java

@ -19,6 +19,7 @@ import javax.swing.border.Border;
import javax.swing.border.LineBorder; import javax.swing.border.LineBorder;
import javax.swing.border.TitledBorder; import javax.swing.border.TitledBorder;
import java.awt.*; import java.awt.*;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
@ -93,7 +94,16 @@ public class ChartHyperRelateFloatLinkPane extends AbstractHyperLinkPane<ChartHy
itemNameTextField.setText(ob.getItemName()); itemNameTextField.setText(ob.getItemName());
} }
floatNameBox.removeAllItems();
String[] floatNames = getFloatNames();
for (int i = 0, size = floatNames.length; i < size; i++) {
floatNameBox.addItem(floatNames[i]);
}
if (ob.getRelateCCName() == null || !Arrays.asList(floatNames).contains(ob.getRelateCCName())) {
floatNameBox.setSelectedIndex(-1);
} else {
floatNameBox.setSelectedItem(ob.getRelateCCName()); floatNameBox.setSelectedItem(ob.getRelateCCName());
}
List parameterList = this.parameterViewPane.update(); List parameterList = this.parameterViewPane.update();
parameterList.clear(); parameterList.clear();

10
designer-form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -171,16 +171,14 @@ public class XWAbsoluteLayout extends XLayoutContainer {
tabLayout.updateBoundsWidget(); tabLayout.updateBoundsWidget();
} }
} }
BoundsWidget boundsWidget = (BoundsWidget) layout.getBoundsWidget(xCreator.toData());
Rectangle rectangle = dealWidgetBound(xCreator.getBounds());
} }
private Rectangle calculateBound(Rectangle rec, double pw, double ph) { private Rectangle calculateBound(Rectangle rec, double pw, double ph) {
Rectangle calRec = new Rectangle(0, 0, 0, 0); Rectangle calRec = new Rectangle(0, 0, 0, 0);
calRec.x = (int) (rec.x / pw); calRec.x = (int) Math.round(rec.x / pw);
calRec.y = (int) (rec.y / ph); calRec.y = (int) Math.round(rec.y / ph);
calRec.width = (int) (rec.width / pw); calRec.width = (int) Math.round(rec.width / pw);
calRec.height = (int) (rec.height / ph); calRec.height = (int) Math.round(rec.height / ph);
return calRec; return calRec;
} }

3
designer-form/src/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java

@ -26,6 +26,7 @@ public class FormMobileTemplateSettingsPane extends BasicBeanPane<FormMobileAttr
private UICheckBox mobileOnlyCheck; // 设置为手机端专属模版 private UICheckBox mobileOnlyCheck; // 设置为手机端专属模版
private UICheckBox mobileCanvasSizeCheck; // 设置为手机模版画布大小 private UICheckBox mobileCanvasSizeCheck; // 设置为手机模版画布大小
private UICheckBox adaptivePropertyAutoMatchCheck; // 自适应属性自动匹配 private UICheckBox adaptivePropertyAutoMatchCheck; // 自适应属性自动匹配
private JPanel mobileSettingsPane;
public FormMobileTemplateSettingsPane() { public FormMobileTemplateSettingsPane() {
this.initComponents(); this.initComponents();
@ -38,7 +39,7 @@ public class FormMobileTemplateSettingsPane extends BasicBeanPane<FormMobileAttr
JPanel contentPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); JPanel contentPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
contentPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L5, IntervalConstants.INTERVAL_L2, 0)); contentPane.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L5, IntervalConstants.INTERVAL_L2, 0));
final JPanel mobileSettingsPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); mobileSettingsPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
mobileSettingsPane.setVisible(false); mobileSettingsPane.setVisible(false);
mobileSettingsPane.add(getMobileCanvasSizeCheckPane(), BorderLayout.NORTH); mobileSettingsPane.add(getMobileCanvasSizeCheckPane(), BorderLayout.NORTH);
mobileSettingsPane.add(getAdaptivePropertyAutoMatchCheckPane(), BorderLayout.CENTER); mobileSettingsPane.add(getAdaptivePropertyAutoMatchCheckPane(), BorderLayout.CENTER);

9
designer-form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java

@ -1,7 +1,11 @@
package com.fr.design.widget.ui.designer.component; package com.fr.design.widget.ui.designer.component;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.utils.gui.LayoutUtils;
import com.fr.design.widget.WidgetBoundsPaneFactory; import com.fr.design.widget.WidgetBoundsPaneFactory;
import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WLayout;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -35,6 +39,8 @@ public class WidgetAbsoluteBoundPane extends WidgetBoundPane {
@Override @Override
public void update() { public void update() {
FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner();
formDesigner.getSelectionModel().getSelection().backupBounds();
super.update(); super.update();
Rectangle bounds = new Rectangle(creator.getBounds()); Rectangle bounds = new Rectangle(creator.getBounds());
bounds.x = (int) x.getValue(); bounds.x = (int) x.getValue();
@ -45,6 +51,9 @@ public class WidgetAbsoluteBoundPane extends WidgetBoundPane {
WLayout wabs = parent.toData(); WLayout wabs = parent.toData();
wabs.setBounds(creator.toData(), bounds); wabs.setBounds(creator.toData(), bounds);
creator.setBounds(bounds); creator.setBounds(bounds);
LayoutUtils.layoutContainer(creator);
XWAbsoluteLayout layout = (XWAbsoluteLayout) parent;
layout.updateBoundsWidget(creator);
} }
@Override @Override

1
designer-form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java

@ -85,6 +85,7 @@ public class WidgetBoundPane extends BasicPane {
public void fix() { public void fix() {
Rectangle bounds = new Rectangle(creator.getBounds()); Rectangle bounds = new Rectangle(creator.getBounds());
creator.setBackupBound(creator.getBounds());
int w = (int) width.getValue(); int w = (int) width.getValue();
int h = (int) height.getValue(); int h = (int) height.getValue();
Rectangle rec = ComponentUtils.getRelativeBounds(parent); Rectangle rec = ComponentUtils.getRelativeBounds(parent);

7
designer-realize/src/com/fr/design/mainframe/ElementCasePane.java

@ -81,7 +81,6 @@ import com.fr.design.selection.Selectedable;
import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionEvent;
import com.fr.design.selection.SelectionListener; import com.fr.design.selection.SelectionListener;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.grid.GridColumn; import com.fr.grid.GridColumn;
@ -91,6 +90,7 @@ import com.fr.grid.GridUtils;
import com.fr.grid.dnd.ElementCasePaneDropTarget; import com.fr.grid.dnd.ElementCasePaneDropTarget;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.Selection; import com.fr.grid.selection.Selection;
import com.fr.log.FineLoggerFactory;
import com.fr.page.PageAttributeGetter; import com.fr.page.PageAttributeGetter;
import com.fr.page.ReportPageAttrProvider; import com.fr.page.ReportPageAttrProvider;
import com.fr.poly.creator.PolyElementCasePane; import com.fr.poly.creator.PolyElementCasePane;
@ -524,15 +524,14 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
* 因为这边判断selection是一个selection所以不会触发fireSelectionChanged * 因为这边判断selection是一个selection所以不会触发fireSelectionChanged
*/ */
public void setSelection(Selection selection) { public void setSelection(Selection selection) {
if (!ComparatorUtils.equals(this.selection, selection) ||
!ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())) {
try { try {
//旧选中内容编辑器释放模板对象 //旧选中内容编辑器释放模板对象
this.getCurrentEditor().release(); this.getCurrentEditor().release();
} catch (UnsupportedOperationException e) { } catch (UnsupportedOperationException e) {
FRContext.getLogger().info("Nothing to release"); FRContext.getLogger().info("Nothing to release");
} }
if (!ComparatorUtils.equals(this.selection, selection) ||
!ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())) {
this.selection = selection; this.selection = selection;
fireSelectionChanged(); fireSelectionChanged();
} }

Loading…
Cancel
Save