Browse Source

Merge branch 'release/9.0' of http://cloud.finedevelop.com:2015/scm/~plough/design into release/9.0

master
plough 7 years ago
parent
commit
19b94f53a8
  1. 10
      designer/src/com/fr/design/mainframe/ReportFloatPane.java
  2. 24
      designer/src/com/fr/design/present/BarCodePane.java
  3. 1
      designer/src/com/fr/poly/PolyDesignUI.java
  4. 3
      designer/src/com/fr/poly/PolyDesigner.java
  5. 4
      designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  6. 10
      designer_base/src/com/fr/design/gui/ispinner/UISpinner.java
  7. 30
      designer_base/src/com/fr/design/gui/style/AlignmentPane.java
  8. 2
      designer_base/src/com/fr/design/gui/style/BackgroundPane.java
  9. BIN
      designer_base/src/com/fr/design/images/control/edit.png
  10. 2
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  11. 2
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  12. 2
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  13. 2
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java
  14. 1
      designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java
  15. 48
      designer_form/src/com/fr/design/widget/ui/designer/component/UIBoundSpinner.java
  16. 17
      designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java
  17. 12
      designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java

10
designer/src/com/fr/design/mainframe/ReportFloatPane.java

@ -79,9 +79,13 @@ public class ReportFloatPane extends JPanel {
insertFloatMenu.setTooltip(Inter.getLocText("FR-Designer_T_Insert_Float")); insertFloatMenu.setTooltip(Inter.getLocText("FR-Designer_T_Insert_Float"));
insertFloatMenu.setIconPath("com/fr/design/images/control/addPopup.png"); insertFloatMenu.setIconPath("com/fr/design/images/control/addPopup.png");
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
ElementCasePaneDelegate elementCasePaneDelegate = (ElementCasePaneDelegate) editingTemplate.getCurrentElementCasePane(); JComponent currentElementCasePane = editingTemplate.getCurrentElementCasePane();
if (elementCasePaneDelegate != null) { if (currentElementCasePane != null) {
refreshInsertFloatMenu(elementCasePaneDelegate); insertFloatMenu.clearShortCuts();
UpdateAction[] actions = ActionFactory.createFloatInsertAction(ElementCasePane.class, currentElementCasePane);
for (int i = 0; i < actions.length; i++) {
insertFloatMenu.addShortCut(actions[i]);
}
} }
} }

24
designer/src/com/fr/design/present/BarCodePane.java

