|
|
|
@ -43,6 +43,7 @@ import com.fr.design.gui.ibutton.UIButton;
|
|
|
|
|
import com.fr.design.gui.imenu.UIMenuItem; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.layout.FRGUIPaneFactory; |
|
|
|
|
import com.fr.design.mainframe.authority.JTemplateAuthorityChecker; |
|
|
|
|
import com.fr.design.mainframe.chart.info.ChartInfoCollector; |
|
|
|
|
import com.fr.design.mainframe.check.CheckButton; |
|
|
|
|
import com.fr.design.mainframe.template.info.TemplateProcessInfo; |
|
|
|
@ -252,6 +253,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void stopListenThemeConfig() { |
|
|
|
|
if (themeConfigChangeListener != null) { |
|
|
|
|
TemplateThemeConfig<? extends TemplateTheme> config = getUsingTemplateThemeConfig(); |
|
|
|
@ -954,7 +956,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected boolean export() throws Exception { |
|
|
|
|
return this.getTarget().export(TemplateResourceManager.getResource().saveTemplate(editingFILE)); |
|
|
|
|
return this.getTarget().export(TemplateResourceManager.getResource().saveTemplate(getEditingFILE())); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -972,7 +974,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
} else if (DesignerMode.isAuthorityEditing()) { |
|
|
|
|
return new ShortCut[]{new SaveTemplateAction(this), new UndoAction(this), new RedoAction(this)}; |
|
|
|
|
} else { |
|
|
|
|
return new ShortCut[]{new SaveTemplateAction(this), new SaveAsTemplateAction(this), new UndoAction(this), new RedoAction(this)}; |
|
|
|
|
return new ShortCut[]{new SaveTemplateAction(this), new SaveAsTemplateAction(this), new BatchCompileAction(), new UndoAction(this), new RedoAction(this)}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -1409,7 +1411,9 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
* @return 按钮组 |
|
|
|
|
*/ |
|
|
|
|
public UIButton[] createExtraButtons() { |
|
|
|
|
UIButton[] uiButtons = new UIButton[0]; |
|
|
|
|
UIButton[] uiButtons = new UIButton[]{ |
|
|
|
|
(UIButton) new CompileAction().createToolBarComponent() |
|
|
|
|
}; |
|
|
|
|
Set<DesignerFrameUpButtonProvider> providers = ExtraDesignClassManager.getInstance().getArray(DesignerFrameUpButtonProvider.XML_TAG); |
|
|
|
|
for (DesignerFrameUpButtonProvider provider : providers) { |
|
|
|
|
uiButtons = ArrayUtils.addAll(uiButtons, provider.getUpButtons(getMenuState())); |
|
|
|
@ -1574,13 +1578,19 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean saveRealFile() throws Exception { |
|
|
|
|
FILE editingFILE = this.getEditingFILE(); |
|
|
|
|
if (editingFILE == null || editingFILE instanceof MemFILE) { |
|
|
|
|
JTemplateAuthorityChecker jTemplateAuthorityChecker = new JTemplateAuthorityChecker(this); |
|
|
|
|
if (jTemplateAuthorityChecker.isAuthority()) { |
|
|
|
|
FILE editingFILE = this.getEditingFILE(); |
|
|
|
|
if (editingFILE == null || editingFILE instanceof MemFILE) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
export(); |
|
|
|
|
this.editingFILE = editingFILE; |
|
|
|
|
return true; |
|
|
|
|
} else { |
|
|
|
|
jTemplateAuthorityChecker.showAuthorityFailPromptDialog(); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
this.getTarget().export(TemplateResourceManager.getResource().saveTemplate(editingFILE)); |
|
|
|
|
this.editingFILE = editingFILE; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private CallbackSaveWorker saveAs(boolean showLoc) { |
|
|
|
|