Browse Source

REPORT-11714 开放接口对应的设计器中的修改

research/10.0
Hades 6 years ago
parent
commit
005004faba
  1. 18
      designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java
  2. 18
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

18
designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java

@ -1,14 +1,17 @@
package com.fr.design.parameter; package com.fr.design.parameter;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.data.DataCreatorUI; import com.fr.design.data.DataCreatorUI;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.creator.CRPropertyDescriptor; import com.fr.design.designer.creator.CRPropertyDescriptor;
import com.fr.design.designer.creator.PropertyGroupPane; import com.fr.design.designer.creator.PropertyGroupPane;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.properties.PropertyTab;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.fun.ParameterExpandablePaneUIProvider;
import com.fr.design.gui.ibutton.UIButtonGroup; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -30,6 +33,7 @@ import javax.swing.Icon;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.util.Set;
/** /**
* Created by ibm on 2017/8/2. * Created by ibm on 2017/8/2.
@ -63,9 +67,23 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
JPanel layoutPane = createBoundsPane(); JPanel layoutPane = createBoundsPane();
UIExpandablePane layoutExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Size"), 280, 20, layoutPane); UIExpandablePane layoutExpandablePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Size"), 280, 20, layoutPane);
this.add(layoutExpandablePane, BorderLayout.CENTER); this.add(layoutExpandablePane, BorderLayout.CENTER);
this.addExtraUIExpandablePaneFromPlugin();
} }
private void addExtraUIExpandablePaneFromPlugin() {
Set<ParameterExpandablePaneUIProvider> pluginCreators = ExtraDesignClassManager.getInstance().getArray(ParameterExpandablePaneUIProvider.XML_TAG);
JPanel panel = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (ParameterExpandablePaneUIProvider provider : pluginCreators) {
UIExpandablePane uiExpandablePane = provider.createUIExpandablePane();
PropertyTab propertyTab = provider.addToWhichPropertyTab();
if (uiExpandablePane != null && propertyTab == PropertyTab.ATTR) {
panel.add(uiExpandablePane);
}
}
this.add(panel, BorderLayout.SOUTH);
}
public JPanel createBoundsPane() { public JPanel createBoundsPane() {
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;

18
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

@ -1,8 +1,11 @@
package com.fr.design.widget.ui.designer.mobile; package com.fr.design.widget.ui.designer.mobile;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.properties.PropertyTab;
import com.fr.design.foldablepane.UIExpandablePane; import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.fun.ParameterExpandablePaneUIProvider;
import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.frpane.AttributeChangeListener;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
@ -14,6 +17,7 @@ import com.fr.form.ui.container.WSortLayout;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.util.Set;
/** /**
* Created by plough on 2018/2/5. * Created by plough on 2018/2/5.
@ -33,9 +37,23 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
this.add(getMobileWidgetListPane(), BorderLayout.CENTER); this.add(getMobileWidgetListPane(), BorderLayout.CENTER);
this.addExtraUIExpandablePaneFromPlugin();
this.repaint(); this.repaint();
} }
private void addExtraUIExpandablePaneFromPlugin() {
Set<ParameterExpandablePaneUIProvider> pluginCreators = ExtraDesignClassManager.getInstance().getArray(ParameterExpandablePaneUIProvider.XML_TAG);
JPanel panel = FRGUIPaneFactory.createYBoxEmptyBorderPane();
for (ParameterExpandablePaneUIProvider provider : pluginCreators) {
UIExpandablePane uiExpandablePane = provider.createUIExpandablePane();
PropertyTab propertyTab = provider.addToWhichPropertyTab();
if (uiExpandablePane != null && propertyTab == PropertyTab.MOBILE) {
panel.add(uiExpandablePane);
}
}
this.add(panel, BorderLayout.SOUTH);
}
// 控件顺序 // 控件顺序
private UIExpandablePane getMobileWidgetListPane() { private UIExpandablePane getMobileWidgetListPane() {
mobileWidgetListPane = new MobileWidgetListPane(designer, (WSortLayout) paraCreator.toData()); mobileWidgetListPane = new MobileWidgetListPane(designer, (WSortLayout) paraCreator.toData());

Loading…
Cancel
Save