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

org.metawidget.widgetprocessor.iface.AdvancedWidgetProcessor Maven / Gradle / Ivy

There is a newer version: 4.2
Show newest version
// Metawidget
//
// This file is dual licensed under both the LGPL
// (http://www.gnu.org/licenses/lgpl-2.1.html) and the EPL
// (http://www.eclipse.org/org/documents/epl-v10.php). As a
// recipient of Metawidget, you may choose to receive it under either
// the LGPL or the EPL.
//
// Commercial licenses are also available. See http://metawidget.org
// for details.

package org.metawidget.widgetprocessor.iface;

/**
 * Common interface implemented by all AdvancedWidgetProcessors. AdvancedWidgetProcessors can hook
 * into additional lifecycle events.
 * 

* There are advantages to keeping the vanilla WidgetProcessor interface as a * single-method interface: First, it alleviates the need for a BaseWidgetProcessor or * WidgetProcessorAdapter class (to provide default implementations for subclasses who * don't override all the methods); second, it makes WidgetProcessor an example of the * Strategy pattern; third, it makes WidgetProcessor amenable to automatic function * objects (part of closures in Java 7). This latter point is especially useful when using * WidgetProcessors to attach event handlers. * * @author Richard Kennard */ public interface AdvancedWidgetProcessor extends WidgetProcessor { // // Methods // /** * Event called at the start of the widget building process, before the * WidgetBuilder is called. WidgetProcessors may wish to act on this * event to initialize themselves ready for processing. This event is only called once per * inspection, not once per widget built. * * @param metawidget * the parent Metawidget. Never null */ void onStartBuild( M metawidget ); /** * Event called at the end of widget building, after all widgets have been built and added to * the Layout. WidgetProcessors may wish to act on this event to clean * themselves up after processing. This event is only called once per inspection, not once per * widget built. * * @param metawidget * the parent Metawidget. Never null */ void onEndBuild( M metawidget ); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy