本文整理汇总了Java中org.apache.wicket.injection.Injector类的典型用法代码示例。如果您正苦于以下问题:Java Injector类的具体用法?Java Injector怎么用?Java Injector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Injector类属于org.apache.wicket.injection包,在下文中一共展示了Injector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doRender
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
protected BootstrapRendererInformation doRender(INode value, Locale locale) {
if (!initialized) {
Injector.get().inject(this);
initialized = true;
}
if (value == null) {
return BootstrapRendererInformation.builder().build();
}
if (infinispanClusterService.getMembers().contains(value.getAddress())) {
return BootstrapRendererInformation.builder()
.icon("fa fa-toggle-on")
.label(getString("business.infinispan.node.connected", locale))
.build();
}
return BootstrapRendererInformation.builder()
.icon("fa fa-toggle-off")
.label(getString("business.infinispan.node.disconnected", locale))
.build();
}
示例2: load
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
protected List<MenuItem> load() {
Injector.get().inject(this);
List<MenuItem> menuItems = new ArrayList<MenuItem>();
menuItems.add(new MenuItem(createEditLink(model), new StringResourceModel("WidgetPopupMenu.editSettings", null).getString(), "images/edit.png"));
if (model.getObject().saveToExcel()) {
menuItems.add(new MenuItem(createSaveToExcelLink(model), new StringResourceModel("WidgetPopupMenu.saveExcel", null).getString(), "images/excel.gif"));
}
menuItems.add(new MenuItem(createGoToLink(model), new StringResourceModel("WidgetPopupMenu.gotoEntity", null).getString(), "images/widget_go.png"));
menuItems.add(new MenuItem(createRefreshLink(model), new StringResourceModel("WidgetPopupMenu.refresh", null).getString(), "images/refresh.gif"));
menuItems.add(new MenuItem(createDetachLink(model), new StringResourceModel("WidgetPopupMenu.detach", null).getString(), "images/detach.png"));
menuItems.add(new MenuItem(createEmbedCodeLink(model), new StringResourceModel("WidgetPopupMenu.embeddedCode", null).getString(), "images/embed_code.png"));
menuItems.add(new MenuItem(createMoveLink(model), new StringResourceModel("WidgetPopupMenu.copyMove", null).getString(), "images/move_widget.png"));
menuItems.add(new MenuItem(createDeleteLink(model), new StringResourceModel("WidgetPopupMenu.delete", null).getString(), "images/delete.gif"));
MenuItem menuItem = new MenuItem("images/actions.png", null);
menuItem.setMenuItems(menuItems);
return Arrays.asList(menuItem);
}
示例3: load
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
protected List<MenuItem> load() {
Injector.get().inject(this);
List<MenuItem> menuItems = new ArrayList<MenuItem>();
Object dashboard = model.getObject();
DashboardSection dashboardSection = (DashboardSection)sectionManager.getSection(DashboardSection.ID);
List<ActionContributor> popupContributors = dashboardSection.getPopupContributors();
if (popupContributors != null) {
for (ActionContributor contributor : popupContributors) {
if (contributor.isVisible()) {
AbstractLink link = contributor.getLink(createActionContext(dashboard));
if (link.isVisible()) {
menuItems.add(new MenuItem(link, contributor.getActionName(), contributor.getActionImage()));
}
}
}
}
//MenuItem menuItem = new MenuItem("images/" + ThemesManager.getActionImage(storageService.getSettings().getColorTheme()), null);
MenuItem menuItem = new MenuItem("images/actions.png", null);
menuItem.setMenuItems(menuItems);
return Arrays.asList(menuItem);
}
示例4: load
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
protected List<MenuItem> load() {
Injector.get().inject(this);
List<MenuItem> menuItems = new ArrayList<MenuItem>();
Object analysis = model.getObject();
AnalysisSection analysisSection = (AnalysisSection)sectionManager.getSection(AnalysisSection.ID);
List<ActionContributor> popupContributors = analysisSection.getPopupContributors();
if (popupContributors != null) {
for (ActionContributor contributor : popupContributors) {
if (contributor.isVisible()) {
AbstractLink link = contributor.getLink(createActionContext(analysis));
if (link.isVisible()) {
menuItems.add(new MenuItem(link, contributor.getActionName(), contributor.getActionImage()));
}
}
}
}
//MenuItem menuItem = new MenuItem("images/" + ThemesManager.getActionImage(storageService.getSettings().getColorTheme()), null);
MenuItem menuItem = new MenuItem("images/actions.png", null);
menuItem.setMenuItems(menuItems);
return Arrays.asList(menuItem);
}
示例5: NextServerSession
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public NextServerSession(Request request) {
super(request);
Injector.get().inject(this);
sectionContexts = new HashMap<String, SectionContext>();
List<Section> sections = sectionManager.getSections();
for (Section section : sections) {
sectionContexts.put(section.getId(), SectionContextFactory.createSectionContext(section));
}
// if (!sections.isEmpty()) {
// selectedSectionId = sections.get(0).getId();
// }
String language = storageService.getSettings().getLanguage();
Locale locale = LanguageManager.getInstance().getLocale(language);
setLocale(locale);
LOG.info("--------------------> Set locale to: " + language);
}
示例6: NextPivotDataSource
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public NextPivotDataSource(PivotWidget widget, Map<String, Object> urlQueryParameters) throws ReportRunnerException {
Injector.get().inject(this);
Entity entity = DashboardUtil.getEntity(widget, storageService);
if (!(entity instanceof Chart) && !(entity instanceof Report)) {
throw new IllegalArgumentException("Entity for NextPivotDataSource must be a report or a chart!");
}
DataSource dataSource = getDataSource(entity);
Connection connection = null;
try {
connection = ConnectionUtil.createConnection(storageService, dataSource);
init(getQueryResult(connection, widget, urlQueryParameters));
} catch (Exception e) {
throw new ReportRunnerException(e);
} finally {
ConnectionUtil.closeConnection(connection);
}
}
示例7: StepModel
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public StepModel(String sessionId, StepWrapper step) {
this.sessionId = sessionId;
sectionIndex = step.getScenario().getSection().getIndex();
scenarioIndex = step.getScenario().getIndex();
stepIndex = step.getIndex();
Injector.get().inject(this);
}
示例8: MidPointAuthWebSession
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public MidPointAuthWebSession(Request request) {
super(request);
Injector.get().inject(this);
Locale locale = getLocale();
LOGGER.debug("Found locale {}", locale);
if (locale == null || !MidPointApplication.containsLocale(locale)) {
//default locale for web application
setLocale(MidPointApplication.getDefaultLocale());
}
LOGGER.debug("Using {} as locale", getLocale());
}
示例9: render
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
public String render(HistoryValue value, Locale locale) {
if (!initialized) {
Injector.get().inject(this);
initialized = true;
}
return historyValueService.render(value, locale);
}
示例10: LessCssResource
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public LessCssResource(Class<?> scope, String name, Locale locale, String style, String variation) {
super(scope, name, locale, style, variation);
Injector.get().inject(this);
this.name = name;
this.locale = locale;
this.variation = variation;
}
示例11: ScssResource
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public ScssResource(Class<?> scope, String name, Locale locale, String style, String variation) {
super(scope, name, locale, style, variation);
Injector.get().inject(this);
this.name = name;
this.locale = locale;
this.variation = variation;
}
示例12: LocalizedGenericListItemListModel
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public LocalizedGenericListItemListModel(Class<T> clazz, Comparator<? super T> comparator, EnabledFilter enabledFilter) {
super();
Injector.get().inject(this);
this.clazz = clazz;
this.enabledFilter = enabledFilter;
this.comparator = comparator;
}
示例13: GenericListItemListModel
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public GenericListItemListModel(Class<T> clazz, @Nullable Comparator<? super T> comparator, EnabledFilter enabledFilter) {
super();
Injector.get().inject(this);
this.clazz = clazz;
this.enabledFilter = enabledFilter;
this.comparator = comparator;
}
示例14: AbstractSessionThreadSafeGenericEntityCollectionModel
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
protected AbstractSessionThreadSafeGenericEntityCollectionModel(Class<E> clazz, Supplier<? extends C> newCollectionSupplier) {
super();
Injector.get().inject(this);
this.clazz = clazz;
this.newCollectionSupplier = newCollectionSupplier;
setObject(null); // Sets to an empty collection
}
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:9,代码来源:AbstractSessionThreadSafeGenericEntityCollectionModel.java
示例15: AbstractGenericEntityCollectionModel
import org.apache.wicket.injection.Injector; //导入依赖的package包/类
protected AbstractGenericEntityCollectionModel(Class<E> clazz, Supplier<? extends C> newCollectionSupplier) {
super();
Injector.get().inject(this);
this.clazz = clazz;
this.newCollectionSupplier = newCollectionSupplier;
setObject(null); // Sets to an empty collection
}