forked from FR-Global/plugin-event-manager
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.2 KiB
47 lines
1.2 KiB
package com.fr.plugin.event.manager.provider; |
|
|
|
import com.fr.design.fun.MenuHandler; |
|
import com.fr.design.fun.impl.AbstractMenuHandler; |
|
import com.fr.design.mainframe.JForm; |
|
import com.fr.design.mainframe.JWorkBook; |
|
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; |
|
import com.fr.design.menu.ShortCut; |
|
import com.fr.plugin.event.manager.core.FormEventManager; |
|
import com.fr.plugin.event.manager.core.WorkbookEventManager; |
|
|
|
/** |
|
* @author Joe |
|
* @version 10.0 |
|
* Created by Joe on 9/3/2020 |
|
*/ |
|
public class EventManagerProvider extends AbstractMenuHandler { |
|
@Override |
|
public int insertPosition(int i) { |
|
return 9; |
|
} |
|
|
|
@Override |
|
public boolean insertSeparatorBefore() { |
|
return false; |
|
} |
|
|
|
@Override |
|
public boolean insertSeparatorAfter() { |
|
return false; |
|
} |
|
|
|
@Override |
|
public String category() { |
|
return MenuHandler.TEMPLATE; |
|
} |
|
|
|
@Override |
|
public ShortCut shortcut(ToolBarMenuDockPlus plus) { |
|
if (plus instanceof JWorkBook) { |
|
return new WorkbookEventManager((JWorkBook) plus); |
|
} else if (plus instanceof JForm) { |
|
return new FormEventManager((JForm) plus); |
|
} |
|
return null; |
|
} |
|
}
|
|
|