Create a plugin project “BTTExtensionSample” and add related dependency and extension point.
Procedure
1 Draft a widget figure class “com.ibm.btt.extension.sample.CurrencyWidgetFigure” to display the widget layout in XUI editor:
public class CurrencyWidgetFigure extends LabelShape { <SuppressWarnings("unused") private static final java.lang.String COPYRIGHT = "Licensed Materials - Property of IBM "//$NON-NLS-1$ + "Restricted Materials of IBM "//$NON-NLS-1$ + "5724-H82 "//$NON-NLS-1$ + "(C) Copyright IBM Corp. 211 All Rights Reserved. "//$NON-NLS-1$ + "US Government Users Restricted Rights - Use, duplication or disclosure "//$NON-NLS-1$ + "restricted by GSA ADP Schedule Contract with IBM Corp ";//$NON-NLS-1$ /** * Image to be displayed */ private final static Image image =Activator.getImageDescriptor("icons/CurrencyWidgetFigure.PNG").createImage(); public CurrencyWidgetFigure() { getLabel().setIcon(image); } }
2 Draft the widget configuration xml file “CurrencyWidget.xml” in folder “widgets”: