Browse Source

无jira任务, release/10.0 合 release/11.0 解决冲突

bugfix/11.0
Henry.Wang 3 years ago
parent
commit
2a4d3e3821
  1. 18
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  2. 14
      designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java
  3. 2
      designer-realize/src/main/java/com/fr/design/mainframe/app/FormApp.java

18
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -34,6 +34,7 @@ import com.fr.design.menu.KeySetUtils;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.event.Event;
@ -101,6 +102,23 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
return context.contain(PluginModule.ExtraDesign, ShortCut.TEMPLATE_TREE);
}
});
GeneralContext.listenPluginRunningChanged(new PluginEventListener() {
@Override
public void on(PluginEvent event) {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
DesignerFrameFileDealerPane.getInstance().refresh();
DesignerFrameFileDealerPane.getInstance().stateChange();
}
});
}
}, new PluginFilter() {
@Override
public boolean accept(PluginContext context) {
return context.contain(PluginModule.ExtraDesign, App.MARK_STRING);
}
});
}
private List<FileToolbarStateChangeListener> otherToolbarStateChangeListeners = new ArrayList<>();

14
designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java

@ -18,6 +18,16 @@ public class AdjustWorkBookDefaultStyleUtils {
private static final Color TEMPLATE_BACKGROUND = new Color(16, 11, 43);
private static final Color CELL_ELEMENT_BORDER = new Color(110, 110, 110);
private static Color currentStoryBack = null;
public static void setCurrentStoryBack(Color color) {
currentStoryBack = color;
}
private static Color getCurrentStoryBack() {
return currentStoryBack == null ? TEMPLATE_BACKGROUND : currentStoryBack;
}
public static void adjustCellElement(CellElement cellElement) {
if (DesignModeContext.isDuchampMode()) {
Style style = cellElement.getStyle();
@ -33,14 +43,14 @@ public class AdjustWorkBookDefaultStyleUtils {
public static void adjustFloatElement(FloatElement floatElement) {
if (DesignModeContext.isDuchampMode()) {
Style style = floatElement.getStyle();
style = style.deriveBackground(ColorBackground.getInstance(TEMPLATE_BACKGROUND));
style = style.deriveBackground(ColorBackground.getInstance(getCurrentStoryBack()));
style = style.deriveFRFont(style.getFRFont().applyForeground(Color.WHITE));
floatElement.setStyle(style);
}
}
public static Color adjustBack(Color color) {
return DesignModeContext.isDuchampMode() ? TEMPLATE_BACKGROUND : color;
return DesignModeContext.isDuchampMode() ? getCurrentStoryBack() : color;
}
/**

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

@ -82,7 +82,7 @@ class FormApp extends AbstractAppProvider {
OpenResult<Form, Parameter[]> result = worker.getResult();
if (result != null) {
return (JTemplate<Form, ?>) StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG,
new Object[]{result.getBaseBook(), tplFile, new Parameter[0]}, classType, BaseJForm.class);
new Object[]{result.getBaseBook(), tplFile, result.getRef()}, classType, BaseJForm.class);
}
return emptyForm;
}

Loading…
Cancel
Save