Browse Source

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

# Conflicts:
#	designer_base/src/com/fr/design/locale/designer_ja_JP.properties
master
vito 7 years ago
parent
commit
bb2bdbdce0
  1. 8
      designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java
  2. 12
      designer/src/com/fr/design/mainframe/JWorkBook.java
  3. 7
      designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java
  4. 10
      designer/src/com/fr/poly/PolyUtils.java
  5. 2
      designer/src/com/fr/quickeditor/CellQuickEditor.java
  6. 65
      designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java
  7. 4
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  8. 9
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  9. 7
      designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java
  10. 148
      designer_base/src/com/fr/design/layout/TableLayoutHelper.java
  11. 2
      designer_base/src/com/fr/design/locale/designer.properties
  12. 2
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  13. 7
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  14. 5
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  15. 2
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  16. 2
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  17. 2
      designer_base/src/com/fr/design/mainframe/JSliderPane.java
  18. 40
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java
  19. 93
      designer_form/src/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java
  20. 17
      designer_form/src/com/fr/design/widget/ui/designer/mobile/MobileWidgetDefinePane.java

8
designer/src/com/fr/design/dscolumn/ResultSetGroupDockingPane.java

@ -34,6 +34,7 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
private UIButton advancedButton; private UIButton advancedButton;
private FunctionComboBox functionComboBox; private FunctionComboBox functionComboBox;
private JPanel contentPane;
private JPanel cardPane; private JPanel cardPane;
private CardLayout cardLayout; private CardLayout cardLayout;
private UIComboBox goBox; private UIComboBox goBox;
@ -48,9 +49,9 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
public void initComponents(ElementCasePane ePane) { public void initComponents(ElementCasePane ePane) {
goBox = new UIComboBox(new String[]{Inter.getLocText("BindColumn-Group"), Inter.getLocText("BindColumn-Select"), Inter.getLocText("BindColumn-Summary")}); goBox = new UIComboBox(new String[]{Inter.getLocText("BindColumn-Group"), Inter.getLocText("BindColumn-Select"), Inter.getLocText("BindColumn-Summary")});
initCardPane(); initCardPane();
JPanel pane = layoutPane(); contentPane = layoutPane();
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(pane, BorderLayout.CENTER); this.add(contentPane, BorderLayout.CENTER);
} }
private JPanel layoutPane() { private JPanel layoutPane() {
@ -70,12 +71,15 @@ public class ResultSetGroupDockingPane extends ResultSetGroupPane {
if (i == BIND_GROUP) { if (i == BIND_GROUP) {
cardLayout.show(cardPane, "groupPane"); cardLayout.show(cardPane, "groupPane");
cardPane.setPreferredSize(new Dimension(156, 20)); cardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane,2,10);
} else if (i == BIND_SELECTED) { } else if (i == BIND_SELECTED) {
cardLayout.show(cardPane, "listPane"); cardLayout.show(cardPane, "listPane");
cardPane.setPreferredSize(new Dimension(0, 0)); cardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane,2,0);
} else if (i == BIND_SUMMARY) { } else if (i == BIND_SUMMARY) {
cardLayout.show(cardPane, "summaryPane"); cardLayout.show(cardPane, "summaryPane");
cardPane.setPreferredSize(new Dimension(156, 20)); cardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane,2,10);
CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr(); CellExpandAttr cellExpandAttr = cellElement.getCellExpandAttr();
cellExpandAttr.setDirection(Constants.NONE); cellExpandAttr.setDirection(Constants.NONE);
} }

12
designer/src/com/fr/design/mainframe/JWorkBook.java

