All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.itcb.common.web.vaadin.page.config.ContextHolder Maven / Gradle / Ivy

Go to download

This module is the common portlet module. It defines the base on which the developements can be done by extending view, edit or help mode.

The newest version!
package net.sf.itcb.common.web.vaadin.page.config;

import org.springframework.oxm.jaxb.Jaxb2Marshaller;

import com.vaadin.ui.Button;
import com.vaadin.ui.Component;

import net.sf.itcb.common.web.vaadin.component.impl.ContextAnalyserPanel;

public class ContextHolder {

	public Jaxb2Marshaller marshaller;
	
	Object navigationContext;
	
	public void setJaxb2Marshaller(Jaxb2Marshaller marshaller) {
		this.marshaller=marshaller;
	}
	
	/**
	 * This function returns the navigation context
	 * @return
	 */
	public Object getNavigationContext() {
		return navigationContext;
	}
	
	/**
	 * This function returns the navigation context
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public  T getNavigationContext(Class returnClass) {
		return (T)navigationContext;
	}
	
	/**
	 * This function returns the navigation context
	 * @return
	 */
	public void setNavigationContext(Object navigationContext) {
		this.navigationContext = navigationContext;
	}
	
	
	public ContextAnalyserPanel getContextAnalyserPanel() {
		return new ContextAnalyserPanel(marshaller, this);
	}
	
	public ContextAnalyserPanel getContextAnalyserPanel(final Button.ClickListener specificListener) {
		return new ContextAnalyserPanel(marshaller, this, null, specificListener);
	}
	
	public ContextAnalyserPanel getContextAnalyserPanel(final Component specificComponentToAdd, final Button.ClickListener specificListener) {
		return new ContextAnalyserPanel(marshaller, this, specificComponentToAdd, specificListener);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy