| java.lang.Object org.netbeans.modules.form.ResourceSupport
ResourceSupport | public class ResourceSupport (Code) | | This class manages resources of a form (i.e. property values stored
externally as resources). It communicates with the app framework support
via the ResourceService interface. It also takes care of the automatic
internationalization backed by the i18n/form module.
author: Tomas Pavek |
Method Summary | |
public static void | componentRenamed(RADComponent metacomp, String oldName, String newName) Reacts on component's variable renaming. | Node.Property[] | createFormProperties() | public static ResourcePanel | createResourcePanel(FormProperty property, boolean force) | public static ResourceValue | findResource(String key, FormProperty property) | public static ResourceValue | findResource(FormModel formModel, String key, Class valueType) | public static void | formMoved(FormModel formModel, FileObject oldFolder) | public static void | formRenamed(FormModel formModel, String oldName) | static String | getDefaultKey(FormProperty prop, int type) | String | getDesignLocale() | public static List<URL> | getFilesForContentChangeBackup(FormModel formModel) | public static List<URL> | getFilesForFormMoveBackup(FormModel formModel, FileObject oldFolder) Parameters: formModel - Parameters: oldFolder - Resource files to be affected by moving the form. | public static List<URL> | getFilesForFormRenameBackup(FormModel formModel) | public static String | getInjectionCode(RADComponent metacomp, String compGenName) | static String[] | getPropertyAttrNames() | void | init() | public boolean | isDefaultInternationalizableProject() | public static boolean | isExcludedProperty(FormProperty prop) Returns whether the given property is excluded from automatic resourcing,
i.e. | public static boolean | isInjectedProperty(FormProperty prop) | public static boolean | isPropertyForResourcing(FormProperty prop) | public static boolean | isResourceableProperty(FormProperty prop) true if the property is capable of holding resource values (i.e. | public static void | loadInjectedResources(RADComponent metacomp) | public static Object | makeResource(Object value, FormProperty property) Converts given value to a resource. | void | prepareNewForm() Prepares a newly created form. | public boolean | projectUsesResources() | public boolean | projectWantsUseResources() | public static void | setExcludedProperty(FormProperty prop, boolean excl) | public static void | switchComponentToResources(RADComponent metacomp) Changes all component's modified properties to resources or i18n. | public static void | updateStoredValue(Object oldValue, Object newValue, FormProperty property) Reacts on a change in a resourced/internationalized property value.
Makes sure that added/changed/removed value is updated in the properties
file. |
AUTO_I18N | final static int AUTO_I18N(Code) | | |
AUTO_INJECTION | final static int AUTO_INJECTION(Code) | | |
AUTO_OFF | final static int AUTO_OFF(Code) | | |
AUTO_RESOURCING | final static int AUTO_RESOURCING(Code) | | |
PROP_AUTO_RESOURCING | final static String PROP_AUTO_RESOURCING(Code) | | |
PROP_AUTO_SET_COMPONENT_NAME | final static String PROP_AUTO_SET_COMPONENT_NAME(Code) | | |
componentRenamed | public static void componentRenamed(RADComponent metacomp, String oldName, String newName)(Code) | | Reacts on component's variable renaming. All automatically created keys
that use the name of the component will be changed to the new name.
Also the 'name' property of visual components is updated.
|
createFormProperties | Node.Property[] createFormProperties()(Code) | | |
formMoved | public static void formMoved(FormModel formModel, FileObject oldFolder)(Code) | | |
getFilesForContentChangeBackup | public static List<URL> getFilesForContentChangeBackup(FormModel formModel)(Code) | | Parameters: formModel - Resource files to be affected by a change inside the form (e.g.by renaming a component). |
getFilesForFormMoveBackup | public static List<URL> getFilesForFormMoveBackup(FormModel formModel, FileObject oldFolder)(Code) | | Parameters: formModel - Parameters: oldFolder - Resource files to be affected by moving the form. URL of annon-existing file indicates the file will be created. |
getFilesForFormRenameBackup | public static List<URL> getFilesForFormRenameBackup(FormModel formModel)(Code) | | Parameters: formModel - Resource files to be affected by renaming a form class. |
getPropertyAttrNames | static String[] getPropertyAttrNames()(Code) | | |
isDefaultInternationalizableProject | public boolean isDefaultInternationalizableProject()(Code) | | |
isExcludedProperty | public static boolean isExcludedProperty(FormProperty prop)(Code) | | Returns whether the given property is excluded from automatic resourcing,
i.e. marked as it should intentionally hold a plain value. This can
happen when the user explicitly chooses not to use resource for given
property value, or there can be properties excluded by default
(e.g. 'name' property of components).
NOTE: This method is usaful only for properties that can be resourced,
it should not be called for properties that can't hold resource values.
See Also: isResourceableProperty true if the property is marked as excluded from automaticresourcing (i.e. is expected to hold a plain value) |
isPropertyForResourcing | public static boolean isPropertyForResourcing(FormProperty prop)(Code) | | true if the property should be resourced if there is a chance to |
isResourceableProperty | public static boolean isResourceableProperty(FormProperty prop)(Code) | | true if the property is capable of holding resource values (i.e. FormDesignValue) |
loadInjectedResources | public static void loadInjectedResources(RADComponent metacomp)(Code) | | |
makeResource | public static Object makeResource(Object value, FormProperty property)(Code) | | Converts given value to a resource. Called always when a component
property is being set.
This method is not called during undo/redo.
Parameters: value - new value being set to the property (can be FormProperty.ValueWithEditor) Parameters: property - the property to which the value is going to be set (stillcontains the previous value) |
prepareNewForm | void prepareNewForm()(Code) | | Prepares a newly created form.
|
projectUsesResources | public boolean projectUsesResources()(Code) | | |
projectWantsUseResources | public boolean projectWantsUseResources()(Code) | | |
setExcludedProperty | public static void setExcludedProperty(FormProperty prop, boolean excl)(Code) | | |
switchComponentToResources | public static void switchComponentToResources(RADComponent metacomp)(Code) | | Changes all component's modified properties to resources or i18n. Called
when a copy of a component is created.
This method is not called during undo/redo.
|
updateStoredValue | public static void updateStoredValue(Object oldValue, Object newValue, FormProperty property)(Code) | | Reacts on a change in a resourced/internationalized property value.
Makes sure that added/changed/removed value is updated in the properties
file. (This method is called only for component properties,
so it must scan the value for nested properties.)
|
|
|