|
|
@ -114,13 +114,28 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 获取插件注册的工具栏按钮(严格区分决策报表与普通模板) |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public WidgetOption[] getStrictWebWidgetOptions() { |
|
|
|
|
|
|
|
return createWebWidgetOptions(true); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public WidgetOption[] getWebWidgetOptions() { |
|
|
|
public WidgetOption[] getWebWidgetOptions() { |
|
|
|
|
|
|
|
return createWebWidgetOptions(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private WidgetOption[] createWebWidgetOptions(boolean filterByTemplateType) { |
|
|
|
Set<ToolbarItemProvider> set = getArray(ToolbarItemProvider.XML_TAG); |
|
|
|
Set<ToolbarItemProvider> set = getArray(ToolbarItemProvider.XML_TAG); |
|
|
|
if (set.isEmpty()) { |
|
|
|
if (set.isEmpty()) { |
|
|
|
return new WidgetOption[0]; |
|
|
|
return new WidgetOption[0]; |
|
|
|
} |
|
|
|
} |
|
|
|
List<WidgetOption> list = new ArrayList<>(); |
|
|
|
List<WidgetOption> list = new ArrayList<>(); |
|
|
|
for (ToolbarItemProvider provider : set) { |
|
|
|
for (ToolbarItemProvider provider : set) { |
|
|
|
|
|
|
|
if (filterByTemplateType && !provider.accept()) { |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
WidgetOption option = WidgetOptionFactory.createByWidgetClass( |
|
|
|
WidgetOption option = WidgetOptionFactory.createByWidgetClass( |
|
|
|
provider.nameForWidget(), |
|
|
|
provider.nameForWidget(), |
|
|
|
IOUtils.readIcon(provider.iconPathForWidget()), |
|
|
|
IOUtils.readIcon(provider.iconPathForWidget()), |
|
|
@ -132,7 +147,6 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Map<Class<? extends Widget>, Class<?>> getFormWidgetOptionsMap() { |
|
|
|
public Map<Class<? extends Widget>, Class<?>> getFormWidgetOptionsMap() { |
|
|
|
Set<FormWidgetOptionProvider> set = getArray(FormWidgetOptionProvider.XML_TAG); |
|
|
|
Set<FormWidgetOptionProvider> set = getArray(FormWidgetOptionProvider.XML_TAG); |
|
|
|
Map<Class<? extends Widget>, Class<?>> map = new HashMap<>(); |
|
|
|
Map<Class<? extends Widget>, Class<?>> map = new HashMap<>(); |
|
|
@ -170,7 +184,6 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public WidgetOption[] getCellWidgetOptions() { |
|
|
|
public WidgetOption[] getCellWidgetOptions() { |
|
|
|
Set<CellWidgetOptionProvider> set = getArray(CellWidgetOptionProvider.XML_TAG); |
|
|
|
Set<CellWidgetOptionProvider> set = getArray(CellWidgetOptionProvider.XML_TAG); |
|
|
|
if (set.isEmpty()) { |
|
|
|
if (set.isEmpty()) { |
|
|
|