001package csheets.ext.simple; 002 003import csheets.ext.Extension; 004import csheets.ext.simple.ui.UIExtensionExample; 005import csheets.ui.ctrl.UIController; 006import csheets.ui.ext.UIExtension; 007 008/** 009 * A simple extension just to show how the extension mechanism works. 010 * An extension must extend the Extension abstract class. 011 * The class that implements the Extension is the "bootstrap" of the extension. 012 * @see Extension 013 * @author Alexandre Braganca 014 */ 015public class ExtensionExample extends Extension { 016 017 /** The name of the extension */ 018 public static final String NAME = "Example"; 019 020 /** 021 * Creates a new Example extension. 022 */ 023 public ExtensionExample() { 024 super(NAME); 025 } 026 027 /** 028 * Returns the user interface extension of this extension (an instance of the class {@link csheets.ext.simple.ui.UIExtensionExample}). <br/> 029 * In this extension example we are only extending the user interface. 030 * @param uiController the user interface controller 031 * @return a user interface extension, or null if none is provided 032 */ 033 public UIExtension getUIExtension(UIController uiController) { 034 return new UIExtensionExample(this, uiController); 035 } 036}