Browse Source

Merge pull request #1135 in BA/design from ~KERRY/design:release/9.0 to release/9.0

* commit 'e52f941086fe6a1e1bfef7a092bcf20c24fcf598':
  代码质量
  REPORT-3734 [9.0一轮回归]设计器控件管理打不开
master
superman 7 years ago
parent
commit
a11a16dcd2
  1. 20
      designer/src/com/fr/design/widget/ValueWidgetPane.java
  2. 24
      designer/src/com/fr/design/widget/WidgetPane.java
  3. 1
      designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java
  4. 4
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  5. 2
      designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java

20
designer/src/com/fr/design/widget/ValueWidgetPane.java

@ -1,9 +1,11 @@
package com.fr.design.widget;
import javax.swing.JPanel;
import javax.swing.*;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.widget.editors.WidgetValueEditor;
import com.fr.form.ui.DataControl;
@ -11,6 +13,8 @@ import com.fr.form.ui.Widget;
import com.fr.form.ui.WidgetValue;
import com.fr.general.Inter;
import java.awt.*;
public class ValueWidgetPane extends WidgetPane {
private JPanel widgetValuePane;
private WidgetValueEditor widgetValueEditor;
@ -19,13 +23,23 @@ public class ValueWidgetPane extends WidgetPane {
@Override
protected void initComponents(ElementCasePane pane) {
super.initComponents(pane);
}
public JPanel initNorthPane(){
JPanel northPane = super.initNorthPane();
label = new UILabel(" " + Inter.getLocText(new String[]{"Widget", "Value"})+ ":");
northPane.add(label);
label.setVisible(false);
widgetValuePane = new JPanel();
widgetValuePane.setLayout(FRGUIPaneFactory.createBorderLayout());
northPane.add(widgetValuePane);
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {p, p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{northPane, label,widgetValuePane},
};
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return jPanel;
}
@Override

24
designer/src/com/fr/design/widget/WidgetPane.java

@ -35,7 +35,7 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
private EditorTypeComboBox editorTypeComboBox;
private CellWidgetCardPane cellEditorCardPane;
private boolean shouldFireSelectedEvent = true;
protected JPanel northPane;
private JPanel northPane;
public WidgetPane() {
this(null);
@ -55,7 +55,18 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
editorTypeComboBox = new EditorTypeComboBox(pane != null);
editorTypeComboBox.setPreferredSize(new Dimension(155, 30));
editorTypeComboBox.setMaximumRowCount(16);
northPane = initNorthPane();
northPane.setBorder(BorderFactory.createEmptyBorder(12, 10, 10, 15));
this.add(northPane, BorderLayout.NORTH);
editorTypeComboBox.addItemListener(this);
cellEditorCardPane = new CellWidgetCardPane(pane);
this.add(cellEditorCardPane, BorderLayout.CENTER);
this.addAttributeChangeListener(listener);
}
public JPanel initNorthPane(){
UILabel emptyLabel = new UILabel();
emptyLabel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
@ -66,15 +77,8 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText(new String[]{"FR-Designer_Selection", "FR-Designer_Widget"})), emptyLabel, editorTypeComboBox},
};
northPane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
northPane.setBorder(BorderFactory.createEmptyBorder(12, 10, 10, 15));
this.add(northPane, BorderLayout.NORTH);
editorTypeComboBox.addItemListener(this);
cellEditorCardPane = new CellWidgetCardPane(pane);
this.add(cellEditorCardPane, BorderLayout.CENTER);
this.addAttributeChangeListener(listener);
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return jPanel;
}
protected JPanel createContentPane() {

1
designer/src/com/fr/design/widget/ui/DateEditorDefinePane.java

@ -129,7 +129,6 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
currentSamplelabel = timeSampleLabel;
}
refreshPreviewLabel();
CellWidgetPropertyPane.getInstance().update();
}
};
fomatHeadPane.add(fomatHeadGroup, BorderLayout.NORTH);

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

@ -179,10 +179,10 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
topToolBar.setBorder(BorderFactory.createEmptyBorder(2, 0, 2, 0));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = { p, f, 155};
double[] columnSize = { p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(getAddItemText()), null, topToolBar},
new Component[]{new UILabel(getAddItemText()), topToolBar},
};
JPanel leftTopPane = TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize);
leftTopPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 6, 0));

2
designer_form/src/com/fr/design/widget/ui/designer/DateEditorDefinePane.java

@ -78,7 +78,7 @@ public class DateEditorDefinePane extends DirectWriteEditorDefinePane<DateEditor
};
double[] rowSize = {p, p, p, p, p, p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 3}, {1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
int[][] rowCount = {{1, 1}, {1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 10, 10);
JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));

Loading…
Cancel
Save