diff --git a/designer/src/com/fr/design/module/DesignerModule.java b/designer/src/com/fr/design/module/DesignerModule.java index 276172536c..53c4cff0eb 100644 --- a/designer/src/com/fr/design/module/DesignerModule.java +++ b/designer/src/com/fr/design/module/DesignerModule.java @@ -54,7 +54,9 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; import com.fr.stable.bridge.StableFactory; +import com.fr.stable.fun.LogProvider; import com.fr.stable.module.Module; +import com.fr.stable.plugin.PluginSimplify; import com.fr.stable.script.CalculatorProviderContext; import com.fr.stable.script.ValueConverter; import com.fr.stable.xml.ObjectTokenizer; @@ -94,7 +96,7 @@ public class DesignerModule extends DesignModule { InformationCollector.getInstance().collectStartTime(); ExtraDesignClassManager.getInstance().getFeedback().didFeedback(); - ExtraClassManager.getInstance().addLogProvider(DesignerLogImpl.getInstance()); + ExtraClassManager.getInstance().addMutable(LogProvider.MARK_STRING, DesignerLogImpl.getInstance(), PluginSimplify.NULL); } private void registerOtherPane() { diff --git a/designer_base/src/com/fr/design/gui/style/AlignmentPane.java b/designer_base/src/com/fr/design/gui/style/AlignmentPane.java index 1985960f18..ee0a5821e9 100644 --- a/designer_base/src/com/fr/design/gui/style/AlignmentPane.java +++ b/designer_base/src/com/fr/design/gui/style/AlignmentPane.java @@ -134,7 +134,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO private void initTextRotationCombox(){ ArrayList selectOption = new ArrayList(); selectOption.add(Inter.getLocText("FR-Designer_Custom-Angle")); - VerticalTextProcessor processor = ExtraClassManager.getInstance().getVerticalTextProcessor(); + VerticalTextProcessor processor = ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG); if (processor != null){ selectOption.addAll(Arrays.asList(processor.getComboxOption())); } @@ -241,7 +241,7 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO } else { this.textComboBox.setSelectedIndex(0); } - if (style.getVerticalText() == Style.VERTICALTEXT && ExtraClassManager.getInstance().getVerticalTextProcessor() != null) { + if (style.getVerticalText() == Style.VERTICALTEXT && ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) != null) { textRotationComboBox.setSelectedIndex(style.getTextDirection() == Style.LEFT_TO_RIGHT ? 1 : 2); } else { textRotationComboBox.setSelectedIndex(0); diff --git a/designer_base/src/com/fr/design/style/AlignmentPane.java b/designer_base/src/com/fr/design/style/AlignmentPane.java index 346465d052..d95d4bcea8 100644 --- a/designer_base/src/com/fr/design/style/AlignmentPane.java +++ b/designer_base/src/com/fr/design/style/AlignmentPane.java @@ -17,6 +17,7 @@ import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.plugin.ExtraClassManager; +import com.fr.report.fun.VerticalTextProcessor; import com.fr.stable.CoreConstants; import javax.swing.*; @@ -125,7 +126,7 @@ public class AlignmentPane extends BasicPane { directionBG.add(rightToLeftRB); rightToLeftRB.setSelected(true); - if (ExtraClassManager.getInstance().getVerticalTextProcessor() == null){ + if (ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) == null){ return; } isVerticalTextPanel.add(isVerticalTextCheckBox); @@ -301,7 +302,7 @@ public class AlignmentPane extends BasicPane { } private void populateVertical(Style style){ - if (ExtraClassManager.getInstance().getVerticalTextProcessor() == null){ + if (ExtraClassManager.getInstance().getSingle(VerticalTextProcessor.XML_TAG) == null){ return; } this.isVerticalTextCheckBox.setSelected(true); diff --git a/designer_form/src/com/fr/design/mainframe/FormDesigner.java b/designer_form/src/com/fr/design/mainframe/FormDesigner.java index 1abf7ca9e3..19bf64c70f 100644 --- a/designer_form/src/com/fr/design/mainframe/FormDesigner.java +++ b/designer_form/src/com/fr/design/mainframe/FormDesigner.java @@ -740,9 +740,6 @@ public class FormDesigner extends TargetComponent
implements TreeSelection public void refreshRoot() { // 撤销恢复操作都会refreshRoot,这时候的target.getContainer里的widget会和之前不一样,所以不用root判断来取 XLayoutContainer formLayoutContainer = (XLayoutContainer) XCreatorUtils.createXCreator(this.getTarget().getContainer()); - if(ExtraClassManager.getInstance().getDebugLogProviders().length != 0){ - formDesignerDebug(); - } // 布局默认都是1,底层的border改为0,不然没意义 this.getTarget().getContainer().setMargin(new PaddingMargin(0,0,0,0)); formLayoutContainer.setBorder(null); @@ -799,9 +796,6 @@ public class FormDesigner extends TargetComponent implements TreeSelection // 再次打开时,layout下root,有内边距的话组件加上 LayoutUtils.layoutContainer(centerContainer); formLayoutContainer.add(rootComponent, WBorderLayout.CENTER); - if(ExtraClassManager.getInstance().getDebugLogProviders().length != 0){ - formDesignerDebug(); - } } @@ -1069,30 +1063,9 @@ public class FormDesigner extends TargetComponent implements TreeSelection */ public void refreshDesignerUI() { LayoutUtils.layoutRootContainer(getRootComponent()); - if(ExtraClassManager.getInstance().getDebugLogProviders().length != 0){ - formDesignerDebug(); - } repaint(); } - private void formDesignerDebug() { - if(this.getTarget().getContainer() instanceof WBorderLayout){ - Widget widget= ((WBorderLayout) this.getTarget().getContainer()).getLayoutWidget(WBorderLayout.CENTER); - if(widget != null){ - ExtraClassManager.getInstance().sendDebugLog(widget.getClass().getName()+"@"+Integer.toHexString(widget.hashCode())); - } - else { - ExtraClassManager.getInstance().sendDebugLog("Target.center is null"); - } - } - if(this.getRootComponent() != null && this.getRootComponent().toData() != null){ - ExtraClassManager.getInstance().sendDebugLog(this.getRootComponent().toData().getClass().getName()+"@"+Integer.toHexString(this.getRootComponent().toData().getClass().hashCode())); - } - else { - ExtraClassManager.getInstance().sendDebugLog("RootComponent or rootComponent.data is null"); - } - } - /** * 返回复制粘贴删除等动作 * @return 同上