@ -87,6 +87,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
private static final String SHARE_SUFFIX = "_share"; private static final String SHARE_SUFFIX = "_share";
private static final String SHARE_FOLDER = "share"; private static final String SHARE_FOLDER = "share";
private static final int TOOLBARPANEDIMHEIGHT = 26; private static final int TOOLBARPANEDIMHEIGHT = 26;
private static final double MIN_TIME = 0.4;
private UIModeControlContainer centerPane; private UIModeControlContainer centerPane;
public ReportComponentComposite reportComposite; public ReportComponentComposite reportComposite;
@ -364,6 +365,12 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
ElementCasePane elementCasePane = reportComposite.centerCardPane.editingComponet.elementCasePane; ElementCasePane elementCasePane = reportComposite.centerCardPane.editingComponet.elementCasePane;
PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi(); PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi();
if (elementCasePane != null) { if (elementCasePane != null) {
//网格线
if (resolution < ScreenResolution.getScreenResolution() * MIN_TIME) {
elementCasePane.getGrid().setShowGridLine(false);
} else {
elementCasePane.getGrid().setShowGridLine(true);
}
elementCasePane.setResolution(resolution); elementCasePane.setResolution(resolution);
elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution);
elementCasePane.getGrid().setResolution(resolution); elementCasePane.getGrid().setResolution(resolution);
@ -389,6 +396,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} }
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();
} }
@Override @Override
public int selfAdaptUpdate() { public int selfAdaptUpdate() {
PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi(); PolyDesigner polyDezi = reportComposite.centerCardPane.getPolyDezi();
@ -414,6 +422,9 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} else if (elementCasePane != null) { } else if (elementCasePane != null) {
ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane(); ElementCasePane reportPane = elementCasePane.getGrid().getElementCasePane();
if (reportPane.getSelection().getSelectedColumns().length == 0) {
return resolution;
}
int column = reportPane.getSelection().getSelectedColumns()[0]; int column = reportPane.getSelection().getSelectedColumns()[0];
double columnLength = reportPane.getSelection().getSelectedColumns().length; double columnLength = reportPane.getSelection().getSelectedColumns().length;
double columnExtent = reportPane.getGrid().getHorizontalExtent(); double columnExtent = reportPane.getGrid().getHorizontalExtent();
@ -790,7 +801,6 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
* 是否支持预览 * 是否支持预览
* *
* @return 预览接口 * @return 预览接口
*
*/ */
public PreviewProvider[] supportPreview() { public PreviewProvider[] supportPreview() {
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING); Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING);

7
designer/src/com/fr/design/mainframe/form/FormReportComponentComposite.java

@ -33,6 +33,7 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
private static final int MAX = 400; private static final int MAX = 400;
private static final int HUND = 100; private static final int HUND = 100;
private static final int MIN = 10; private static final int MIN = 10;
private static final double MIN_TIME = 0.4;
public FormElementCaseDesigner elementCaseDesigner; public FormElementCaseDesigner elementCaseDesigner;
private BaseJForm jForm; private BaseJForm jForm;
@ -112,6 +113,12 @@ public class FormReportComponentComposite extends JComponent implements TargetMo
private void setScale(int resolution) { private void setScale(int resolution) {
ElementCasePane elementCasePane = elementCaseDesigner.getEditingElementCasePane(); ElementCasePane elementCasePane = elementCaseDesigner.getEditingElementCasePane();
//网格线
if (resolution < ScreenResolution.getScreenResolution() * MIN_TIME) {
elementCasePane.getGrid().setShowGridLine(false);
} else {
elementCasePane.getGrid().setShowGridLine(true);
}
elementCasePane.setResolution(resolution); elementCasePane.setResolution(resolution);
elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution); elementCasePane.getGrid().getGridMouseAdapter().setResolution(resolution);
elementCasePane.getGrid().setResolution(resolution); elementCasePane.getGrid().setResolution(resolution);

10
designer/src/com/fr/poly/PolyUtils.java

@ -9,6 +9,7 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.ScreenResolution;
import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.base.chart.BasePlot; import com.fr.base.chart.BasePlot;
@ -114,10 +115,11 @@ public class PolyUtils {
AddedData addedData = designer.getAddedData(); AddedData addedData = designer.getAddedData();
for (int count = addedData.getAddedCount() - 1; count >= 0; count--) { for (int count = addedData.getAddedCount() - 1; count >= 0; count--) {
BlockCreator creator = addedData.getAddedAt(count); BlockCreator creator = addedData.getAddedAt(count);
int cx = creator.getX(); float times = (float) designer.getResolution()/ScreenResolution.getScreenResolution();
int cy = creator.getY(); int cx = (int) (creator.getX() * times);
int cw = creator.getWidth(); int cy = (int) (creator.getY() * times);
int ch = creator.getHeight(); int cw = (int) (creator.getWidth() * times);
int ch = (int) (creator.getHeight() * times);
if (x >= cx && x <= (cx + cw)) { if (x >= cx && x <= (cx + cw)) {
if(y >= cy && y <= (cy + ch)) { if(y >= cy && y <= (cy + ch)) {
return creator; return creator;

2
designer/src/com/fr/quickeditor/CellQuickEditor.java

@ -55,7 +55,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
emptyLabel.setPreferredSize(new Dimension(60, 20)); emptyLabel.setPreferredSize(new Dimension(60, 20));
} }
protected static final int VGAP = 10, HGAP = 8; protected static final int VGAP = 10, HGAP = 8, VGAP_INNER = 3;
public CellQuickEditor() { public CellQuickEditor() {

65
designer/src/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -436,12 +436,6 @@ public class CellDSColumnEditor extends CellQuickEditor {
filterPane.update(cellElement); filterPane.update(cellElement);
fireTargetModified(); fireTargetModified();
} }
}, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
filterPane.update(cellElement);
fireTargetModified();
}
} }
); );
//自定义值显示 //自定义值显示
@ -489,6 +483,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
} }
}, new double[]{P}, new double[]{P, F}, HGAP, VGAP }, new double[]{P}, new double[]{P, F}, HGAP, VGAP
); );
multiPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
multiNumPane.add(multiPane); multiNumPane.add(multiPane);
useMultiplyNumCheckBox.addActionListener(new ActionListener() { useMultiplyNumCheckBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -505,7 +500,6 @@ public class CellDSColumnEditor extends CellQuickEditor {
} }
}); });
double[] rowSize = {P, P, P, P, P, P}; double[] rowSize = {P, P, P, P, P, P};
double[] columnSize = {F}; double[] columnSize = {F};
@ -537,6 +531,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SortPane * @see DSColumnAdvancedPane.SortPane
*/ */
public class ResultSetSortConfigPane extends JPanel { public class ResultSetSortConfigPane extends JPanel {
private JPanel contentPane;
//面板 //面板
private UIButtonGroup sortTypePane; private UIButtonGroup sortTypePane;
private JFormulaField formulaField; private JFormulaField formulaField;
@ -570,8 +565,10 @@ public class CellDSColumnEditor extends CellQuickEditor {
cardLayout.show(centerPane, noContent ? "none" : "content"); cardLayout.show(centerPane, noContent ? "none" : "content");
if (noContent) { if (noContent) {
centerPane.setPreferredSize(new Dimension(0, 0)); centerPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
} else { } else {
centerPane.setPreferredSize(new Dimension(165, 20)); centerPane.setPreferredSize(new Dimension(165, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
} }
} }
}); });
@ -582,9 +579,8 @@ public class CellDSColumnEditor extends CellQuickEditor {
}; };
double[] rowSize = {P, P}, columnSize = {P, F}; double[] rowSize = {P, P}, columnSize = {P, F};
this.add(TableLayoutHelper.createGapTableLayoutPane( contentPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP);
components, rowSize, columnSize, HGAP, VGAP this.add(contentPane, BorderLayout.CENTER);
), BorderLayout.CENTER);
} }
@ -605,8 +601,10 @@ public class CellDSColumnEditor extends CellQuickEditor {
cardLayout.show(centerPane, noContent ? "none" : "content"); cardLayout.show(centerPane, noContent ? "none" : "content");
if (noContent) { if (noContent) {
centerPane.setPreferredSize(new Dimension(0, 0)); centerPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
} else { } else {
centerPane.setPreferredSize(new Dimension(156, 20)); centerPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
} }
String sortFormula = dSColumn.getSortFormula(); String sortFormula = dSColumn.getSortFormula();
if (sortFormula != null && sortFormula.length() >= 1) { if (sortFormula != null && sortFormula.length() >= 1) {
@ -650,7 +648,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
* @see DSColumnAdvancedPane.SelectCountPane * @see DSColumnAdvancedPane.SelectCountPane
*/ */
public class ResultSetFilterConfigPane extends JPanel { public class ResultSetFilterConfigPane extends JPanel {
private JPanel contentPane;
private UIComboBox rsComboBox; private UIComboBox rsComboBox;
private JPanel setCardPane; private JPanel setCardPane;
private JPanel tipCardPane; private JPanel tipCardPane;
@ -681,44 +679,52 @@ public class CellDSColumnEditor extends CellQuickEditor {
tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name()); tipCardPaneLayout.show(tipCardPane, FilterType.TOP.name());
//隐藏tip 显示set //隐藏tip 显示set
setCardPane.setPreferredSize(new Dimension(156, 20)); setCardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
tipCardPane.setPreferredSize(new Dimension(0, 0)); tipCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, 0);
} else if (selectIndex == 2) { } else if (selectIndex == 2) {
//后N个 //后N个
setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name()); setCardPaneLayout.show(setCardPane, FilterType.BOTTOM.name());
tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name()); tipCardPaneLayout.show(tipCardPane, FilterType.BOTTOM.name());
//隐藏tip 显示set //隐藏tip 显示set
setCardPane.setPreferredSize(new Dimension(156, 20)); setCardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
tipCardPane.setPreferredSize(new Dimension(0, 0)); tipCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, 0);
} else if (selectIndex == 3) { } else if (selectIndex == 3) {
//奇数 //奇数
setCardPaneLayout.show(setCardPane, FilterType.ODD.name()); setCardPaneLayout.show(setCardPane, FilterType.ODD.name());
tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name()); tipCardPaneLayout.show(tipCardPane, FilterType.ODD.name());
//隐藏set 显示tip //隐藏set 显示tip
setCardPane.setPreferredSize(new Dimension(0, 0)); setCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
tipCardPane.setPreferredSize(new Dimension(224, 40)); tipCardPane.setPreferredSize(new Dimension(224, 40));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER);
} else if (selectIndex == 4) { } else if (selectIndex == 4) {
setCardPaneLayout.show(setCardPane, FilterType.EVEN.name()); setCardPaneLayout.show(setCardPane, FilterType.EVEN.name());
tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name()); tipCardPaneLayout.show(tipCardPane, FilterType.EVEN.name());
//隐藏set 显示tip //隐藏set 显示tip
setCardPane.setPreferredSize(new Dimension(0, 0)); setCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
tipCardPane.setPreferredSize(new Dimension(224, 40)); tipCardPane.setPreferredSize(new Dimension(224, 40));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER);
} else if (selectIndex == 5) { } else if (selectIndex == 5) {
setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name()); setCardPaneLayout.show(setCardPane, FilterType.SPECIFY.name());
tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name()); tipCardPaneLayout.show(tipCardPane, FilterType.SPECIFY.name());
//显示set和tip //显示set和tip
setCardPane.setPreferredSize(new Dimension(156, 20)); setCardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
tipCardPane.setPreferredSize(new Dimension(224, 40)); tipCardPane.setPreferredSize(new Dimension(224, 40));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER);
} else { } else {
setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name()); setCardPaneLayout.show(setCardPane, FilterType.UNDEFINE.name());
tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name()); tipCardPaneLayout.show(tipCardPane, FilterType.UNDEFINE.name());
//隐藏set和tip //隐藏set和tip
setCardPane.setPreferredSize(new Dimension(0, 0)); setCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
tipCardPane.setPreferredSize(new Dimension(0, 0)); tipCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, 0);
} }
setCardPane.revalidate();
tipCardPane.revalidate();
setCardPane.repaint();
tipCardPane.repaint();
} }
}); });
//配置展示CardLayout //配置展示CardLayout
@ -746,7 +752,6 @@ public class CellDSColumnEditor extends CellQuickEditor {
oddTip.setForeground(TIP_FONT_COLOR); oddTip.setForeground(TIP_FONT_COLOR);
tipCardPane.add(oddTip, FilterType.ODD.name()); tipCardPane.add(oddTip, FilterType.ODD.name());
//偶数 UILabel 占一行作为提示信息 //偶数 UILabel 占一行作为提示信息
setCardPane.add(new JPanel(), FilterType.EVEN.name()); setCardPane.add(new JPanel(), FilterType.EVEN.name());
MultilineLabel evenTip = new MultilineLabel(Inter.getLocText("FS-Designer_DS_Filter_Even_Tip")); MultilineLabel evenTip = new MultilineLabel(Inter.getLocText("FS-Designer_DS_Filter_Even_Tip"));
@ -759,12 +764,13 @@ public class CellDSColumnEditor extends CellQuickEditor {
MultilineLabel specifyTip = new MultilineLabel(Inter.getLocText("FS-Designer_DS_Filter_Specify_Tip")); MultilineLabel specifyTip = new MultilineLabel(Inter.getLocText("FS-Designer_DS_Filter_Specify_Tip"));
specifyTip.setForeground(TIP_FONT_COLOR); specifyTip.setForeground(TIP_FONT_COLOR);
tipCardPane.add(specifyTip, FilterType.SPECIFY.name()); tipCardPane.add(specifyTip, FilterType.SPECIFY.name());
contentPane = TableLayoutHelper.createDiffVGapTableLayoutPane(new Component[][]{
this.add(TableLayoutHelper.createGapTableLayoutPane(new Component[][]{
{filterLabel, rsComboBox}, {filterLabel, rsComboBox},
{null, setCardPane}, {null, setCardPane},
{tipCardPane, null} {tipCardPane, null}
}, new double[]{P, P, P}, new double[]{P, F}, HGAP, VGAP), BorderLayout.CENTER); }, new double[]{P, P, P}, new double[]{P, F}, HGAP, new double[]{VGAP, VGAP_INNER});
this.add(contentPane, BorderLayout.CENTER);
} }
public void populate(CellElement cellElement) { public void populate(CellElement cellElement) {
@ -783,39 +789,53 @@ public class CellDSColumnEditor extends CellQuickEditor {
this.topFormulaPane.populate(selectCount.getFormulaCount()); this.topFormulaPane.populate(selectCount.getFormulaCount());
//隐藏tip 显示set //隐藏tip 显示set
setCardPane.setPreferredSize(new Dimension(156, 20)); setCardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
tipCardPane.setPreferredSize(new Dimension(0, 0)); tipCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, 0);
break; break;
case SelectCount.BOTTOM: case SelectCount.BOTTOM:
this.bottomFormulaPane.populate(selectCount.getFormulaCount()); this.bottomFormulaPane.populate(selectCount.getFormulaCount());
//隐藏tip 显示set //隐藏tip 显示set
setCardPane.setPreferredSize(new Dimension(156, 20)); setCardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
tipCardPane.setPreferredSize(new Dimension(0, 0)); tipCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, 0);
break; break;
case SelectCount.SPECIFY: case SelectCount.SPECIFY:
this.serialTextField.setText(selectCount.getSerial()); this.serialTextField.setText(selectCount.getSerial());
//显示set和tip //显示set和tip
setCardPane.setPreferredSize(new Dimension(156, 20)); setCardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
tipCardPane.setPreferredSize(new Dimension(224, 40)); tipCardPane.setPreferredSize(new Dimension(224, 40));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER);
break; break;
case SelectCount.EVEN: case SelectCount.EVEN:
//隐藏set 显示tip //隐藏set 显示tip
setCardPane.setPreferredSize(new Dimension(0, 0)); setCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
tipCardPane.setPreferredSize(new Dimension(224, 40)); tipCardPane.setPreferredSize(new Dimension(224, 40));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER);
break; break;
case SelectCount.ODD: case SelectCount.ODD:
//隐藏set 显示tip //隐藏set 显示tip
setCardPane.setPreferredSize(new Dimension(0, 0)); setCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
tipCardPane.setPreferredSize(new Dimension(224, 40)); tipCardPane.setPreferredSize(new Dimension(224, 40));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER);
break; break;
default: default:
//隐藏set和tip //隐藏set和tip
setCardPane.setPreferredSize(new Dimension(0, 0)); setCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
tipCardPane.setPreferredSize(new Dimension(0, 0)); tipCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, 0);
} }
} else { } else {
//隐藏set和tip //隐藏set和tip
setCardPane.setPreferredSize(new Dimension(0, 0)); setCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, 0);
tipCardPane.setPreferredSize(new Dimension(0, 0)); tipCardPane.setPreferredSize(new Dimension(0, 0));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, 0);
} }
} }
} }
@ -848,13 +868,12 @@ public class CellDSColumnEditor extends CellQuickEditor {
/** /**
* 添加事件监听器 * 添加事件监听器
* *
* @param formulaListener 公式输入框改动事件监听器 * @param formulaListener 输入框改动事件监听器
* @param actionListener 筛选类型下拉框改动事件监听器
*/ */
public void addListener(UIObserverListener formulaListener, ActionListener actionListener) { public void addListener(UIObserverListener formulaListener) {
topFormulaPane.addListener(formulaListener); topFormulaPane.addListener(formulaListener);
bottomFormulaPane.addListener(formulaListener); bottomFormulaPane.addListener(formulaListener);
rsComboBox.addActionListener(actionListener); rsComboBox.registerChangeListener(formulaListener);
} }
} }

