Package com.iizigo.prop
Class PropertyEditorSetup
java.lang.Object
com.iizigo.prop.PropertyEditorSetup
Class holding information in a plug-in of the Property Classes and how to set up their Editors.
- Author:
- Christopher Mindus, Mikael Andersson
- Field SummaryFields
- Constructor SummaryConstructorsConstructorDescription- PropertyEditorSetup- (ResourceBundle resourceBundle) Constructor.- PropertyEditorSetup- (ResourceBundle resourceBundle, ClassLoader classLoader) Constructor.
- Method SummaryModifier and TypeMethodDescription- void- assignBundleContext- (org.osgi.framework.BundleContext bundleContext) Assigns the bundle.- booleanChecks if two instances are "multi-edit-equals", i.e.- Class<?>Loads a class using the appropriate class loader.Gets the bundle symbolic name.Gets a default value for a property.- String[]- getEditOptions- (String name) Gets a String for the IEditProperty for a property.Gets the name mapping from a class to another, e.g.- getEditProperties- (PropCnr pc, boolean logError) Gets the name mapping from a class to another, e.g.- getEditProperties- (PropCnr pc, boolean logError, Throwable prev) Gets the name mapping from a class to another, e.g.- IEditedPropertyEntry<?,- ?> - getEditProperty- (String name) Gets an IEditProperty for a property.Gets the group for a property name.- getGroupFormatter- (String group) Gets an group formatter for a group.- getGroupInfo- (String group) Gets the group information to use.- getGroupTextPrompt- (String group) Get a group text prompt.- getGroupToolTipText- (String group) Get a group tooltip text.- getParentProperty- (String name) Gets parent property name.- boolean- getPrivate- (String name) Gets the text prompt for a property name.- getPropertyClass- (String name) Gets the class for the property.Gets the localized string from a resource bundle.- getTextPrompt- (String name) Gets the text prompt for a property name.- getToolTipText- (String name) Gets the tooltip text for a property name.- getValidator- (String name) Gets an entry/property validator.- boolean- hasAtLeastOnePropertyInGroup- (PropertyEditorInfo[] infos, String[] names) Helper to check for at least one property in group.- boolean- hasNonEmptyString- (String key) Checks if string is present.- verifyPropertiesPresentInGroup- (PropertyEditorInfo[] infos, String[] names) Helper to verify properties are present for a group.
- Field Details- classLoaderGet the resource bundle.
 
- Constructor Details- PropertyEditorSetupConstructor.- Parameters:
- resourceBundle- Resource bundle.
 
- PropertyEditorSetupConstructor.- Parameters:
- resourceBundle- Resource bundle.
- classLoader- The class loader or null for default.
 
 
- Method Details- assignBundleContextpublic void assignBundleContext- (org.osgi.framework.BundleContext bundleContext) Assigns the bundle.- Parameters:
- bundleContext- The bundle context.
 
- getBundleSymbolicNameGets the bundle symbolic name.- Returns:
- The symbolic name of the bundle.
 
- forNameLoads a class using the appropriate class loader.- Parameters:
- cn- The class name to load.
- Throws:
- ClassNotFoundException- For class loader errors.
 
- getStringGets the localized string from a resource bundle.- Parameters:
- key- The key for the localized message.
- Returns:
- The string matching a key, or "?<i>key</i>?"if not found.
 
- hasNonEmptyStringChecks if string is present.- Parameters:
- key- The key to verify.
- Returns:
- true if the key is present and is has a non-empty value String.
 
- getPrivateGets the text prompt for a property name.- Parameters:
- name- The property name.
- Returns:
- true If the key <i>name</i>.privateequals to (String) "true".
 
- getTextPromptGets the text prompt for a property name.- Parameters:
- name- The property name.
- Returns:
- The text prompt for the key, or "?<i>name</i>.p?"if not found.
 
- getToolTipTextGets the tooltip text for a property name.- Parameters:
- name- The property name.
- Returns:
- The text prompt for the key, or "?<i>name</i>.t?"if not found.
 
- getGroupGets the group for a property name.- Parameters:
- name- The property name.
- Returns:
- The text prompt for the key, or "?<i>name</i>.g?"if not found.
 
- getGroupTextPromptGet a group text prompt.- Parameters:
- group- The group name.
- Returns:
- The group text prompt for the key, or "?_<i>group</i>.g?"if not found.
 
- getGroupToolTipTextGet a group tooltip text.- Parameters:
- group- The group name.
- Returns:
- The group tooltip text for the key, or "?_<i>group</i>.t?"if not found.
 
- getGroupInfoGets the group information to use.- Parameters:
- group- The group name.
- Returns:
- The PropertyEditorGroupInfo instance, or nullif not found.
 
- getPropertyClassGets the class for the property. An InternalError is thrown in case the class is not found.- Parameters:
- name- The property class name to find.
- Returns:
- The class, or nullif thenameends with "$" or starts with '%'.
- Throws:
- InternalError- If the class is not found.
 
- getParentPropertyGets parent property name.- Parameters:
- name- The name of the property.
- Returns:
- null if not specified.
 
- getEditPropertyGets an IEditProperty for a property. An InternalError is thrown if the instance cannot be created.- Parameters:
- name- The name of the property.
- Returns:
- The IEditedPropertyEntry interface.
- Throws:
- InternalError- If IEditedPropertyEntry interface is not found.
 
- getDefaultPropertyValueGets a default value for a property.- Parameters:
- name- The name of the property.
- Returns:
- The description string of the name property, or empty string if not found.
 
- getEditOptionsGets a String for the IEditProperty for a property.- Parameters:
- name- The name of the property.
- Returns:
- null for none.
 
- getGroupFormatterGets an group formatter for a group. If no group formatter is defined, null is returned.- Parameters:
- group- The group name of the property.
- Throws:
- InternalError- If the instance cannot be created.
 
- verifyPropertiesPresentInGroupHelper to verify properties are present for a group.- Parameters:
- infos- The array of edit's for the property.
- names- The names to verify.
- Returns:
- null for no error, otherwise the missing name(s) (comma separated preceeded with "missing property name:").
 
- hasAtLeastOnePropertyInGroupHelper to check for at least one property in group.- Parameters:
- infos- The array of edit's for the property.
- names- The names to verify.
- Returns:
- null for no error, otherwise the missing name(s) (comma separated preceeded with "missing property name:").
 
- getEditPropertiesGets the name mapping from a class to another, e.g. UILabel to EUILabel (in different packages). The method throws an InternalError in case of error.- Parameters:
- pc- The instance of the class.
- Returns:
- The edit properties for the property container.
 
- getEditPropertiesGets the name mapping from a class to another, e.g. UILabel to EUILabel (in different packages). The method throws an InternalError in case of error.- Parameters:
- pc- The instance of the class.
- Returns:
- The edit properties for the property container.
 
- getEditPropertiesGets the name mapping from a class to another, e.g. UILabel to EUILabel (in different packages). The method throws an InternalError in case of error.- Parameters:
- pc- The instance of the class.
- logError- Flag to log the error.
- prev- Previous exception thrown.
- Returns:
- The edit properties for the property container.
 
- getValidatorGets an entry/property validator. If no group formatter is defined, null is returned.- Parameters:
- name- The validator name.
- Returns:
- The validator, or nullfor none.
- Throws:
- InternalError- If the instance cannot be created.
 
- equalsMultiEditChecks if two instances are "multi-edit-equals", i.e. same definition name in the same bundle.- Parameters:
- setup- Another setup to verify.
- Returns:
- The equality flag.