Browse Source

REPORT-34994 移动端表格折叠树接口(单元格属性设置接口)-设计器部分 ,表单报表块也需要这个配置

feature/big-screen
zack 4 years ago
parent
commit
1910d60fc9
  1. 30
      designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java
  2. 30
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java

30
designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java

@ -4,9 +4,13 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.cell.CellElementPropertyComponent;
import com.fr.design.fun.BackgroundQuickUIProvider; import com.fr.design.fun.BackgroundQuickUIProvider;
import com.fr.design.fun.CellAttributeProvider; import com.fr.design.fun.CellAttributeProvider;
import com.fr.design.fun.CellPropertyPaneProvider;
import com.fr.design.fun.PresentKindProvider; import com.fr.design.fun.PresentKindProvider;
import com.fr.design.fun.PropertyItemPaneProvider;
import com.fr.design.gui.frpane.UITitlePanel; import com.fr.design.gui.frpane.UITitlePanel;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itabpane.TitleChangeListener; import com.fr.design.gui.itabpane.TitleChangeListener;
@ -31,6 +35,7 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants; import javax.swing.SwingConstants;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension; import java.awt.Dimension;
import java.util.Set;
/** /**
@ -156,6 +161,7 @@ public class CellElementPropertyPane extends DockingView {
return; return;
} }
ePane.getSelection().populatePropertyPane(ePane); ePane.getSelection().populatePropertyPane(ePane);
populateExtraCellProperties(ePane);
} }
@Override @Override
@ -188,5 +194,29 @@ public class CellElementPropertyPane extends DockingView {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CELL_ATTR); EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CELL_ATTR);
EastRegionContainerPane.getInstance().setWindow2PreferWidth(); EastRegionContainerPane.getInstance().setWindow2PreferWidth();
} }
private void populateExtraCellProperties(ElementCasePane ePane) {
if (ePane == null) {
return;
}
Selection selection = ePane.getSelection();
if (selection instanceof CellSelection) {
//单元格属性,限定下是选中单个单元格
TemplateElementCase elementCase = ePane.getEditingElementCase();
if (elementCase != null) {
Set<PropertyItemPaneProvider> itemPaneProviders = ExtraDesignClassManager.getInstance().getArray(PropertyItemPaneProvider.XML_TAG);
if (itemPaneProviders != null) {
for (PropertyItemPaneProvider itemPaneProvider : itemPaneProviders) {
if(itemPaneProvider instanceof CellPropertyPaneProvider){
CellPropertyPaneProvider cellPropertyPaneProvider = (CellPropertyPaneProvider) itemPaneProvider;
CellElementPropertyComponent cellElementPropertyPane = cellPropertyPaneProvider.getSingletonCelPropertyPane();
if (cellElementPropertyPane != null && cellElementPropertyPane.accept(ePane)) {
cellElementPropertyPane.populate(ePane);
}
}
}
}
}
}
}
} }

30
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -2,7 +2,6 @@ package com.fr.design.mainframe;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.cell.CellAttributeAction; import com.fr.design.actions.cell.CellAttributeAction;
import com.fr.design.actions.cell.CellExpandAttrAction; import com.fr.design.actions.cell.CellExpandAttrAction;
@ -19,10 +18,7 @@ import com.fr.design.actions.utils.DeprecatedActionManager;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.cell.CellElementPropertyComponent;
import com.fr.design.fun.CellPropertyPaneProvider;
import com.fr.design.fun.MenuHandler; import com.fr.design.fun.MenuHandler;
import com.fr.design.fun.PropertyItemPaneProvider;
import com.fr.design.gui.frpane.HyperlinkGroupPane; import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.mainframe.cell.QuickEditorRegion; import com.fr.design.mainframe.cell.QuickEditorRegion;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
@ -32,17 +28,14 @@ import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionEvent;
import com.fr.design.selection.SelectionListener; import com.fr.design.selection.SelectionListener;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection; import com.fr.grid.selection.Selection;
import com.fr.page.ReportSettingsProvider; import com.fr.page.ReportSettingsProvider;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.util.Set;
/** /**
@ -88,8 +81,6 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
} }
CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
//加载插件中的单元格属性
populateExtraCellProperties();
QuickEditorRegion.getInstance().populate(getCurrentEditor()); QuickEditorRegion.getInstance().populate(getCurrentEditor());
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
@ -227,25 +218,4 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
return this.getTarget().getReportSettings(); return this.getTarget().getReportSettings();
} }
private void populateExtraCellProperties() {
Selection selection = getSelection();
if (selection instanceof CellSelection) {
//单元格属性,限定下是选中单个单元格
TemplateElementCase elementCase = getEditingElementCase();
if (elementCase != null) {
Set<PropertyItemPaneProvider> itemPaneProviders = ExtraDesignClassManager.getInstance().getArray(PropertyItemPaneProvider.XML_TAG);
if (itemPaneProviders != null) {
for (PropertyItemPaneProvider itemPaneProvider : itemPaneProviders) {
if(itemPaneProvider instanceof CellPropertyPaneProvider){
CellPropertyPaneProvider cellPropertyPaneProvider = (CellPropertyPaneProvider) itemPaneProvider;
CellElementPropertyComponent cellElementPropertyPane = cellPropertyPaneProvider.getSingletonCelPropertyPane();
if (cellElementPropertyPane != null && cellElementPropertyPane.accept(ElementCasePaneDelegate.this)) {
cellElementPropertyPane.populate(ElementCasePaneDelegate.this);
}
}
}
}
}
}
}
} }

Loading…
Cancel
Save