4
designer_base/src/com/fr/design/extra/PluginWebBridge.java

@ -510,8 +510,8 @@ public class PluginWebBridge {
} }
//通过QQ登录后通知登录 //通过QQ登录后通知登录
public void ucsynLogin(long uid, String username){ public void ucsynLogin(long uid, String username, String password, final JSONObject callback) {
BBSUserInfo bbsUserInfo = new BBSUserInfo(username, ""); BBSUserInfo bbsUserInfo = new BBSUserInfo(username, password);
BBSPluginLogin.getInstance().login(bbsUserInfo); BBSPluginLogin.getInstance().login(bbsUserInfo);
uiLabel.setText(username); uiLabel.setText(username);
} }

9
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -155,7 +155,14 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
leftContentPane.add(toolBarPane, BorderLayout.NORTH); leftContentPane.add(toolBarPane, BorderLayout.NORTH);
// 顶部标签及add按钮 // 顶部标签及add按钮
topToolBar = new UIToolbar(); topToolBar = new UIToolbar(FlowLayout.LEFT, new UIToolBarUI(){
@Override
public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(UIConstants.SELECT_TAB);
g2.fillRect(0, 0, c.getWidth(), c.getHeight());
}
});
topToolBar.setLayout(new BorderLayout()); topToolBar.setLayout(new BorderLayout());
ShortCut addItem = addItemShortCut().getShortCut(); ShortCut addItem = addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar); addItem.intoJToolBar(topToolBar);

