Code Search for Developers
 
 
  

IThinkcapWidget.java from ThinkCap Collaborative Knowledge Portal at Krugle


Show IThinkcapWidget.java syntax highlighted

package org.integratedmodelling.thinkcap.widget;

import org.integratedmodelling.thinkcap.PageSpecs;
import org.integratedmodelling.thinkcap.ThinkcapSession;
import org.integratedmodelling.thinkcap.exceptions.ThinkcapWidgetException;


/**
 * ThinkcapWidgets are installed by plug-ins. The WidgetManager (accessed in templates as $WidgetManager) can 
 * create the widgets in a web page. Widgets are installed by plugins by registering a widget creation function
 * with the WidgetManager.
 * @author Ferdinando Villa
 *
 */
public interface IThinkcapWidget {
	
	/**
	 * This is the return value for the widgetManager function that creates it. The text returned
	 * goes in the HTML header of the templates: it's the place to ask for scripts to be read
	 * and so on. 
	 * @return
	 * @throws ThinkcapWidgetException 
	 */
	public abstract String outputWidget(PageSpecs pageSpecs) throws ThinkcapWidgetException;
		
	/**
	 * Widgets need a name from creation, which must be unique in the page.
	 */
	public abstract String getName();
	
	/*
	 * The current thinkcap session must be accessible from within the widget.
	 */
	public abstract ThinkcapSession getSession();
	
	
	/*
	 * If the widget implies an action, set the target ID in document where the results are
	 * displayed. If this is not called, the action results into a new browser
	 * page being generated. If the widget does not "act" (e.g. a container widget)
	 * just leave this empty.
	 */
	public abstract void setActionTarget(String ID);

	/** trivial */
	public abstract void setWidgetClass(String widgetClassName);

	/** trivial */
	public abstract String getWidgetClass();

}






See more files for this project here

ThinkCap Collaborative Knowledge Portal

A portal to explore and edit the knowledge contained in a set of ontologies in intuitive ways. Presents a Dictionary view (a Google-like interface), a Thesaurus view (a graphical display with simplified relationships) and a full graphical Concept view.

Project homepage: http://sourceforge.net/projects/thinkcap
Programming language(s): Java,JavaScript,XML
License: other

  HtmlLink.java
  IItemDecorator.java
  IThinkcapWidget.java
  IWidgetPublisher.java
  ImageDecorator.java
  PopupMenu.java
  ThinkcapInputWidget.java
  ThinkcapWidgetManager.java