Browse Source
* commit '6de3e5810fbd2e0b627970f1fcd2d2f7e4ae1e63': refactor refactor conflict 1227 remove ds_store 1227 1227 . .: . 加token校验
18 changed files with 214 additions and 37 deletions
@ -0,0 +1,14 @@
|
||||
package com.fr.design.fun; |
||||
|
||||
import com.fr.stable.fun.mark.Aftermath; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
|
||||
/** |
||||
* 左上角目录树上边工具条的插件接口 |
||||
* Created by hzzz on 2017/11/30. |
||||
*/ |
||||
public interface TemplateTreeShortCutProvider extends Mutable, Aftermath { |
||||
String XML_TAG = "TemplateTreeShortCut"; |
||||
|
||||
int CURRENT_LEVEL = 1; |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.fr.design.fun.impl; |
||||
|
||||
import com.fr.design.actions.UpdateAction; |
||||
import com.fr.design.fun.TemplateTreeShortCutProvider; |
||||
import com.fr.stable.fun.mark.API; |
||||
|
||||
/** |
||||
* 左上角目录树上边工具条的插件接口 |
||||
* Created by hzzz on 2017/11/30. |
||||
*/ |
||||
@API(level = TemplateTreeShortCutProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractTemplateTreeShortCutProvider extends UpdateAction implements TemplateTreeShortCutProvider { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return 1; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
|
||||
@Override |
||||
public void process() { |
||||
} |
||||
|
||||
@Override |
||||
public void undo() { |
||||
} |
||||
} |
@ -0,0 +1,36 @@
|
||||
package com.fr.design.mainframe.toolbar; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.file.NewTemplatePane; |
||||
|
||||
import javax.swing.*; |
||||
|
||||
/** |
||||
* Created by hzzz on 2017/12/26. |
||||
*/ |
||||
public class ToolBarNewTemplatePane extends NewTemplatePane { |
||||
|
||||
private static final ToolBarNewTemplatePane instance = new ToolBarNewTemplatePane(); |
||||
|
||||
private ToolBarNewTemplatePane() { |
||||
} |
||||
|
||||
public static NewTemplatePane getInstance() { |
||||
return instance; |
||||
} |
||||
|
||||
@Override |
||||
public Icon getNew() { |
||||
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/addicon.png"); |
||||
} |
||||
|
||||
@Override |
||||
public Icon getMouseOverNew() { |
||||
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/add_press.png"); |
||||
} |
||||
|
||||
@Override |
||||
public Icon getMousePressNew() { |
||||
return BaseUtils.readIcon("/com/fr/design/images/buttonicon/add_press.png"); |
||||
} |
||||
} |
@ -0,0 +1,46 @@
|
||||
package com.fr.design.mainframe.toolbar; |
||||
|
||||
import com.fr.base.BaseUtils; |
||||
import com.fr.design.actions.edit.RedoAction; |
||||
import com.fr.design.actions.edit.UndoAction; |
||||
import com.fr.design.actions.file.ExitDesignerAction; |
||||
import com.fr.design.actions.file.PreferenceAction; |
||||
import com.fr.design.mainframe.JTemplate; |
||||
import com.fr.design.menu.MenuDef; |
||||
import com.fr.design.menu.SeparatorDef; |
||||
import com.fr.design.menu.ShortCut; |
||||
import com.fr.general.Inter; |
||||
import com.fr.stable.ArrayUtils; |
||||
|
||||
/** |
||||
* Created by hzzz on 2017/12/28. |
||||
*/ |
||||
public class VcsScene { |
||||
|
||||
public static MenuDef createFileMenuDef(ToolBarMenuDockPlus plus) { |
||||
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_File"), 'F'); |
||||
|
||||
ShortCut[] scs = new ShortCut[0]; |
||||
if (!ArrayUtils.isEmpty(scs)) { |
||||
menuDef.addShortCut(scs); |
||||
} |
||||
|
||||
scs = plus.shortcut4FileMenu(); |
||||
if (!ArrayUtils.isEmpty(scs)) { |
||||
menuDef.addShortCut(SeparatorDef.DEFAULT); |
||||
menuDef.addShortCut(scs); |
||||
menuDef.addShortCut(SeparatorDef.DEFAULT); |
||||
} |
||||
|
||||
if (!BaseUtils.isAuthorityEditing()) { |
||||
menuDef.addShortCut(new PreferenceAction()); |
||||
} |
||||
|
||||
menuDef.addShortCut(new ExitDesignerAction()); |
||||
return menuDef; |
||||
} |
||||
|
||||
public static ShortCut[] shortcut4FileMenu(JTemplate jTemplate) { |
||||
return new ShortCut[]{new UndoAction(jTemplate), new RedoAction(jTemplate)}; |
||||
} |
||||
} |
Loading…
Reference in new issue