@ -9,6 +9,8 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.icombobox.UIComboBoxRenderer; import com.fr.design.gui.icombobox.UIComboBoxRenderer;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UIBasicSpinner; import com.fr.design.gui.ispinner.UIBasicSpinner;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
@ -45,9 +47,9 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
private final int NUM16 = 16; private final int NUM16 = 16;
private BarCodePreviewPane barCodePreviewPane; private BarCodePreviewPane barCodePreviewPane;
private UIComboBox typeComboBox; private UIComboBox typeComboBox;
private UIBasicSpinner barWidthSpinner; private UISpinner barWidthSpinner;
private UIBasicSpinner barHeightSpinner; private UISpinner barHeightSpinner;
private UIBasicSpinner RCodesizespinner; private UISpinner RCodesizespinner;
private UICheckBox drawingTextCheckBox; private UICheckBox drawingTextCheckBox;
private UIComboBox RCodeVersionComboBox; private UIComboBox RCodeVersionComboBox;
private UIComboBox RCodeErrorCorrectComboBox; private UIComboBox RCodeErrorCorrectComboBox;
@ -62,8 +64,8 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
private void initComponents() { private void initComponents() {
barCodePreviewPane = new BarCodePreviewPane(); barCodePreviewPane = new BarCodePreviewPane();
this.barWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(10.0, 1, 100, 1.0)); this.barWidthSpinner = new UISpinner(1,100.0,1.0,10.0);
this.barHeightSpinner = new UIBasicSpinner(new SpinnerNumberModel(30, 1, 100, 1)); this.barHeightSpinner = new UISpinner(1,100.0,1.0,30);
this.barWidthSpinner.setPreferredSize(new Dimension(60, 20)); this.barWidthSpinner.setPreferredSize(new Dimension(60, 20));
this.barHeightSpinner.setPreferredSize(new Dimension(60, 20)); this.barHeightSpinner.setPreferredSize(new Dimension(60, 20));
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -72,7 +74,7 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
borderPane.add(barCodePreviewPane, BorderLayout.CENTER); borderPane.add(barCodePreviewPane, BorderLayout.CENTER);
setTypeComboBox(); setTypeComboBox();
setSome(); setSome();
RCodesizespinner = new UIBasicSpinner(new SpinnerNumberModel(2, 1, 6, 1)); RCodesizespinner = new UISpinner(1,6,1,2);
RCodeVersionComboBox = new UIComboBox(); RCodeVersionComboBox = new UIComboBox();
RCodeErrorCorrectComboBox = new UIComboBox(); RCodeErrorCorrectComboBox = new UIComboBox();
typeSetLabel = new UILabel(Inter.getLocText("FR-Designer_Type_Set"), UILabel.LEFT); typeSetLabel = new UILabel(Inter.getLocText("FR-Designer_Type_Set"), UILabel.LEFT);
@ -126,10 +128,10 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
} }
private void setSome() { private void setSome() {
JFormattedTextField heightTextField = ((JSpinner.DefaultEditor) barHeightSpinner.getEditor()).getTextField(); UINumberField heightTextField = barHeightSpinner.getTextField();
heightTextField.setColumns(2); heightTextField.setColumns(2);
JFormattedTextField widthTextField = ((JSpinner.DefaultEditor) barWidthSpinner.getEditor()).getTextField(); UINumberField widthTextField = barWidthSpinner.getTextField();
widthTextField.setColumns(2); widthTextField.setColumns(2);
} }
@ -268,7 +270,7 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
} }
this.setTestText(BarCodeUtils.getTestTextByBarCode(barcodeAttr.getType())); this.setTestText(BarCodeUtils.getTestTextByBarCode(barcodeAttr.getType()));
this.typeComboBox.setSelectedIndex(barcodeAttr.getType()); this.typeComboBox.setSelectedIndex(barcodeAttr.getType());
this.barWidthSpinner.setValue(new Double(barcodeAttr.getBarWidth())); this.barWidthSpinner.setValue(new Double(barcodeAttr.getBarWidth()) * 10);
this.barHeightSpinner.setValue(new Integer(barcodeAttr.getBarHeight())); this.barHeightSpinner.setValue(new Integer(barcodeAttr.getBarHeight()));
this.drawingTextCheckBox.setSelected(barcodeAttr.isDrawingText()); this.drawingTextCheckBox.setSelected(barcodeAttr.isDrawingText());
this.RCodesizespinner.setValue(new Integer(barcodeAttr.getRcodeDrawPix())); this.RCodesizespinner.setValue(new Integer(barcodeAttr.getRcodeDrawPix()));
@ -281,11 +283,11 @@ public class BarCodePane extends FurtherBasicBeanPane<BarcodePresent> {
if ((typeComboBox.getSelectedIndex() == NUM16)) { if ((typeComboBox.getSelectedIndex() == NUM16)) {
barcodeAttr.setRCodeVersion(this.RCodeVersionComboBox.getSelectedIndex()); barcodeAttr.setRCodeVersion(this.RCodeVersionComboBox.getSelectedIndex());
barcodeAttr.setRCodeErrorCorrect(this.RCodeErrorCorrectComboBox.getSelectedIndex()); barcodeAttr.setRCodeErrorCorrect(this.RCodeErrorCorrectComboBox.getSelectedIndex());
barcodeAttr.setRcodeDrawPix(((Integer) this.RCodesizespinner.getValue()).intValue()); barcodeAttr.setRcodeDrawPix((int) this.RCodesizespinner.getValue());
} }
barcodeAttr.setType(this.typeComboBox.getSelectedIndex()); barcodeAttr.setType(this.typeComboBox.getSelectedIndex());
barcodeAttr.setBarWidth(((Double) this.barWidthSpinner.getValue()).doubleValue() / 10); barcodeAttr.setBarWidth(((Double) this.barWidthSpinner.getValue()).doubleValue() / 10);
barcodeAttr.setBarHeight(((Integer) this.barHeightSpinner.getValue()).intValue()); barcodeAttr.setBarHeight((int) this.barHeightSpinner.getValue());
barcodeAttr.setDrawingText(this.drawingTextCheckBox.isSelected()); barcodeAttr.setDrawingText(this.drawingTextCheckBox.isSelected());
return new BarcodePresent(barcodeAttr); return new BarcodePresent(barcodeAttr);
} }