7
designer_base/src/com/fr/design/gui/icombobox/UIComboBoxUI.java

@ -57,11 +57,12 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
super.paint(g, c); super.paint(g, c);
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Color linecolor = UIConstants.LINE_COLOR; Color linecolor = UIConstants.TITLED_BORDER_COLOR;
if (comboBox.isPopupVisible()) { if (comboBox.isPopupVisible()) {
arrowButton.setSelected(true); arrowButton.setSelected(true);
} else { } else {
linecolor = UIConstants.LINE_COLOR; linecolor = UIConstants.TITLED_BORDER_COLOR;
arrowButton.setSelected(false); arrowButton.setSelected(false);
} }
g2d.setColor(linecolor); g2d.setColor(linecolor);
@ -192,7 +193,7 @@ public class UIComboBoxUI extends BasicComboBoxUI implements MouseListener {
@Override @Override
public void paintBorder(Graphics g) { public void paintBorder(Graphics g) {
Graphics2D g2 = (Graphics2D) g; Graphics2D g2 = (Graphics2D) g;
g2.setColor(UIConstants.LINE_COLOR); g2.setColor(UIConstants.TITLED_BORDER_COLOR);
g2.drawRoundRect(0, -arrowButton.getHeight(), getWidth() - 1, getHeight() + arrowButton.getHeight() - 1, UIConstants.ARC, UIConstants.ARC); g2.drawRoundRect(0, -arrowButton.getHeight(), getWidth() - 1, getHeight() + arrowButton.getHeight() - 1, UIConstants.ARC, UIConstants.ARC);
} }

148
designer_base/src/com/fr/design/layout/TableLayoutHelper.java

@ -4,11 +4,10 @@ package com.fr.design.layout;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.general.Inter;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -19,6 +18,7 @@ public class TableLayoutHelper {
public static final int FILL_LASTCOL_AND_ROW = 3; public static final int FILL_LASTCOL_AND_ROW = 3;
private static final int FIVE = 5; private static final int FIVE = 5;
private static final int TEN = 10; private static final int TEN = 10;
private TableLayoutHelper() { private TableLayoutHelper() {
} }
@ -35,6 +35,7 @@ public class TableLayoutHelper {
/** /**
* 最常用的最后一行列fill或者都是prefer的tablelayout * 最常用的最后一行列fill或者都是prefer的tablelayout
*
* @param components 组件 * @param components 组件
* @return * @return
*/ */
@ -49,6 +50,7 @@ public class TableLayoutHelper {
/** /**
* 标题布局(二级菜单距左边框46) * 标题布局(二级菜单距左边框46)
*
* @param title 标题 * @param title 标题
* @param component 组件 * @param component 组件
* @return 布局好的组件 * @return 布局好的组件
@ -63,6 +65,7 @@ public class TableLayoutHelper {
/** /**
* 标题布局指定gap * 标题布局指定gap
*
* @param label 标题label * @param label 标题label
* @param component 组件 * @param component 组件
* @param gap 距左侧距离 * @param gap 距左侧距离
@ -121,28 +124,26 @@ public class TableLayoutHelper {
} }
public static JPanel createGapTableLayoutPane(Component[][] components, public static JPanel createGapTableLayoutPane(Component[][] components,
double[] rowSize, double[] columnSize, double horizontalGap, double verticalGap) { double[] rowSize,
double[] columnSize,
double horizontalGap,
double verticalGap) {
JPanel resultPane = setPanelLayout(rowSize, columnSize, horizontalGap, verticalGap); JPanel resultPane = setPanelLayout(rowSize, columnSize, horizontalGap, verticalGap);
for (int i = 0; i < components.length; i++) { addComponent2ResultPane(components, rowSize, columnSize, resultPane);
if (i >= rowSize.length) {
break;
}
Component[] rowComponents = components[i];
for (int j = 0; j < rowComponents.length && j < columnSize.length; j++) {
if (rowComponents[j] == null) {
continue;
}
if (isNextAllNull(rowComponents, j + 1)) { return resultPane;
resultPane.add(rowComponents[j], (2 * j + 1) + "," + (2 * i + 1) + "," + (2 * rowComponents.length - 1) + ",0");
} else {
resultPane.add(rowComponents[j], (2 * j + 1) + "," + (2 * i + 1));
}
}
} }
public static JPanel createDiffVGapTableLayoutPane(Component[][] components,
double[] rowSize,
double[] columnSize,
double horizontalGap,
double[] verticalGap) {
JPanel resultPane = setPanelLayout(rowSize, columnSize, horizontalGap, verticalGap);
addComponent2ResultPane(components, rowSize, columnSize, resultPane);
return resultPane; return resultPane;
} }
@ -198,6 +199,57 @@ public class TableLayoutHelper {
return resultPane; return resultPane;
} }
/**
* 修改TableLayout布局的容器指定位置垂直间距的大小
*
* @param container 容器
* @param index vgap的索引ContainervGapA[ComponentA]vGapB[ComponentB]vGapC,vGapB index=2,
* 详情见{@link TableLayout#setRow(int, double)}
* @param vgap vgap的新值
*/
public static void modifyTableLayoutIndexVGap(Container container, int index, double vgap) {
TableLayout layout = (TableLayout) container.getLayout();
layout.setRow(index, vgap);
layout.layoutContainer(container);
container.repaint();
}
/**
* 修改TableLayout布局的容器指定位置水平间距的大小
*
* @param container 容器
* @param index hgap的索引ContainerhGapA[ComponentA]hGapB[ComponentB],hGapB index=2,
* 详情见{@link TableLayout#setColumn(int, double)}
* @param hgap hgap的新值
*/
public static void modifyTableLayoutIndexHGap(Container container, int index, double hgap) {
TableLayout layout = (TableLayout) container.getLayout();
layout.setColumn(index, hgap);
layout.layoutContainer(container);
container.repaint();
}
private static void addComponent2ResultPane(Component[][] components, double[] rowSize, double[] columnSize, JPanel resultPane) {
for (int i = 0; i < components.length; i++) {
if (i >= rowSize.length) {
break;
}
Component[] rowComponents = components[i];
for (int j = 0; j < rowComponents.length && j < columnSize.length; j++) {
if (rowComponents[j] == null) {
continue;
}
if (isNextAllNull(rowComponents, j + 1)) {
resultPane.add(rowComponents[j], (2 * j + 1) + "," + (2 * i + 1) + "," + (2 * rowComponents.length - 1) + ",0");
} else {
resultPane.add(rowComponents[j], (2 * j + 1) + "," + (2 * i + 1));
}
}
}
}
private static boolean isNextAllNull(Component[] rowComponents, int currentIndex) { private static boolean isNextAllNull(Component[] rowComponents, int currentIndex) {
for (int i = currentIndex; i < rowComponents.length; i++) { for (int i = currentIndex; i < rowComponents.length; i++) {
@ -240,9 +292,51 @@ public class TableLayoutHelper {
return resultPane; return resultPane;
} }
/**
* 创建具有不同垂直间距的TableLayout面板
*
* @param rowSize
* @param columnSize
* @param horizontalGap 水平间距
* @param verticalGap 不同的垂直间距
* @return JPanel 具有不同垂直间距的TableLayout面板
*/
private static JPanel setPanelLayout(double[] rowSize, double[] columnSize, double horizontalGap, double[] verticalGap) {
double layoutSize[][] = new double[2][];
double layoutColumnSize[] = new double[2 * columnSize.length];
double layoutRowSize[] = new double[2 * rowSize.length];
for (int i = 0; i < columnSize.length; i++) {
if (i == 0) {
layoutColumnSize[i * 2] = 0;
} else {
layoutColumnSize[i * 2] = horizontalGap;
}
layoutColumnSize[i * 2 + 1] = columnSize[i];
}
for (int i = 0; i < rowSize.length; i++) {
if (i == 0) {
layoutRowSize[i * 2] = 0;
} else {
layoutRowSize[i * 2] = verticalGap[i - 1];
}
layoutRowSize[i * 2 + 1] = rowSize[i];
}
layoutSize[0] = layoutColumnSize;
layoutSize[1] = layoutRowSize;
JPanel resultPane = new JPanel();
resultPane.setLayout(new TableLayout(layoutSize));
return resultPane;
}
/** /**
* 图表属性表用的比较多的一种布局第一行是title,下面的components相当于二级菜单 * 图表属性表用的比较多的一种布局第一行是title,下面的components相当于二级菜单
* 二级菜单和上层面板的间距在layoutconstants里定义 * 二级菜单和上层面板的间距在layoutconstants里定义
*
* @param title * @param title
* @param components 二级菜单的内容 * @param components 二级菜单的内容
* @param rowSize 二级菜单的行数 * @param rowSize 二级菜单的行数
@ -264,9 +358,9 @@ public class TableLayoutHelper {
public static void main(String[] args) { public static void main(String[] args) {
JFrame jf = new JFrame("test"); JFrame jf = new JFrame("test");
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
JPanel content = (JPanel) jf.getContentPane(); JPanel content = (JPanel) jf.getContentPane();
content.setLayout(new GridLayout(2,2)); content.setLayout(new GridLayout(2, 3));
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
JPanel jp1 = TableLayoutHelper.createTableLayoutPane(createTestComponents("jp1"), TableLayoutHelper.FILL_NONE); JPanel jp1 = TableLayoutHelper.createTableLayoutPane(createTestComponents("jp1"), TableLayoutHelper.FILL_NONE);
@ -275,18 +369,27 @@ public class TableLayoutHelper {
new double[]{f, p, f, p}, new double[]{f, f}, 4, 4); new double[]{f, p, f, p}, new double[]{f, f}, 4, 4);
JPanel jp4 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp4"), JPanel jp4 = TableLayoutHelper.createGapTableLayoutPane(createTestComponents("jp4"),
new double[]{p, FIVE * TEN, p, p, p, p}, new double[]{p, f}, new int[][]{{1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}, 1, FIVE); new double[]{p, FIVE * TEN, p, p, p, p}, new double[]{p, f}, new int[][]{{1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 1}}, 1, FIVE);
JPanel jp5 = TableLayoutHelper.createDiffVGapTableLayoutPane(createTestComponents("jp5"),
new double[]{p, p, p, p, p}, new double[]{p, f}, 4, new double[]{4, 8, 14, 4});
JPanel jp6 = new JPanel();
jp1.setBorder(BorderFactory.createLineBorder(Color.red)); jp1.setBorder(BorderFactory.createLineBorder(Color.red));
jp2.setBorder(BorderFactory.createLineBorder(Color.red)); jp2.setBorder(BorderFactory.createLineBorder(Color.red));
jp3.setBorder(BorderFactory.createLineBorder(Color.red)); jp3.setBorder(BorderFactory.createLineBorder(Color.red));
jp4.setBorder(BorderFactory.createLineBorder(Color.red)); jp4.setBorder(BorderFactory.createLineBorder(Color.red));
jp5.setBorder(BorderFactory.createLineBorder(Color.red));
jp6.setBorder(BorderFactory.createLineBorder(Color.red));
content.add(jp1); content.add(jp1);
content.add(jp2); content.add(jp2);
content.add(jp3); content.add(jp3);
content.add(jp4); content.add(jp4);
content.add(jp5);
content.add(jp6);
GUICoreUtils.centerWindow(jf); GUICoreUtils.centerWindow(jf);
jf.setSize(600, 600); jf.setSize(900, 600);
jf.setVisible(true); jf.setVisible(true);
} }
@ -312,13 +415,12 @@ public class TableLayoutHelper {
button2.setSize(button2.getPreferredSize()); button2.setSize(button2.getPreferredSize());
button1.setBackground(Color.darkGray); button1.setBackground(Color.darkGray);
button2.setBackground(Color.darkGray); button2.setBackground(Color.darkGray);
Component[][] components = new Component[][] { return new Component[][]{
new Component[]{label1, button1}, new Component[]{label1, button1},
new Component[]{label2, null}, new Component[]{label2, null},
new Component[]{label3}, new Component[]{label3},
new Component[]{null, label4}, new Component[]{null, label4},
new Component[]{button2, label5} new Component[]{button2, label5}
}; };
return components;
} }
} }

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

@ -2124,3 +2124,5 @@ FR-Designer_Barcode_Size=Barcode_Size
FS-Designer_DS_Filter_Odd_Tip=Odd_Tip FS-Designer_DS_Filter_Odd_Tip=Odd_Tip
FS-Designer_DS_Filter_Even_Tip=Even_Tip FS-Designer_DS_Filter_Even_Tip=Even_Tip
FS-Designer_DS_Filter_Specify_Tip=Specify_Tip FS-Designer_DS_Filter_Specify_Tip=Specify_Tip
FR-Designer_Mobile-Height-Percent=Max Percent
FR-Designer_Mobile-Height-Limit=Height Limit

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

@ -424,6 +424,8 @@ FR-Designer-App_ReLayout=AppRelayout
FR-Designer_Mobile-Attr=Mobile Attr FR-Designer_Mobile-Attr=Mobile Attr
FR-Designer_Mobile-Vertical=Vertical Screen FR-Designer_Mobile-Vertical=Vertical Screen
FR-Designer_Mobile-Horizontal=Horizontal Screen FR-Designer_Mobile-Horizontal=Horizontal Screen
FR-Designer_Mobile-Height-Percent=Max Percent
FR-Designer_Mobile-Height-Limit=Height Limit
FR-Designer_COMMUNITY=community FR-Designer_COMMUNITY=community
FR-Designer_COMMUNITY_BBS=bbs FR-Designer_COMMUNITY_BBS=bbs
FR-Designer_COMMUNITY_VIDEO=video FR-Designer_COMMUNITY_VIDEO=video

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

@ -1357,7 +1357,7 @@ RWA-NotChange_Unmodified=\u306E\u6539\u6B63\u3092\u66F4\u65B0\u3057\u306A\u3044
User_Information=\u30E6\u30FC\u30B6\u30FC\u60C5\u5831 User_Information=\u30E6\u30FC\u30B6\u30FC\u60C5\u5831
Custom_styles_lost=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u30B9\u30BF\u30A4\u30EB\u306F\u5931\u308F\u308C\u307E\u3057\u305F Custom_styles_lost=\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u30B9\u30BF\u30A4\u30EB\u306F\u5931\u308F\u308C\u307E\u3057\u305F
PageSetup-Margin=\u4F59\u767D PageSetup-Margin=\u4F59\u767D
M-New_FormBook=\ M-New_FormBook=
Widget-TreeNode=\u30C4\u30EA\u30FC\u30CE\u30FC\u30C9\u30DC\u30BF\u30F3 Widget-TreeNode=\u30C4\u30EA\u30FC\u30CE\u30FC\u30C9\u30DC\u30BF\u30F3
Form-Url=\u30A2\u30C9\u30EC\u30B9 Form-Url=\u30A2\u30C9\u30EC\u30B9
Utils-Beyond_the_left_side_of_Border=\u5DE6\u30DC\u30FC\u30C0\u30FC\u8D85\u3048 Utils-Beyond_the_left_side_of_Border=\u5DE6\u30DC\u30FC\u30C0\u30FC\u8D85\u3048
@ -1981,7 +1981,6 @@ FR-Base_UnSignIn=\ \u672A\u30ED\u30B0\u30A4\u30F3
Every=\u6BCE Every=\u6BCE
CellWrite-Preview_Cell_Content=\u30BB\u30EB\u5185\u5BB9 CellWrite-Preview_Cell_Content=\u30BB\u30EB\u5185\u5BB9
FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9 FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9
FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9
FR-Designer_Permissions=\u6A29\u9650 FR-Designer_Permissions=\u6A29\u9650
FR-Designer_Form_Button=\u30DC\u30BF\u30F3 FR-Designer_Form_Button=\u30DC\u30BF\u30F3
FR-Designer_WF_Name=\u540D FR-Designer_WF_Name=\u540D
@ -2004,8 +2003,6 @@ FR-Designer_Data_Filter=\u30C7\u30FC\u30BF\u30D5\u30A3\u30EB\u30BF
FR-Designer_Can_not_use_FormatBursh=\u9023\u7D9A\u3057\u306A\u3044\u8907\u6570\u9818\u57DF\u3067\u306F\u66F8\u5F0F\u30B3\u30D4\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 FR-Designer_Can_not_use_FormatBursh=\u9023\u7D9A\u3057\u306A\u3044\u8907\u6570\u9818\u57DF\u3067\u306F\u66F8\u5F0F\u30B3\u30D4\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
Default=\u65E2\u5B9A Default=\u65E2\u5B9A
FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9 FR-Base-Load_Resource_File=\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u30ED\u30FC\u30C9
FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9
FR-Designer_Cell_Element=\u30BB\u30EB\u8981\u7D20 FR-Designer_Cell_Element=\u30BB\u30EB\u8981\u7D20
FR-Designer_Cell_Attributes=\u30BB\u30EB\u5C5E\u6027 FR-Designer_Cell_Attributes=\u30BB\u30EB\u5C5E\u6027
FR-Designer_Float_Element=\u30D5\u30ED\u30FC\u30C8\u8981\u7D20 FR-Designer_Float_Element=\u30D5\u30ED\u30FC\u30C8\u8981\u7D20
@ -2122,3 +2119,5 @@ FR-Designer_Barcode_Size=
FS-Designer_DS_Filter_Odd_Tip= FS-Designer_DS_Filter_Odd_Tip=
FS-Designer_DS_Filter_Even_Tip= FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip= FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit=

5
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -1982,7 +1982,6 @@ FR-Base_UnSignIn=\uC544\uC9C1 \uB4F1\uB85D
Every=\uAC01 Every=\uAC01
CellWrite-Preview_Cell_Content=\uC140\uB0B4\uC6A9\uBBF8\uB9AC\uBCF4\uAE30 CellWrite-Preview_Cell_Content=\uC140\uB0B4\uC6A9\uBBF8\uB9AC\uBCF4\uAE30
FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9 FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9
FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9
FR-Designer_Permissions= FR-Designer_Permissions=
FR-Designer_Form_Button= FR-Designer_Form_Button=
FR-Designer_WF_Name= FR-Designer_WF_Name=
@ -1995,7 +1994,6 @@ FR-Designer_Parameter=\uB9E4\uAC1C\uBCC0\uC218
FR-Designer-Plugin_Plugin=\uD50C\uB7EC\uADF8\uC778 FR-Designer-Plugin_Plugin=\uD50C\uB7EC\uADF8\uC778
FR-Designer_Background=\uBC30\uACBD FR-Designer_Background=\uBC30\uACBD
Template=\uD15C\uD50C\uB9BF Template=\uD15C\uD50C\uB9BF
FR-Designer_Double=\uC18C\uC218
FR-Designer_Original_Marked_Filed=\uCD08\uAE30\uD0DC\uADF8\uD544\uB4DC FR-Designer_Original_Marked_Filed=\uCD08\uAE30\uD0DC\uADF8\uD544\uB4DC
FR-Designer_Build_Tree_Accord_Marked_Filed_Length=\uC120\uD0DD\uD55C\uB370\uC774\uD130\uC138\uD2B8\uC758\uD0DC\uADF8\uD544\uB4DC\uAE38\uC774\uC5D0\uB530\uB77C\uD2B8\uB9AC\uC0DD\uC131 FR-Designer_Build_Tree_Accord_Marked_Filed_Length=\uC120\uD0DD\uD55C\uB370\uC774\uD130\uC138\uD2B8\uC758\uD0DC\uADF8\uD544\uB4DC\uAE38\uC774\uC5D0\uB530\uB77C\uD2B8\uB9AC\uC0DD\uC131
FR-Designer_Tree_Data_Field=\uD2B8\uB9AC\uB370\uC774\uD130\uD544\uB4DC FR-Designer_Tree_Data_Field=\uD2B8\uB9AC\uB370\uC774\uD130\uD544\uB4DC
@ -2005,7 +2003,6 @@ FR-Product_Demo=\uC81C\uD488\uC2DC\uC5F0
FR-Designer_Data_Filter=\uB370\uC774\uD130\uC120\uBCC4 FR-Designer_Data_Filter=\uB370\uC774\uD130\uC120\uBCC4
Default=\uAE30\uBCF8 Default=\uAE30\uBCF8
FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C
FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9
FR-Designer_Cell_Element=\uC140\uC694\uC18C FR-Designer_Cell_Element=\uC140\uC694\uC18C
FR-Designer_Cell_Attributes=\uC140\uC18D\uC131 FR-Designer_Cell_Attributes=\uC140\uC18D\uC131
FR-Designer_Float_Element=\uD638\uBC84\uC694\uC18C FR-Designer_Float_Element=\uD638\uBC84\uC694\uC18C
@ -2123,3 +2120,5 @@ FR-Designer_Barcode_Size=
FS-Designer_DS_Filter_Odd_Tip= FS-Designer_DS_Filter_Odd_Tip=
FS-Designer_DS_Filter_Even_Tip= FS-Designer_DS_Filter_Even_Tip=
FS-Designer_DS_Filter_Specify_Tip= FS-Designer_DS_Filter_Specify_Tip=
FR-Designer_Mobile-Height-Percent=
FR-Designer_Mobile-Height-Limit=

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

@ -426,6 +426,8 @@ FR-Designer-App_ReLayout=\u624B\u673A\u91CD\u5E03\u5C40
FR-Designer_Mobile-Attr=\u79FB\u52A8\u7AEF\u5C5E\u6027 FR-Designer_Mobile-Attr=\u79FB\u52A8\u7AEF\u5C5E\u6027
FR-Designer_Mobile-Vertical=\u7AD6\u5C4F FR-Designer_Mobile-Vertical=\u7AD6\u5C4F
FR-Designer_Mobile-Horizontal=\u6A2A\u5C4F FR-Designer_Mobile-Horizontal=\u6A2A\u5C4F
FR-Designer_Mobile-Height-Limit=\u624B\u673A\u663E\u793A\u9650\u5236\u9AD8\u5EA6
FR-Designer_Mobile-Height-Percent=\u6700\u5927\u9AD8\u5EA6
FR-Designer_COMMUNITY=\u793E\u533A FR-Designer_COMMUNITY=\u793E\u533A
FR-Designer_COMMUNITY_BBS=\u5E06\u8F6F\u8BBA\u575B FR-Designer_COMMUNITY_BBS=\u5E06\u8F6F\u8BBA\u575B
FR-Designer_COMMUNITY_VIDEO=\u5165\u95E8\u89C6\u9891 FR-Designer_COMMUNITY_VIDEO=\u5165\u95E8\u89C6\u9891

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

@ -424,6 +424,8 @@ FR-Designer-App_ReLayout=\u624B\u6A5F\u91CD\u4F48\u5C40
FR-Designer_Mobile-Attr=\u79FB\u52D5\u7AEF\u5C6C\u6027 FR-Designer_Mobile-Attr=\u79FB\u52D5\u7AEF\u5C6C\u6027
FR-Designer_Mobile-Horizontal=\u6A6B\u5C4F FR-Designer_Mobile-Horizontal=\u6A6B\u5C4F
FR-Designer_Mobile-Vertical=\u8C4E\u5C4F FR-Designer_Mobile-Vertical=\u8C4E\u5C4F
FR-Designer_Mobile-Height-Limit=\u624B\u6A5F\u986F\u793A\u9650\u5236\u9AD8\u5EA6
FR-Designer_Mobile-Height-Percent=\u6700\u5927\u9AD8\u5EA6
FR-Designer_COMMUNITY_QUESTIONS=\u554F\u984C\u6C42\u52A9 FR-Designer_COMMUNITY_QUESTIONS=\u554F\u984C\u6C42\u52A9
FR-Designer_COMMUNITY_SIGN=\u5E06\u8EDF\u8A8D\u8B49 FR-Designer_COMMUNITY_SIGN=\u5E06\u8EDF\u8A8D\u8B49
FR-Designer_COMMUNITY_BUG=BUG\u53CD\u994B FR-Designer_COMMUNITY_BUG=BUG\u53CD\u994B

2
designer_base/src/com/fr/design/mainframe/JSliderPane.java

@ -91,7 +91,6 @@ public class JSliderPane extends JPanel {
} }
public static final JSliderPane getInstance() { public static final JSliderPane getInstance() {
// if (THIS == null) { // if (THIS == null) {
// THIS = new JSliderPane(); // THIS = new JSliderPane();
@ -278,6 +277,7 @@ public class JSliderPane extends JPanel {
getTimes(sliderValue); getTimes(sliderValue);
showValue = times; showValue = times;
showValSpinner.setValue(times); showValSpinner.setValue(times);
customButton.setSelected(true);
} }
}); });
} else { } else {

40
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -122,6 +122,9 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
extraPane.initPropertyGroups(designer); extraPane.initPropertyGroups(designer);
} }
} }
// for (AbstractPropertyTable propertyTable : widgetPropertyTables) {
// propertyTable.initPropertyGroups(designer);
// }
} }
/** /**
@ -220,9 +223,14 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
MobileWidgetDefinePane extraPane = (MobileWidgetDefinePane) widgetAttrProvider.createWidgetAttrPane(); MobileWidgetDefinePane extraPane = (MobileWidgetDefinePane) widgetAttrProvider.createWidgetAttrPane();
if (extraPane != null) { if (extraPane != null) {
mobileExtraPropertyPanes.add(extraPane); mobileExtraPropertyPanes.add(extraPane);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(formWidgetCardPane));
wsp.add(extraPane); wsp.add(extraPane);
} }
// AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable();
// widgetPropertyTables.add(propertyTable);
// designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(formWidgetCardPane));
//
// UIScrollPane uiScrollPane = new UIScrollPane(getExtraBodyTable(propertyTable));
// wsp.add(uiScrollPane);
} }
} }
} }
@ -379,19 +387,25 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetPrope
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED || evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED || evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED) { || evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED) {
int value = downPanel.getVerticalScrollBar().getValue(); //fanglei:下面的注释不要删,只是暂时屏蔽
if (hasSelectParaPane(getEditingFormDesigner())) { // int value = downPanel.getVerticalScrollBar().getValue();
cardLayout.show(centerPane, PARA); // if (hasSelectParaPane(getEditingFormDesigner())) {
mobileParaWidgetTable.refreshData(); // cardLayout.show(centerPane, PARA);
} else { // mobileParaWidgetTable.refreshData();
cardLayout.show(centerPane, BODY); // } else {
mobileWidgetTable.refreshData(); // cardLayout.show(centerPane, BODY);
// mobileWidgetTable.refreshData();
// }
// //出现滚动条
// downPanel.doLayout();
// //控件列表选中某组件,触发表单中选中控件,选中事件又触发列表刷新,滚动条回到0
// //此处设置滚动条值为刷新前
// downPanel.getVerticalScrollBar().setValue(value);
if (mobileExtraPropertyPanes != null) {
for (MobileWidgetDefinePane extraPane : mobileExtraPropertyPanes) {
extraPane.populate(designer);
}
} }
//出现滚动条
downPanel.doLayout();
//控件列表选中某组件,触发表单中选中控件,选中事件又触发列表刷新,滚动条回到0
//此处设置滚动条值为刷新前
downPanel.getVerticalScrollBar().setValue(value);
} }
} }
} }

93
designer_form/src/com/fr/design/widget/ui/designer/mobile/ElementCaseDefinePane.java

@ -4,6 +4,7 @@ import com.fr.base.mobile.MobileFitAttrState;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -11,19 +12,14 @@ import com.fr.design.gui.ispinner.UISpinner;
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;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.ElementCaseEditor;
import com.fr.general.Inter; import com.fr.general.Inter;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
/** /**
* 报表块-移动端属性面板 * 报表块-移动端属性面板
@ -45,13 +41,27 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
private UICheckBox heightRestrictCheckBox; // 手机显示限制高度复选框 private UICheckBox heightRestrictCheckBox; // 手机显示限制高度复选框
private UILabel maxHeightLabel; private UILabel maxHeightLabel;
private UISpinner maxHeightSpinner; // 最大高度Spinner private UISpinner maxHeightSpinner; // 最大高度Spinner
private AttributeChangeListener changeListener;
public ElementCaseDefinePane (XCreator xCreator) { public ElementCaseDefinePane (XCreator xCreator) {
this.xCreator = xCreator; this.xCreator = xCreator;
} }
@Override @Override
protected String title4PopupWindow() { protected void initContentPane() {}
@Override
protected JPanel createContentPane() {
return null;
}
@Override
public String getIconPath() {
return "";
}
@Override
public String title4PopupWindow() {
return "ElementCase"; return "ElementCase";
} }
@ -62,8 +72,8 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
this.hComboBox = new UIComboBox(ITEMS); this.hComboBox = new UIComboBox(ITEMS);
this.vComboBox = new UIComboBox(ITEMS); this.vComboBox = new UIComboBox(ITEMS);
this.heightRestrictCheckBox = new UICheckBox(Inter.getLocText("Form-EC_heightrestrict")); this.heightRestrictCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Mobile-Height-Limit"));
this.maxHeightLabel = new UILabel(Inter.getLocText("Form-EC_heightpercent"), SwingConstants.LEFT); this.maxHeightLabel = new UILabel(Inter.getLocText("FR-Designer_Mobile-Height-Percent"), SwingConstants.LEFT);
this.maxHeightSpinner = new UISpinner(0, 1, 0.01, 0.75); this.maxHeightSpinner = new UISpinner(0, 1, 0.01, 0.75);
maxHeightSpinner.setVisible(false); maxHeightSpinner.setVisible(false);
maxHeightLabel.setVisible(false); maxHeightLabel.setVisible(false);
@ -86,39 +96,68 @@ public class ElementCaseDefinePane extends MobileWidgetDefinePane{
UIExpandablePane folderPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Fit"), 280, 20, panelWrapper); UIExpandablePane folderPane = new UIExpandablePane(Inter.getLocText("FR-Designer_Fit"), 280, 20, panelWrapper);
this.add(folderPane, BorderLayout.NORTH); this.add(folderPane, BorderLayout.NORTH);
this.bingListeners2Widgets(); this.bingListeners2Widgets();
this.setGlobalNames();
this.repaint(); this.repaint();
} }
public void bingListeners2Widgets() { private void bingListeners2Widgets() {
this.hComboBox.addActionListener(new ActionListener() { reInitAllListeners();
this.changeListener = new AttributeChangeListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void attributeChange() {
((ElementCaseEditor)xCreator.toData()).setHorziontalAttr(MobileFitAttrState.parse(hComboBox.getSelectedIndex() + 1)); update();
}
};
}
/**
* 后台初始化所有事件.
*/
private void reInitAllListeners() {
initListener(this);
} }
});
this.vComboBox.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void populate(FormDesigner designer) {
((ElementCaseEditor)xCreator.toData()).setVerticalAttr(MobileFitAttrState.parse(vComboBox.getSelectedIndex() + 1)); this.designer = designer;
this.addAttributeChangeListener(changeListener);
ElementCaseEditor elementCaseEditor = (ElementCaseEditor)xCreator.toData();
this.hComboBox.setSelectedIndex(elementCaseEditor.getHorziontalAttr().getState() - 1);
this.vComboBox.setSelectedIndex(elementCaseEditor.getVerticalAttr().getState() - 1);
this.heightRestrictCheckBox.setSelected(elementCaseEditor.isHeightRestrict());
this.maxHeightLabel.setVisible(elementCaseEditor.isHeightRestrict());
this.maxHeightSpinner.setVisible(elementCaseEditor.isHeightRestrict());
this.maxHeightSpinner.setValue(elementCaseEditor.getHeightPercent());
} }
});
this.heightRestrictCheckBox.addItemListener(new ItemListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void update() {
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
String globalName = this.getGlobalName();
switch (globalName) {
case "hComboBox":
((ElementCaseEditor)xCreator.toData()).setHorziontalAttr(MobileFitAttrState.parse(hComboBox.getSelectedIndex() + 1));
break;
case "vComboBox":
((ElementCaseEditor)xCreator.toData()).setVerticalAttr(MobileFitAttrState.parse(vComboBox.getSelectedIndex() + 1));
break;
case "heightRestrictCheckBox":
boolean isHeightRestrict = heightRestrictCheckBox.isSelected(); boolean isHeightRestrict = heightRestrictCheckBox.isSelected();
((ElementCaseEditor)xCreator.toData()).setHeightRestrict(isHeightRestrict); ((ElementCaseEditor)xCreator.toData()).setHeightRestrict(isHeightRestrict);
maxHeightSpinner.setVisible(isHeightRestrict); maxHeightSpinner.setVisible(isHeightRestrict);
maxHeightLabel.setVisible(isHeightRestrict); maxHeightLabel.setVisible(isHeightRestrict);
} break;
}); case "maxHeightSpinner":
this.maxHeightSpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
((ElementCaseEditor)xCreator.toData()).setHeightPercent(maxHeightSpinner.getValue()); ((ElementCaseEditor)xCreator.toData()).setHeightPercent(maxHeightSpinner.getValue());
break;
} }
});
} }
private void setGlobalNames() {
this.hComboBox.setGlobalName("hComboBox");
this.vComboBox.setGlobalName("vComboBox");
this.heightRestrictCheckBox.setGlobalName("heightRestrictCheckBox");
this.maxHeightSpinner.setGlobalName("maxHeightSpinner");
}
} }

17
designer_form/src/com/fr/design/widget/ui/designer/mobile/MobileWidgetDefinePane.java

@ -1,13 +1,26 @@
package com.fr.design.widget.ui.designer.mobile; package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.dialog.BasicPane; import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.mainframe.FormDesigner;
/** /**
* 所有移动端需要拓展的属性面板均继承此类 * 所有移动端需要拓展的属性面板均继承此类
* *
* Created by fanglei on 2017/8/8. * Created by fanglei on 2017/8/8.
*/ */
public abstract class MobileWidgetDefinePane extends BasicPane{ public abstract class MobileWidgetDefinePane extends AbstractAttrNoScrollPane{
//初始化panel数据再repaint //初始化panel数据再repaint
public abstract void initPropertyGroups(Object source); public abstract void initPropertyGroups(Object source);
/**
* 从xCreator中提取数据展示在属性面板中
*
* @param designer
*/
public abstract void populate(FormDesigner designer);
/**
* 从属性面板把数据传到后台
*/
public abstract void update();
} }

Loading…
Cancel
Save