net.officefloor.eclipse.extension.util
Class SourceExtensionUtil

java.lang.Object
  extended by net.officefloor.eclipse.extension.util.SourceExtensionUtil

public class SourceExtensionUtil
extends Object

Utility class providing helper methods for source extension implementations.

Author:
Daniel Sagenschneider

Nested Class Summary
protected static interface SourceExtensionUtil.GenericSourceExtensionContext
          Generic source extension context.
 
Constructor Summary
protected SourceExtensionUtil()
          All access via static methods.
 
Method Summary
static Property createPropertyCheckbox(String label, String name, boolean defaultValue, String trueValue, String falseValue, org.eclipse.swt.widgets.Composite container, ManagedObjectSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyCheckbox(String label, String name, boolean defaultValue, String trueValue, String falseValue, org.eclipse.swt.widgets.Composite container, SectionSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
protected static Property createPropertyCheckbox(String label, String name, boolean defaultValue, String trueValue, String falseValue, org.eclipse.swt.widgets.Composite container, SourceExtensionUtil.GenericSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyCheckbox(String label, String name, boolean defaultValue, String trueValue, String falseValue, org.eclipse.swt.widgets.Composite container, WorkSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyClass(String label, String name, org.eclipse.swt.widgets.Composite container, GovernanceSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyClass(String label, String name, org.eclipse.swt.widgets.Composite container, ManagedObjectSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyClass(String label, String name, org.eclipse.swt.widgets.Composite container, SectionSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
protected static Property createPropertyClass(String label, String name, org.eclipse.swt.widgets.Composite container, SourceExtensionUtil.GenericSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyClass(String label, String name, org.eclipse.swt.widgets.Composite container, WorkSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyCombo(String label, String name, String defaultValue, String[] values, org.eclipse.swt.widgets.Composite container, SectionSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
protected static Property createPropertyCombo(String label, String name, String defaultValue, String[] values, org.eclipse.swt.widgets.Composite container, SourceExtensionUtil.GenericSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static void createPropertyList(String label, org.eclipse.swt.widgets.Composite container, ManagedObjectSourceExtensionContext context, String... hidePropertyNames)
          Creates the display for the input PropertyList.
static void createPropertyList(String label, org.eclipse.swt.widgets.Composite container, SectionSourceExtensionContext context, String... hidePropertyNames)
          Creates the display for the input PropertyList.
protected static void createPropertyList(String label, org.eclipse.swt.widgets.Composite container, SourceExtensionUtil.GenericSourceExtensionContext context, String... hidePropertyNames)
          Creates the display for the input PropertyList.
static void createPropertyList(String label, org.eclipse.swt.widgets.Composite container, WorkSourceExtensionContext context, String... hidePropertyNames)
          Creates the display for the input PropertyList.
static Property createPropertyResource(String label, String name, org.eclipse.swt.widgets.Composite container, ManagedObjectSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
protected static Property createPropertyResource(String label, String name, org.eclipse.swt.widgets.Composite container, SourceExtensionUtil.GenericSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyResource(String label, String name, org.eclipse.swt.widgets.Composite container, WorkSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyText(String label, String name, String defaultValue, org.eclipse.swt.widgets.Composite container, ManagedObjectSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyText(String label, String name, String defaultValue, org.eclipse.swt.widgets.Composite container, SectionSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
protected static Property createPropertyText(String label, String name, String defaultValue, org.eclipse.swt.widgets.Composite container, SourceExtensionUtil.GenericSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static Property createPropertyText(String label, String name, String defaultValue, org.eclipse.swt.widgets.Composite container, WorkSourceExtensionContext context, PropertyValueChangeListener listener)
          Creates the display for the input Property.
static void informNoPropertiesRequired(org.eclipse.swt.widgets.Composite container)
          Creates the display to inform that no Property instances are required.
static void loadPropertyLayout(org.eclipse.swt.widgets.Composite container)
          Loads the property layout for creating property displays.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceExtensionUtil

protected SourceExtensionUtil()
All access via static methods.

Method Detail

loadPropertyLayout

public static void loadPropertyLayout(org.eclipse.swt.widgets.Composite container)
Loads the property layout for creating property displays.

Parameters:
container - Composite to contain the properties.

informNoPropertiesRequired

public static void informNoPropertiesRequired(org.eclipse.swt.widgets.Composite container)
Creates the display to inform that no Property instances are required.

Parameters:
container - Composite to provide display on.

createPropertyClass

public static Property createPropertyClass(String label,
                                           String name,
                                           org.eclipse.swt.widgets.Composite container,
                                           WorkSourceExtensionContext context,
                                           PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
container - Composite to add display Control instances.
context - WorkSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyClass

public static Property createPropertyClass(String label,
                                           String name,
                                           org.eclipse.swt.widgets.Composite container,
                                           ManagedObjectSourceExtensionContext context,
                                           PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
container - Composite to add display Control instances.
context - ManagedObjectSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyClass

public static Property createPropertyClass(String label,
                                           String name,
                                           org.eclipse.swt.widgets.Composite container,
                                           GovernanceSourceExtensionContext context,
                                           PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
container - Composite to add display Control instances.
context - GovernanceSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyClass

public static Property createPropertyClass(String label,
                                           String name,
                                           org.eclipse.swt.widgets.Composite container,
                                           SectionSourceExtensionContext context,
                                           PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
container - Composite to add display Control instances.
context - SectionSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyClass

protected static Property createPropertyClass(String label,
                                              String name,
                                              org.eclipse.swt.widgets.Composite container,
                                              SourceExtensionUtil.GenericSourceExtensionContext context,
                                              PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
container - Composite to add display Control instances.
context - SourceExtensionUtil.GenericSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyResource

public static Property createPropertyResource(String label,
                                              String name,
                                              org.eclipse.swt.widgets.Composite container,
                                              WorkSourceExtensionContext context,
                                              PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
container - Composite to add display Control instances.
context - WorkSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyResource

public static Property createPropertyResource(String label,
                                              String name,
                                              org.eclipse.swt.widgets.Composite container,
                                              ManagedObjectSourceExtensionContext context,
                                              PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
container - Composite to add display Control instances.
context - ManagedObjectSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyResource

protected static Property createPropertyResource(String label,
                                                 String name,
                                                 org.eclipse.swt.widgets.Composite container,
                                                 SourceExtensionUtil.GenericSourceExtensionContext context,
                                                 PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
container - Composite to add display Control instances.
context - SourceExtensionUtil.GenericSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyText

public static Property createPropertyText(String label,
                                          String name,
                                          String defaultValue,
                                          org.eclipse.swt.widgets.Composite container,
                                          ManagedObjectSourceExtensionContext context,
                                          PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
container - Composite to add display Control instances.
context - ManagedObjectSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyText

public static Property createPropertyText(String label,
                                          String name,
                                          String defaultValue,
                                          org.eclipse.swt.widgets.Composite container,
                                          WorkSourceExtensionContext context,
                                          PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
container - Composite to add display Control instances.
context - WorkSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyText

public static Property createPropertyText(String label,
                                          String name,
                                          String defaultValue,
                                          org.eclipse.swt.widgets.Composite container,
                                          SectionSourceExtensionContext context,
                                          PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
container - Composite to add display Control instances.
context - SectionSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyText

protected static Property createPropertyText(String label,
                                             String name,
                                             String defaultValue,
                                             org.eclipse.swt.widgets.Composite container,
                                             SourceExtensionUtil.GenericSourceExtensionContext context,
                                             PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
container - Composite to add display Control instances.
context - SourceExtensionUtil.GenericSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the Text.

createPropertyList

public static void createPropertyList(String label,
                                      org.eclipse.swt.widgets.Composite container,
                                      ManagedObjectSourceExtensionContext context,
                                      String... hidePropertyNames)
Creates the display for the input PropertyList.

Parameters:
label - Label for the Property.
container - Composite to add display Control instances.
context - ManagedObjectSourceExtensionContext.
hidePropertyNames - Property names to hide.

createPropertyList

public static void createPropertyList(String label,
                                      org.eclipse.swt.widgets.Composite container,
                                      WorkSourceExtensionContext context,
                                      String... hidePropertyNames)
Creates the display for the input PropertyList.

Parameters:
label - Label for the Property.
container - Composite to add display Control instances.
context - WorkSourceExtensionContext.
hidePropertyNames - Property names to hide.

createPropertyList

public static void createPropertyList(String label,
                                      org.eclipse.swt.widgets.Composite container,
                                      SectionSourceExtensionContext context,
                                      String... hidePropertyNames)
Creates the display for the input PropertyList.

Parameters:
label - Label for the Property.
container - Composite to add display Control instances.
context - SectionSourceExtensionContext.
hidePropertyNames - Property names to hide.

createPropertyList

protected static void createPropertyList(String label,
                                         org.eclipse.swt.widgets.Composite container,
                                         SourceExtensionUtil.GenericSourceExtensionContext context,
                                         String... hidePropertyNames)
Creates the display for the input PropertyList.

Parameters:
label - Label for the Property.
container - Composite to add display Control instances.
context - SourceExtensionUtil.GenericSourceExtensionContext.
hidePropertyNames - Property names to hide.

createPropertyCheckbox

public static Property createPropertyCheckbox(String label,
                                              String name,
                                              boolean defaultValue,
                                              String trueValue,
                                              String falseValue,
                                              org.eclipse.swt.widgets.Composite container,
                                              ManagedObjectSourceExtensionContext context,
                                              PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
trueValue - Value should Property be checked.
falseValue - Value should Property be unchecked.
container - Composite to add display Control instances.
context - ManagedObjectSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the SWT.CHECK Button.

createPropertyCheckbox

public static Property createPropertyCheckbox(String label,
                                              String name,
                                              boolean defaultValue,
                                              String trueValue,
                                              String falseValue,
                                              org.eclipse.swt.widgets.Composite container,
                                              WorkSourceExtensionContext context,
                                              PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
trueValue - Value should Property be checked.
falseValue - Value should Property be unchecked.
container - Composite to add display Control instances.
context - WorkSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the SWT.CHECK Button.

createPropertyCheckbox

public static Property createPropertyCheckbox(String label,
                                              String name,
                                              boolean defaultValue,
                                              String trueValue,
                                              String falseValue,
                                              org.eclipse.swt.widgets.Composite container,
                                              SectionSourceExtensionContext context,
                                              PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
trueValue - Value should Property be checked.
falseValue - Value should Property be unchecked.
container - Composite to add display Control instances.
context - SectionSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the SWT.CHECK Button.

createPropertyCheckbox

protected static Property createPropertyCheckbox(String label,
                                                 String name,
                                                 boolean defaultValue,
                                                 String trueValue,
                                                 String falseValue,
                                                 org.eclipse.swt.widgets.Composite container,
                                                 SourceExtensionUtil.GenericSourceExtensionContext context,
                                                 PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
trueValue - Value should Property be checked.
falseValue - Value should Property be unchecked.
container - Composite to add display Control instances.
context - SourceExtensionUtil.GenericSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the SWT.CHECK Button.

createPropertyCombo

public static Property createPropertyCombo(String label,
                                           String name,
                                           String defaultValue,
                                           String[] values,
                                           org.eclipse.swt.widgets.Composite container,
                                           SectionSourceExtensionContext context,
                                           PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
values - Values to list in the Combo.
container - Composite to add display Control instances.
context - SectionSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the SWT.CHECK Button.

createPropertyCombo

protected static Property createPropertyCombo(String label,
                                              String name,
                                              String defaultValue,
                                              String[] values,
                                              org.eclipse.swt.widgets.Composite container,
                                              SourceExtensionUtil.GenericSourceExtensionContext context,
                                              PropertyValueChangeListener listener)
Creates the display for the input Property.

Parameters:
label - Label for the Property.
name - Name of the Property.
defaultValue - Default value for the Property.
values - Values to list in the Combo.
container - Composite to add display Control instances.
context - SourceExtensionUtil.GenericSourceExtensionContext.
listener - PropertyValueChangeListener. May be null.
Returns:
Property for the SWT.CHECK Button.


Copyright © 2005-2013. All Rights Reserved.