当前位置: 首页>>代码示例>>Java>>正文


Java HeaderItem类代码示例

本文整理汇总了Java中org.apache.wicket.markup.head.HeaderItem的典型用法代码示例。如果您正苦于以下问题:Java HeaderItem类的具体用法?Java HeaderItem怎么用?Java HeaderItem使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HeaderItem类属于org.apache.wicket.markup.head包,在下文中一共展示了HeaderItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(JavaScriptHeaderItem.forReference(new JQueryUIResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new SelectionPopoverResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new HoverResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new ScrollIntoViewResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new DoneEventsResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new HotkeysResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new CookiesResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new CodeMirrorResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new ClipboardResourceReference()));
	dependencies.add(CssHeaderItem.forReference(
			new BaseDependentCssResourceReference(SourceViewResourceReference.class, "source-view.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:17,代码来源:SourceViewResourceReference.java

示例2: createHeaderFilter

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
protected IHeaderResponseFilter createHeaderFilter(String headerFilterName, List<IHeaderResponseFilter> filters) {
    return new IHeaderResponseFilter() {

        @Override
        public String getName() {
            return headerFilterName;
        }

        @Override
        public boolean accepts(HeaderItem item) {
            boolean truth = true;
            for (IHeaderResponseFilter filter : filters) {
                if (!this.equals(filter)) {
                    truth &= !filter.accepts(item);
                }
            }
            return truth;
        }
    };
}
 
开发者ID:opensingular,项目名称:singular-server,代码行数:21,代码来源:SingularHeaderResponseDecorator.java

示例3: renderHead

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public void renderHead(final IHeaderResponse response) {
    HeaderItem headerItem = null;
    if (renderedShowing && showing) {
        /*
         * workaround for modal tags being copied by bootstrap-modal right into body and wicket updating the wrong
         * tags in their previous position
         */
        headerItem = OnDomReadyHeaderItem.forScript(createRefreshScript());
    } else if (!renderedShowing && showing) {
        headerItem = OnDomReadyHeaderItem.forScript(createShowScript());
        renderedShowing = true;
    } else if (renderedShowing && !showing) {
        final StringBuilder script = new StringBuilder();
        //scroll gets enabled again by registered hidden.bs.modal event from bootstrapModalConfig.js
        script.append("$(window).disablescroll();");
        script.append(createRefreshScript());
        script.append(createHideScript());
        headerItem = OnDomReadyHeaderItem.forScript(script);
        renderedShowing = false;
    }
    renderDirectlyOrDelegateToRoot(response, headerItem);
    alreadyRendered = true;
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:25,代码来源:ModalContainer.java

示例4: renderDirectlyOrDelegateToRoot

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
/**
 * fix order of refresh to keep the hierarchy during show(); also only the root container should handle the render
 * in inverse order
 */
private void renderDirectlyOrDelegateToRoot(final IHeaderResponse response, final HeaderItem headerItem) {
    final ModalContainer rootModalContainer = Components.findComponent(ModalContainer.class, this.getPage());
    //render directly if this is not a child of the root and thus the root was already rendered
    if (rootModalContainer == this || rootModalContainer.alreadyRendered) {
        if (headerItem != null) {
            response.render(headerItem);
        }
        while (!rootRenderHeadQueue.isEmpty()) {
            response.render(rootRenderHeadQueue.pop());
        }
    } else if (headerItem != null) {
        //otherwise put the children into the queue to handle page refreshes in the correct order
        rootModalContainer.rootRenderHeadQueue.push(headerItem);
    }
}
 
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:20,代码来源:ModalContainer.java

示例5: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies()
{
    List<HeaderItem> dependencies = new ArrayList<>(super.getDependencies());
    
    // CSS
    dependencies.add(CssHeaderItem.forReference(BratCssVisReference.get()));
    dependencies.add(CssHeaderItem.forReference(BratCssUiReference.get()));
    
    // Libraries
    dependencies.add(forReference(JQueryUILibrarySettings.get().getJavaScriptReference()));
    dependencies.add(forReference(JQuerySvgResourceReference.get()));
    dependencies.add(forReference(JQuerySvgDomResourceReference.get()));
    dependencies.add(forReference(JQueryJsonResourceReference.get()));
    dependencies.add(forReference(JQueryScrollbarWidthReference.get()));
    
    // BRAT helpers
    dependencies.add(forReference(BratConfigurationResourceReference.get()));
    dependencies.add(forReference(BratUtilResourceReference.get()));

    // BRAT modules
    dependencies.add(forReference(BratDispatcherResourceReference.get()));
    dependencies.add(forReference(BratAjaxResourceReference.get()));

    return dependencies;
}
 
开发者ID:webanno,项目名称:webanno,代码行数:27,代码来源:BratVisualizerResourceReference.java

示例6: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(JavaScriptHeaderItem.forReference(new ScrollIntoViewResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new CaretResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new HotkeysResourceReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new TextareaCaretPositionResourceReference()));
	dependencies.add(CssHeaderItem.forReference(new BaseDependentCssResourceReference(
			InputAssistResourceReference.class, "input-assist.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:12,代码来源:InputAssistResourceReference.java

示例7: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	dependencies.add(JavaScriptHeaderItem.forReference(new JQueryUIResourceReference()));
	dependencies.add(CssHeaderItem.forReference(
			new BaseDependentCssResourceReference(DragDropResourceReference.class, "dragdrop.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:DragDropResourceReference.java

示例8: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(CssHeaderItem.forReference(new CssResourceReference(
			SelectionPopoverResourceReference.class, "jquery.selectionpopover.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:SelectionPopoverResourceReference.java

示例9: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(
			Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(CssHeaderItem.forReference(
			new CssResourceReference(DropzoneResourceReference.class, "dropzone.css")));
	dependencies.add(OnDomReadyHeaderItem.forScript("Dropzone.autoDiscover = false;"));
	
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:12,代码来源:DropzoneResourceReference.java

示例10: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(
			Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(CssHeaderItem.forReference(
			new CssResourceReference(JQueryUIResourceReference.class, "jquery-ui.min.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:10,代码来源:JQueryUIResourceReference.java

示例11: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = super.getDependencies();
	WebjarsJavaScriptResourceReference metaReference = new WebjarsJavaScriptResourceReference("codemirror/current/mode/meta.js");
	String modeBase = StringUtils.substringBeforeLast(RequestCycle.get().urlFor(metaReference, new PageParameters()).toString(), "/");
	dependencies.add(OnDomReadyHeaderItem.forScript("CodeMirror.modeURL = '" + modeBase + "/%N/%N.js';"));		
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:ModeUrlResourceReference.java

示例12: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(
			AtWhoResourceReference.class, "jquery.atwho-caret.js")));
	dependencies.add(CssHeaderItem.forReference(new CssResourceReference(
			AtWhoResourceReference.class, "jquery.atwho.css")));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:11,代码来源:AtWhoResourceReference.java

示例13: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	List<HeaderItem> dependencies = new ArrayList<>();
	dependencies.add(JavaScriptHeaderItem.forReference(
			Application.get().getJavaScriptLibrarySettings().getJQueryReference()));
	dependencies.add(JavaScriptHeaderItem.forReference(new TextareaCaretPositionResourceReference()));
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:AlignResourceReference.java

示例14: getDependencies

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
@Override
public List<HeaderItem> getDependencies() {
	if (dependencies == null) {
		synchronized (this) {
			if (dependencies == null)
				dependencies = super.getDependencies();
		}
	}
	return dependencies;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:11,代码来源:CachedDependenciesConcatResourceBundleReference.java

示例15: getDependencyAware

import org.apache.wicket.markup.head.HeaderItem; //导入依赖的package包/类
private DependencyAware<ResourceReference> getDependencyAware(ResourceReference resource) {
	return new DependencyAware<ResourceReference>() {

		@Override
		public ResourceReference getId() {
			return resource;
		}

		@Override
		public int hashCode() {
			return getId().hashCode();
		}

		@SuppressWarnings("unchecked")
		@Override
		public boolean equals(Object obj) {
			return getId().equals(((DependencyAware<ResourceReference>)obj).getId());
		}

		@Override
		public Set<ResourceReference> getDependencies() {
			Set<ResourceReference> dependencies = new LinkedHashSet<>();
			for (HeaderItem item: resource.getDependencies()) {
				if (item instanceof IReferenceHeaderItem) {
					ResourceReference reference = ((IReferenceHeaderItem) item).getReference();
					if (reference.canBeRegistered()) {
						dependencies.add(reference);
					}
				}
			}
			return dependencies;
		}
		
	};
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:36,代码来源:ResourceBundleReferences.java


注:本文中的org.apache.wicket.markup.head.HeaderItem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。