Browse Source

Pull request #1810: REPORT-34994 移动端表格折叠树接口(单元格属性设置接口)-设计器部分

Merge in DESIGN/design from ~ZACK/design:release/10.0 to release/10.0

* commit '1910d60fc951dd0b1a69c84d04f4f084812c0b44':
  REPORT-34994 移动端表格折叠树接口(单元格属性设置接口)-设计器部分  ,表单报表块也需要这个配置
  REPORT-34994 移动端表格折叠树接口(单元格属性设置接口)-设计器部分
feature/big-screen
zack 4 years ago
parent
commit
9f64ca4396
  1. 23
      designer-base/src/main/java/com/fr/design/cell/AbstractCellElementPropertyPane.java
  2. 34
      designer-base/src/main/java/com/fr/design/cell/CellElementPropertyComponent.java
  3. 2
      designer-base/src/main/java/com/fr/design/fun/CellAttributeProvider.java
  4. 18
      designer-base/src/main/java/com/fr/design/fun/CellPropertyPaneProvider.java
  5. 15
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractCellPropertyPaneProvider.java
  6. 2
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  7. 30
      designer-realize/src/main/java/com/fr/design/mainframe/CellElementPropertyPane.java
  8. 2
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java

23
designer-base/src/main/java/com/fr/design/cell/AbstractCellElementPropertyPane.java

@ -0,0 +1,23 @@
package com.fr.design.cell;
import com.fr.design.designer.TargetComponent;
import com.fr.design.dialog.BasicPane;
import javax.swing.JPanel;
/**
* @author zack
* @version 10.0
* Created by zack on 2020/7/14
*/
public abstract class AbstractCellElementPropertyPane extends BasicPane implements CellElementPropertyComponent {
@Override
public JPanel toPanel() {
return this;
}
@Override
public boolean accept(TargetComponent tc) {
return true;
}
}

34
designer-base/src/main/java/com/fr/design/cell/CellElementPropertyComponent.java

@ -0,0 +1,34 @@
package com.fr.design.cell;
import com.fr.design.designer.TargetComponent;
import javax.swing.JPanel;
/**
* 单元格属性配置面板接口
* @author zack
* @version 10.0
* Created by zack on 2020/7/14
*/
public interface CellElementPropertyComponent {
/**
* 判断当前编辑的对象是否显示当前实现
* @param tc
* @return
*/
boolean accept(TargetComponent tc);
/**
* 加载数据
* @param tc
*/
void populate(TargetComponent tc);
/**
* 返回当前属性面板,默认返回this
* @return
*/
JPanel toPanel();
}

2
designer-base/src/main/java/com/fr/design/fun/CellAttributeProvider.java

@ -4,8 +4,10 @@ import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.stable.fun.mark.Immutable;
/**
* 单元格属性面板扩展接口,接口基本逻辑不通且不符合接口设计规范,单元格属性扩展可以使用CellPropertyPaneProvider
* Created by zhouping on 2015/11/11.
*/
@Deprecated
public interface CellAttributeProvider extends Immutable{
String MARK_STRING = "CellAttributeProvider";

18
designer-base/src/main/java/com/fr/design/fun/CellPropertyPaneProvider.java

@ -0,0 +1,18 @@
package com.fr.design.fun;
import com.fr.design.cell.CellElementPropertyComponent;
/**
* 单元格设置(属性)扩展接口
* @author zack
* @version 10.0
* Created by zack on 2020/7/14
*/
public interface CellPropertyPaneProvider extends PropertyItemPaneProvider {
/**
* 构造单元格属性面板,面板实现需要使用单例模式实现
* @return 面板类
*/
CellElementPropertyComponent getSingletonCelPropertyPane();
}

15
designer-base/src/main/java/com/fr/design/fun/impl/AbstractCellPropertyPaneProvider.java

@ -0,0 +1,15 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.CellPropertyPaneProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by zhouping on 2015/11/11.
*/
@API(level = CellPropertyPaneProvider.CURRENT_LEVEL)
public abstract class AbstractCellPropertyPaneProvider extends AbstractPropertyItemPaneProvider implements CellPropertyPaneProvider {
public int currentAPILevel() {
return CellPropertyPaneProvider.CURRENT_LEVEL;
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -227,9 +227,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
itemBean.getEnableModes());
UIButton button = propertyItem.getButton();
List<ActionListener> buttonListeners = itemBean.getButtonListeners();
if (buttonListeners != null) {
for (ActionListener buttonListener : buttonListeners) {
button.addActionListener(buttonListener);
}
}
propertyItemMap.put(key, propertyItem);
String replaceKey = provider.replaceKey();

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

@ -4,9 +4,13 @@
package com.fr.design.mainframe;
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.CellAttributeProvider;
import com.fr.design.fun.CellPropertyPaneProvider;
import com.fr.design.fun.PresentKindProvider;
import com.fr.design.fun.PropertyItemPaneProvider;
import com.fr.design.gui.frpane.UITitlePanel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itabpane.TitleChangeListener;
@ -31,6 +35,7 @@ import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.Set;
/**
@ -156,6 +161,7 @@ public class CellElementPropertyPane extends DockingView {
return;
}
ePane.getSelection().populatePropertyPane(ePane);
populateExtraCellProperties(ePane);
}
@Override
@ -188,5 +194,29 @@ public class CellElementPropertyPane extends DockingView {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CELL_ATTR);
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);
}
}
}
}
}
}
}
}

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

@ -28,7 +28,6 @@ import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.selection.SelectionEvent;
import com.fr.design.selection.SelectionListener;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.page.ReportSettingsProvider;
@ -82,6 +81,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
}
CellWidgetPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
QuickEditorRegion.getInstance().populate(getCurrentEditor());
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
// 模板初始化完成后,才能初始化超级链接面板

Loading…
Cancel
Save