Browse Source

代码提交

feature/big-screen
kerry 5 years ago
parent
commit
f16a920537
  1. 18
      designer-base/src/main/java/com/fr/design/report/fit/menupane/AbstractFormAdaptiveConfigUI.java
  2. 26
      designer-base/src/main/java/com/fr/design/report/fit/menupane/FormAdaptiveConfigUI.java
  3. 13
      designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java
  4. 2
      designer-base/src/main/java/com/fr/design/unit/ReportLengthUnitProcessor.java
  5. 2
      designer-base/src/main/java/com/fr/design/unit/UnitConvertUtil.java
  6. 6
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java

18
designer-base/src/main/java/com/fr/design/report/fit/menupane/AbstractFormAdaptiveConfigUI.java

@ -0,0 +1,18 @@
package com.fr.design.report.fit.menupane;
/**
* Created by kerry on 2020-04-09
*/
public abstract class AbstractFormAdaptiveConfigUI implements FormAdaptiveConfigUI {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public int layerIndex() {
return DEFAULT_LAYER_INDEX;
}
}

26
designer-base/src/main/java/com/fr/design/report/fit/menupane/FormAdaptiveConfigUI.java

@ -0,0 +1,26 @@
package com.fr.design.report.fit.menupane;
import com.fr.design.beans.BasicBeanPane;
import com.fr.stable.fun.mark.Immutable;
import javax.swing.JComponent;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
/**
* Created by kerry on 2020-04-09
*/
public interface FormAdaptiveConfigUI extends Immutable {
String MARK_STRING = "FormAdaptiveConfigUI";
int CURRENT_LEVEL = 1;
BasicBeanPane getConfigPane();
BufferedImage getElementCaseImage(Dimension size, JComponent elementCasePane);
}

13
designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java

@ -1,5 +1,6 @@
package com.fr.design.report.fit.menupane; package com.fr.design.report.fit.menupane;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.JTemplateAction; import com.fr.design.actions.JTemplateAction;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
@ -42,6 +43,10 @@ public class ReportFitAttrAction extends JTemplateAction {
@Override @Override
public String getMenuName() { public String getMenuName() {
FormAdaptiveConfigUI configPane = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUI.MARK_STRING);
if (configPane != null) {
return configPane.getConfigPane().getTitle();
}
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Elementcase"); return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Elementcase");
} }
@ -85,7 +90,13 @@ public class ReportFitAttrAction extends JTemplateAction {
final TemplateFitAttrPane attrPane = new TemplateFitAttrPane(); final TemplateFitAttrPane attrPane = new TemplateFitAttrPane();
showReportFitDialog(fitAttr, jwb, wbTpl, attrPane); showReportFitDialog(fitAttr, jwb, wbTpl, attrPane);
} else { } else {
final ReportFitAttrPane attrPane = new ReportFitAttrPane(); BasicBeanPane attrPane = null;
FormAdaptiveConfigUI configPane = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUI.MARK_STRING);
if (configPane != null) {
attrPane = configPane.getConfigPane();
}else{
attrPane = new ReportFitAttrPane();
}
showReportFitDialog(fitAttr, jwb, wbTpl, attrPane); showReportFitDialog(fitAttr, jwb, wbTpl, attrPane);
} }
} }

2
designer-base/src/main/java/com/fr/design/unit/ReportLengthUnitProcessor.java

@ -9,6 +9,6 @@ public interface ReportLengthUnitProcessor extends Immutable {
String MARK_STRING = "ReportLengthUnitProcessor"; String MARK_STRING = "ReportLengthUnitProcessor";
int CURRENT_LEVEL = 1; int CURRENT_LEVEL = 1;
ReportLengthUNIT getReportLengthUNIT(); ReportLengthUNIT getReportLengthUNIT(int unitType);
} }

2
designer-base/src/main/java/com/fr/design/unit/UnitConvertUtil.java

@ -30,7 +30,7 @@ public class UnitConvertUtil {
public static ReportLengthUNIT parseLengthUNIT(int unitType) { public static ReportLengthUNIT parseLengthUNIT(int unitType) {
ReportLengthUnitProcessor lengthUnitProcessor = ExtraDesignClassManager.getInstance().getSingle(ReportLengthUnitProcessor.MARK_STRING); ReportLengthUnitProcessor lengthUnitProcessor = ExtraDesignClassManager.getInstance().getSingle(ReportLengthUnitProcessor.MARK_STRING);
if (lengthUnitProcessor != null) { if (lengthUnitProcessor != null) {
return lengthUnitProcessor.getReportLengthUNIT(); return lengthUnitProcessor.getReportLengthUNIT(unitType);
} }
for (ReportLengthUNIT lengthUNIT : lengthUNITList) { for (ReportLengthUNIT lengthUNIT : lengthUNITList) {
if (unitType == lengthUNIT.unitType()) { if (unitType == lengthUNIT.unitType()) {

6
designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java

@ -5,6 +5,7 @@ package com.fr.design.mainframe.form;
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.AllowAuthorityEditAction; import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction;
import com.fr.design.base.mode.DesignModeContext; import com.fr.design.base.mode.DesignModeContext;
@ -25,6 +26,7 @@ import com.fr.design.menu.NameSeparator;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane; import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.design.report.fit.menupane.FormAdaptiveConfigUI;
import com.fr.design.selection.SelectableElement; import com.fr.design.selection.SelectableElement;
import com.fr.design.selection.Selectedable; import com.fr.design.selection.Selectedable;
import com.fr.design.selection.SelectionListener; import com.fr.design.selection.SelectionListener;
@ -123,6 +125,10 @@ public class FormElementCaseDesigner
*/ */
@Override @Override
public BufferedImage getElementCaseImage(Dimension size) { public BufferedImage getElementCaseImage(Dimension size) {
FormAdaptiveConfigUI adaptiveConfigUI = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUI.MARK_STRING);
if (adaptiveConfigUI != null) {
return adaptiveConfigUI.getElementCaseImage(size, this.elementCasePane);
}
BufferedImage image = null; BufferedImage image = null;
try { try {
image = new java.awt.image.BufferedImage(size.width, size.height, image = new java.awt.image.BufferedImage(size.width, size.height,

Loading…
Cancel
Save