Browse Source

REPORT-3734 [9.0一轮回归]设计器控件管理打不开

master
kerry 7 years ago
parent
commit
7b7c2fed3b
  1. 19
      designer/src/com/fr/design/widget/ValueWidgetPane.java
  2. 24
      designer/src/com/fr/design/widget/WidgetPane.java
  3. 4
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

19
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,22 @@ public class ValueWidgetPane extends WidgetPane {
@Override
protected void initComponents(ElementCasePane pane) {
super.initComponents(pane);
}
public JPanel 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, p, f};
double[] rowSize = {p};
Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText(new String[]{"FR-Designer_Selection", "FR-Designer_Widget"})), editorTypeComboBox, label,widgetValuePane},
};
JPanel jPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
return jPanel;
}
@Override

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

@ -32,7 +32,7 @@ import java.util.Vector;
*/
public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener {
private EditorTypeComboBox editorTypeComboBox;
protected EditorTypeComboBox editorTypeComboBox;
private CellWidgetCardPane cellEditorCardPane;
private boolean shouldFireSelectedEvent = true;
protected JPanel northPane;
@ -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() {

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));

Loading…
Cancel
Save