1
designer/src/com/fr/poly/PolyDesignUI.java

@ -97,7 +97,6 @@ public class PolyDesignUI extends ComponentUI {
paintAddingData(g2d, addData); paintAddingData(g2d, addData);
} }
paintPaginateLine(g2d); paintPaginateLine(g2d);
designer.repaint();
} }
private void paintAddedData(Graphics g) { private void paintAddedData(Graphics g) {

3
designer/src/com/fr/poly/PolyDesigner.java

@ -189,8 +189,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
public void updateUI() { public void updateUI() {
((PolyArea) this.polyArea).setResolution(resolution); ((PolyArea) this.polyArea).setResolution(resolution);
polyArea.repaint(); repaint();
// this.polyArea = (JComponent) new PolyArea(this, resolution);
} }
/** /**

4
designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -255,7 +255,7 @@ public class UIEastResizableContainer extends JPanel {
setCursor(Cursor.getDefaultCursor()); setCursor(Cursor.getDefaultCursor());
model = UIConstants.MODEL_NORMAL; model = UIConstants.MODEL_NORMAL;
} }
repaint(); refreshContainer();
} }
@Override @Override
@ -267,7 +267,7 @@ public class UIEastResizableContainer extends JPanel {
public void mouseExited(MouseEvent e) { public void mouseExited(MouseEvent e) {
setCursor(Cursor.getDefaultCursor()); setCursor(Cursor.getDefaultCursor());
model = UIConstants.MODEL_NORMAL; model = UIConstants.MODEL_NORMAL;
repaint(); refreshContainer();
} }
@Override @Override

10
designer_base/src/com/fr/design/gui/ispinner/UISpinner.java

@ -101,11 +101,15 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
return; return;
} }
this.value = value; this.value = value;
setTextField(value);
fireStateChanged();
}
protected void setTextField(double value){
textField.getDocument().removeDocumentListener(docListener); textField.getDocument().removeDocumentListener(docListener);
textField.setValue(value); textField.setValue(value);
textField.getDocument().addDocumentListener(docListener); textField.getDocument().addDocumentListener(docListener);
fireStateChanged();
} }
public void setTextFieldValue(double value) { public void setTextFieldValue(double value) {
@ -257,6 +261,10 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
} }
} }
}); });
initTextFiledListeners();
}
protected void initTextFiledListeners(){
textField.getDocument().removeDocumentListener(docListener); textField.getDocument().removeDocumentListener(docListener);
textField.getDocument().addDocumentListener(docListener); textField.getDocument().addDocumentListener(docListener);
textField.addFocusListener(new FocusAdapter() { textField.addFocusListener(new FocusAdapter() {

30
designer_base/src/com/fr/design/gui/style/AlignmentPane.java

@ -39,7 +39,9 @@ import java.util.Arrays;
*/ */
public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameObserver { public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameObserver {
private static final int ANGEL = 90; private static final int ANGEL = 90;
private static final Dimension SPINNER_DIMENSION = new Dimension(70, 20); private static final int GAP = 23;
private static final int VERGAP = 3;
private static final Dimension SPINNER_DIMENSION = new Dimension(75, 20);
private static final String[] TEXT = {Inter.getLocText("FR-Designer_StyleAlignment_Wrap_Text"), Inter.getLocText("FR-Designer_StyleAlignment_Single_Line"), private static final String[] TEXT = {Inter.getLocText("FR-Designer_StyleAlignment_Wrap_Text"), Inter.getLocText("FR-Designer_StyleAlignment_Single_Line"),
Inter.getLocText("FR-Designer_StyleAlignment_Single_Line(Adjust_Font)"), Inter.getLocText("FR-Designer_StyleAlignment_Multi_Line(Adjust_Font)")}; Inter.getLocText("FR-Designer_StyleAlignment_Single_Line(Adjust_Font)"), Inter.getLocText("FR-Designer_StyleAlignment_Multi_Line(Adjust_Font)")};
@ -221,17 +223,33 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
spaceBeforeSpinner.setPreferredSize(SPINNER_DIMENSION); spaceBeforeSpinner.setPreferredSize(SPINNER_DIMENSION);
spaceAfterSpinner.setPreferredSize(SPINNER_DIMENSION); spaceAfterSpinner.setPreferredSize(SPINNER_DIMENSION);
lineSpaceSpinner.setPreferredSize(SPINNER_DIMENSION); lineSpaceSpinner.setPreferredSize(SPINNER_DIMENSION);
JPanel indentationPane = new JPanel(new BorderLayout());
indentationPane.add(new UILabel((Inter.getLocText("FR-Designer-StyleAlignment_Style_Indentation")), SwingConstants.LEFT));
indentationPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, GAP));
JPanel partSpacingPane = new JPanel(new BorderLayout());
partSpacingPane.add(new UILabel((Inter.getLocText("FR-Designer-StyleAlignment_Style_PartSpacing")), SwingConstants.LEFT));
partSpacingPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, GAP));
JPanel spacingPane = new JPanel(new BorderLayout());
spacingPane.add(new UILabel((Inter.getLocText("FR-Designer-StyleAlignment_Style_Spacing")), SwingConstants.LEFT));
spacingPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, GAP));
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{null, null, null}, new Component[]{null, null, null},
new Component[]{new UILabel((Inter.getLocText("FR-Designer-StyleAlignment_Style_Indentation")) + " ", SwingConstants.LEFT), creatSpinnerPane(leftIndentSpinner), creatSpinnerPane(rightIndentSpinner)}, new Component[]{indentationPane, creatSpinnerPane(leftIndentSpinner), creatSpinnerPane(rightIndentSpinner)},
new Component[]{null, new UILabel((Inter.getLocText("FR-Designer_Left")), SwingConstants.CENTER), new UILabel((Inter.getLocText("FR-Designer_Right")), SwingConstants.CENTER)}, new Component[]{null, new UILabel((Inter.getLocText("FR-Designer_Left")), SwingConstants.CENTER), new UILabel((Inter.getLocText("FR-Designer_Right")), SwingConstants.CENTER)},
new Component[]{new UILabel((Inter.getLocText("FR-Designer-StyleAlignment_Style_PartSpacing")) + " ", SwingConstants.LEFT), creatSpinnerPane(spaceBeforeSpinner), creatSpinnerPane(spaceAfterSpinner)}, new Component[]{null, null, null},
new Component[]{null, null, null},
new Component[]{partSpacingPane, creatSpinnerPane(spaceBeforeSpinner), creatSpinnerPane(spaceAfterSpinner)},
new Component[]{null, new UILabel((Inter.getLocText("FR-Designer_Front")), SwingConstants.CENTER), new UILabel((Inter.getLocText("FR-Designer_Behind")), SwingConstants.CENTER)}, new Component[]{null, new UILabel((Inter.getLocText("FR-Designer_Front")), SwingConstants.CENTER), new UILabel((Inter.getLocText("FR-Designer_Behind")), SwingConstants.CENTER)},
new Component[]{new UILabel((Inter.getLocText("FR-Designer_Style_Line_Spacing")) + " ", SwingConstants.LEFT), creatSpinnerPane(lineSpaceSpinner), null}, new Component[]{null, null, null},
new Component[]{null, null, null},
new Component[]{spacingPane, creatSpinnerPane(lineSpaceSpinner), null},
}; };
double[] rowSize = {p, p, p, p, p, p}; double[] rowSize = {p, p, p, p, p, p, p, p, p, p};
double[] columnSize = {p, f, f}; double[] columnSize = {p, f, f};
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); int[][] rowCount = {{1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}, {1, 1, 1}};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_MEDIUM, VERGAP);
} }
private JPanel creatSpinnerPane(Component comp) { private JPanel creatSpinnerPane(Component comp) {

2
designer_base/src/com/fr/design/gui/style/BackgroundPane.java

@ -80,7 +80,7 @@ public class BackgroundPane extends AbstractBasicStylePane {
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
double[] columnSize = {p,f}; double[] columnSize = {p,f};
int[][] rowCount = {{1, 1},{1, 1},{1, 1}}; int[][] rowCount = {{1, 1},{1, 1},{1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_SMALL, LayoutConstants.VGAP_MEDIUM); JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, LayoutConstants.VGAP_LARGE, LayoutConstants.VGAP_MEDIUM);
this.add(panel, BorderLayout.CENTER); this.add(panel, BorderLayout.CENTER);
} }

BIN
designer_base/src/com/fr/design/images/control/edit.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 388 B

2
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -408,7 +408,7 @@ FR-Designer_Current_Preview_Rows=\u73FE\u5728\u306E\u30D7\u30EC\u30D3\u30E5\u30F
FR-Designer_Data=\u30C7\u30FC\u30BF FR-Designer_Data=\u30C7\u30FC\u30BF
FR-Designer_Error=\u30A8\u30E9\u30FC FR-Designer_Error=\u30A8\u30E9\u30FC
FR-Designer-Website_Url=http\://www.finereport.com/jp FR-Designer-Website_Url=http\://www.finereport.com/jp
FR-Designer_formDesignerModule=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u30C7\u30B6\u30A4\u30CA\u30FC FR-Designer_formDesignerModule=\u610F\u601D\u6C7A\u5B9A\u30EC\u30DD\u30FC\u30C8
FR-Designer-BBSLogin_Login-Title=BBS\u30ED\u30B0\u30A4\u30F3 FR-Designer-BBSLogin_Login-Title=BBS\u30ED\u30B0\u30A4\u30F3
FR-Designer_Get-CubeGetting=cube\u53D6\u5F97 FR-Designer_Get-CubeGetting=cube\u53D6\u5F97
FR-Designer-BBSLogin_Download-Unlogin-Tip=\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9 FR-Designer-BBSLogin_Download-Unlogin-Tip=\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9

2
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -420,7 +420,7 @@ FR-Designer_Event_ShowWidgets=\u76F4\u63A5\u663E\u793A\u63A7\u4EF6
FR-Designer_Current_Preview_Rows=\u5F53\u524D\u9884\u89C8\u884C\u6570 FR-Designer_Current_Preview_Rows=\u5F53\u524D\u9884\u89C8\u884C\u6570
FR-Designer_Data=\u6570\u636E FR-Designer_Data=\u6570\u636E
FR-Designer_Error=\u9519\u8BEF FR-Designer_Error=\u9519\u8BEF
FR-Designer_formDesignerModule=\u8868\u5355\u8BBE\u8BA1\u5668\u6A21\u5757 FR-Designer_formDesignerModule=\u51B3\u7B56\u62A5\u8868\u6A21\u5757
FR-Designer-Website_Url=http\://www.finereport.com/ FR-Designer-Website_Url=http\://www.finereport.com/
FR-Designer-BBSLogin_Download-Unlogin-Tip=\u767B\u5F55\u540E\u624D\u80FD\u4E0B\u8F7D FR-Designer-BBSLogin_Download-Unlogin-Tip=\u767B\u5F55\u540E\u624D\u80FD\u4E0B\u8F7D
FR-Designer-App_ReLayout=\u624B\u673A\u91CD\u5E03\u5C40 FR-Designer-App_ReLayout=\u624B\u673A\u91CD\u5E03\u5C40

2
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -417,7 +417,7 @@ FR-Designer_Event_ShowWidgets=\u76F4\u63A5\u986F\u793A\u5C0F\u5DE5\u5177
FR-Designer_Current_Preview_Rows=\u7576\u524D\u9810\u89BD\u5217\u6578 FR-Designer_Current_Preview_Rows=\u7576\u524D\u9810\u89BD\u5217\u6578
FR-Designer_Data=\u8CC7\u6599 FR-Designer_Data=\u8CC7\u6599
FR-Designer_Error=\u932F\u8AA4 FR-Designer_Error=\u932F\u8AA4
FR-Designer_formDesignerModule=\u8868\u55AE\u8A2D\u8A08\u5668\u6A21\u584A FR-Designer_formDesignerModule=\u6289\u7B56\u5831\u8868\u6A21\u584A
FR-Designer-Website_Url=http\://www.finereport.com/tw FR-Designer-Website_Url=http\://www.finereport.com/tw
FR-Designer-BBSLogin_Download-Unlogin-Tip=\u767B\u9304\u5F8C\u624D\u80FD\u4E0B\u8F09 FR-Designer-BBSLogin_Download-Unlogin-Tip=\u767B\u9304\u5F8C\u624D\u80FD\u4E0B\u8F09
FR-Designer-App_ReLayout=\u624B\u6A5F\u91CD\u4F48\u5C40 FR-Designer-App_ReLayout=\u624B\u6A5F\u91CD\u4F48\u5C40

2
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -23,10 +23,10 @@ import com.fr.general.Inter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.plugin.chart.base.GisLayer; import com.fr.plugin.chart.base.GisLayer;
import com.fr.plugin.chart.base.ViewCenter; import com.fr.plugin.chart.base.ViewCenter;
import com.fr.plugin.chart.base.WMSLayer;
import com.fr.plugin.chart.designer.TableLayout4VanChartHelper; import com.fr.plugin.chart.designer.TableLayout4VanChartHelper;
import com.fr.plugin.chart.drillmap.designer.data.comp.MapDataTree; import com.fr.plugin.chart.drillmap.designer.data.comp.MapDataTree;
import com.fr.plugin.chart.map.VanChartMapPlot; import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.layer.WMSLayer;
import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper; import com.fr.plugin.chart.map.server.CompatibleGEOJSONHelper;
import com.fr.plugin.chart.map.server.GEOJSONHelper; import com.fr.plugin.chart.map.server.GEOJSONHelper;
import com.fr.plugin.chart.map.server.MapLayerConfigManager; import com.fr.plugin.chart.map.server.MapLayerConfigManager;

1
designer_form/src/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -215,6 +215,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
public void updateWidgetBound (){ public void updateWidgetBound (){
if (widgetBoundPane != null && ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Coords_And_Size"))) { if (widgetBoundPane != null && ComparatorUtils.equals(getGlobalName(), Inter.getLocText("FR-Designer_Coords_And_Size"))) {
widgetBoundPane.update(); widgetBoundPane.update();
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_RESIZED);
} }
designer.refreshDesignerUI(); designer.refreshDesignerUI();
} }

48
designer_form/src/com/fr/design/widget/ui/designer/component/UIBoundSpinner.java

@ -0,0 +1,48 @@
package com.fr.design.widget.ui.designer.component;
import com.fr.design.gui.ispinner.UISpinner;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
/**
* Created by kerry on 2017/11/7.
*/
public class UIBoundSpinner extends UISpinner{
public UIBoundSpinner(double minValue, double maxValue, double dierta) {
super(minValue, maxValue, dierta);
}
public UIBoundSpinner(double minValue, double maxValue, double dierta, double defaultValue) {
super(minValue, maxValue, dierta, defaultValue);
}
@Override
protected void initTextFiledListeners(){
this.getTextField().addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
setTextFieldValue(getTextField().getValue());
setTextField(value);
}
});
this.getTextField().addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
setTextFieldValue(getTextField().getValue());
setTextField(value);
}
}
});
}
@Override
protected void setTextField(double value){
this.getTextField().setValue(value);
}
}

17
designer_form/src/com/fr/design/widget/ui/designer/component/WidgetAbsoluteBoundPane.java

@ -20,11 +20,12 @@ public class WidgetAbsoluteBoundPane extends WidgetBoundPane {
super(source); super(source);
} }
@Override
public void initBoundPane() { public void initBoundPane() {
x = new UISpinner(0, Integer.MAX_VALUE, 1); x = new UIBoundSpinner(0, Integer.MAX_VALUE, 1);
y = new UISpinner(0, Integer.MAX_VALUE, 1); y = new UIBoundSpinner(0, Integer.MAX_VALUE, 1);
width = new UISpinner(0, Integer.MAX_VALUE, 1); width = new UIBoundSpinner(0, Integer.MAX_VALUE, 1);
height = new UISpinner(0, Integer.MAX_VALUE, 1); height = new UIBoundSpinner(0, Integer.MAX_VALUE, 1);
x.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size")); x.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size"));
y.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size")); y.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size"));
width.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size")); width.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size"));
@ -32,7 +33,7 @@ public class WidgetAbsoluteBoundPane extends WidgetBoundPane {
this.add(WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height)); this.add(WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height));
} }
@Override
public void update() { public void update() {
super.update(); super.update();
Rectangle bounds = new Rectangle(creator.getBounds()); Rectangle bounds = new Rectangle(creator.getBounds());
@ -46,20 +47,22 @@ public class WidgetAbsoluteBoundPane extends WidgetBoundPane {
creator.setBounds(bounds); creator.setBounds(bounds);
} }
@Override
public void limitWidth(WLayout wabs, int w, Rectangle bounds, Rectangle rec){ public void limitWidth(WLayout wabs, int w, Rectangle bounds, Rectangle rec){
bounds.width = w; bounds.width = w;
} }
@Override
public void limitHeight(WLayout wabs, int h, Rectangle bounds, Rectangle rec){ public void limitHeight(WLayout wabs, int h, Rectangle bounds, Rectangle rec){
bounds.height = h; bounds.height = h;
} }
@Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return "absoluteBound"; return "absoluteBound";
} }
@Override
public void populate() { public void populate() {
super.populate(); super.populate();
Rectangle bounds = new Rectangle(creator.getBounds()); Rectangle bounds = new Rectangle(creator.getBounds());

12
designer_form/src/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java

@ -2,7 +2,11 @@ package com.fr.design.widget.ui.designer.component;
import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.adapters.layout.FRFitLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRFitLayoutAdapter;
import com.fr.design.designer.creator.*; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.creator.cardlayout.XWCardLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ispinner.UISpinner; import com.fr.design.gui.ispinner.UISpinner;
@ -48,8 +52,8 @@ public class WidgetBoundPane extends BasicPane {
} }
public void initBoundPane() { public void initBoundPane() {
width = new UISpinner(0, Integer.MAX_VALUE, 1); width = new UIBoundSpinner(0, Integer.MAX_VALUE, 1);
height = new UISpinner(0, Integer.MAX_VALUE, 1); height = new UIBoundSpinner(0, Integer.MAX_VALUE, 1);
width.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size")); width.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size"));
height.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size")); height.setGlobalName(Inter.getLocText("FR-Designer_Coords_And_Size"));
if (creator.acceptType(XWCardLayout.class)) { if (creator.acceptType(XWCardLayout.class)) {
@ -64,6 +68,7 @@ public class WidgetBoundPane extends BasicPane {
fix(); fix();
} }
@Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return "widgetBound"; return "widgetBound";
} }
@ -86,7 +91,6 @@ public class WidgetBoundPane extends BasicPane {
if (bounds.height != h) { if (bounds.height != h) {
limitHeight(wabs, h, bounds, rec); limitHeight(wabs, h, bounds, rec);
} }
creator.setBounds(bounds);
} }

Loading…
Cancel
Save