WebObjects 5.4.2

com.webobjects.eoapplication
Class EOXMLUnarchiver

java.lang.Object
  extended by com.webobjects.eoapplication.EOXMLUnarchiver

public class EOXMLUnarchiver
extends Object

EOXMLUnarchivers are used to unarchive objects (controllers and actions) from an XML description. Instances of EOXMLUnarchiver are passed to constructors of the objects to unarchive and can be used to retrieve the XML arguments.


Field Summary
static String ActionKeyParameter
           
static String ActionNameParameter
           
static String ActionPriorityParameter
           
static String ActionWidgetPositionParameter
           
static String AdditionalActionsParameter
           
static String AlignmentParameter
           
static String AlignsComponentsParameter
           
static String AllowsDiscontiguousSelectionParameter
           
static String AllowsDuplicatesParameter
           
static String AllowsMultipleSelectionParameter
           
static String AllowsOneTouchExpandableParameter
           
static String AllowsRemoveAllParameter
           
static String AllowsSnapToZeroParameter
           
static String ArchiveNameParameter
           
static String AvailableTitlesKeyParameter
           
static String BorderTypeParameter
           
static String ButtonPositionParameter
           
static String CategoryNameParameter
           
static String CategoryPriorityParameter
           
static String ChildrenKeyParameter
           
static String ClassNameParameter
           
static String ColorParameter
           
static String DescriptionPathParameter
           
static String DetailKeysParameter
           
static String DetailRelationshipPathParameter
           
static String DisabledActionNamesParameter
           
static String DisplayGroupProviderMethodNameParameter
           
static String DisplayPatternParameter
           
static String DisplaysLabelInWidgetParameter
           
static String DisposeIfDeactivatedParameter
           
static String EditabilityParameter
           
static String EditingContextProviderMethodNameParameter
           
static String EnabledDisplayGroupProviderMethodNameParameter
           
static String EnabledKeyParameter
           
static String EntityParameter
           
static String ExpandedIconKeyParameter
           
static String FetchesOnConnectEnabledParameter
           
static String FontParameter
           
static String FormatAllowedParameter
           
static String FormatClassParameter
           
static String FormatPatternParameter
           
static String HighlightParameter
           
static String HorizontalBorderParameter
           
static String HorizontallyResizableParameter
           
static String IconKeyParameter
           
static String IconNameParameter
           
static String IconURLParameter
           
static String ImageScalingParameter
           
static String IndexKeyParameter
           
static String InsetsParameter
           
static String InvokesDefaultActionParameter
           
static String IsLeafKeyParameter
           
static String IsQueryWidgetParameter
           
static String IsRootVisibleParameter
           
static String KeyValuePairsParameter
           
static String LabelAlignmentParameter
           
static String LabelComponentPositionParameter
           
static String LabelComponentWidthParameter
           
static String LabelParameter
           
static String MandatoryRelationshipPathsParameter
           
static String MaximumValueKeyParameter
           
static String MenuAcceleratorParameter
           
static String MinimumHeightParameter
           
static String MinimumValueKeyParameter
           
static String MinimumWidgetHeightParameter
           
static String MinimumWidgetWidthParameter
           
static String MinimumWidthParameter
           
static String MultipleWindowsAvailableParameter
           
static String ParentKeyParameter
           
static String PrefersContinuousChangeNotificationParameter
           
static String PrefersIconOnlyParameter
           
static String QuickTimeCanvasResizingParameter
           
static String RelationshipPathParameter
           
static String ResetTitlesObjectsOnEveryConnectParameter
           
static String ResizeWeightParameter
           
static String RootKeyParameter
           
static String RunsConfirmDialogForEmptyQualifiers
           
static String ScalingHintsParameter
           
static String SearchesTitlesObjectsInEditingContextParameter
           
static String SendsActionToAllControllersParameter
           
static String SharedIdentifierParameter
           
static String ShortDescriptionParameter
           
static String SmallIconNameParameter
           
static String SmallIconURLParameter
           
static String SortsByColumnOrderParameter
           
static String SuppressesAssociationParameter
           
static String TaskParameter
           
static String TitleKeysParameter
           
static String TitlePositionParameter
           
static String TitlesDisplayGroupProviderMethodNameParameter
           
static String TitlesEntityParameter
           
static String ToolTipParameter
           
static String TransientParameter
           
static String TypeNameParameter
           
static String URLKeyParameter
           
static String UsesActionParameter
           
static String UsesButtonParameter
           
static String UsesContinuousLayoutParameter
           
static String UsesHorizontalLayoutParameter
           
static String UsesLabelComponentParameter
           
static String UsesLargeButtonRepresentationParameter
           
static String UsesPasswordFieldParameter
           
static String UsesTableLabelsParameter
           
static String UsesTitledBorderParameter
           
static String UsesUserDefaultsWindowLocationParameter
           
static String UsesUserDefaultsWindowSizeParameter
           
static String ValueKeyParameter
           
static String VerticalBorderParameter
           
static String VerticallyResizableParameter
           
static String WindowPositionParameter
           
 
Constructor Summary
EOXMLUnarchiver(NSDictionary values)
          Creates a new EOXMLUnarchiver.
 
Method Summary
 int decodeAlignmentForKey(String key)
          Returns an alignment (JTextField.LEFT, JTextField.CENTER, or JTextField.RIGHT) for the key XML attribute.
 int decodeAlignmentForKey(String key, int defaultValueIfNotAvailable)
          Returns an alignment (JTextField.LEFT, JTextField.CENTER, or JTextField.RIGHT) for the key XML attribute.
 NSArray decodeArrayForKey(String key)
          Returns an NSArray specified as child in the XML with the name key or null if key is not specified in the XML.
 NSArray decodeArrayForKey(String key, NSArray defaultValueIfNotAvailable)
          Returns an NSArray specified as child in the XML with the name key or defaultValueIfNotAvailable if key is not specified in the XML.
 boolean decodeBooleanForKey(String key)
          Returns a boolean for the key XML attribute.
 boolean decodeBooleanForKey(String key, boolean defaultValueIfNotAvailable)
          Returns a boolean for the key XML attribute.
 NSArray decodeChildren()
          Returns an array containing the objects decoded as the receiver's children.
 Class decodeClassForKey(String key)
          Returns a Class specified by name as the XML attribute key or null if key is not specified in the XML.
 Class decodeClassForKey(String key, Class defaultValueIfNotAvailable)
          Returns a Class specified by name as the XML attribute key or defaultValueIfNotAvailable if key is not specified in the XML.
 Color decodeColorForKey(String key)
          Returns a Color for the key XML attribute.
 Color decodeColorForKey(String key, Color defaultValueIfNotAvailable)
          Returns a Color for the key XML attribute.
 NSDictionary decodeDictionaryForKey(String key)
          Returns an NSDictionary specified as child in the XML with the name key or null if key is not specified in the XML.
 NSDictionary decodeDictionaryForKey(String key, NSDictionary defaultValueIfNotAvailable)
          Returns an NSDictionary specified as child in the XML with the name key or defaultValueIfNotAvailable if key is not specified in the XML.
 double decodeDoubleForKey(String key)
          Returns a double for the key XML attribute.
 double decodeDoubleForKey(String key, double defaultValueIfNotAvailable)
          Returns an integer for the key XML attribute.
 int decodeEditabilityForKey(String key)
          Returns a editability specification (EOEditable.IfSupercontrollerEditable, EOEditable.AlwaysEditable, or EOEditable.NeverEditable) for the key XML attribute.
 int decodeEditabilityForKey(String key, int defaultValueIfNotAvailable)
          Returns a editability specification (EOEditable.IfSupercontrollerEditable, EOEditable.AlwaysEditable, or EOEditable.NeverEditable) for the key XML attribute.
 Font decodeFontForKey(String key)
          Returns a Font for the key XML attribute.
 Font decodeFontForKey(String key, Font defaultValueIfNotAvailable)
          Returns a Font for the key XML attribute.
 Insets decodeInsetsForKey(String key)
           
 Insets decodeInsetsForKey(String key, Insets defaultValueIfNotAvailable)
           
 int decodeIntForKey(String key)
          Returns an integer for the key XML attribute.
 int decodeIntForKey(String key, int defaultValueIfNotAvailable)
          Returns an integer for the key XML attribute.
 int decodePositionForKey(String key)
          Returns a position (EOComponentController.Top, EOComponentController.Bottom, EOComponentController.Left, EOComponentController.Right, EOComponentController.TopLeft, EOComponentController.TopRight, EOComponentController.BottomLeft, or EOComponentController.BottomRight) for the key XML attribute.
 int decodePositionForKey(String key, int defaultValueIfNotAvailable)
          Returns a position (EOComponentController.Top, EOComponentController.Bottom, EOComponentController.Left, EOComponentController.Right, EOComponentController.TopLeft, EOComponentController.TopRight, EOComponentController.BottomLeft, or EOComponentController.BottomRight) for the key XML attribute.
static Object decodeRootObject(NSDictionary rootObjectValues)
          Decodes the top object in an XML description, which is represented by an NSDictionary.
 String decodeStringForKey(String key)
          Returns a String for the key XML attribute.
 String decodeStringForKey(String key, String defaultValueIfNotAvailable)
          Returns a String for the key XML attribute.
 Object decodeValueForKey(String key)
          Returns an Object for the key XML attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ClassNameParameter

public static final String ClassNameParameter
See Also:
Constant Field Values

TypeNameParameter

public static final String TypeNameParameter
See Also:
Constant Field Values

KeyValuePairsParameter

public static final String KeyValuePairsParameter
See Also:
Constant Field Values

ArchiveNameParameter

public static final String ArchiveNameParameter
See Also:
Constant Field Values

SharedIdentifierParameter

public static final String SharedIdentifierParameter
See Also:
Constant Field Values

EntityParameter

public static final String EntityParameter
See Also:
Constant Field Values

TitlesEntityParameter

public static final String TitlesEntityParameter
See Also:
Constant Field Values

EnabledKeyParameter

public static final String EnabledKeyParameter
See Also:
Constant Field Values

ValueKeyParameter

public static final String ValueKeyParameter
See Also:
Constant Field Values

MinimumValueKeyParameter

public static final String MinimumValueKeyParameter
See Also:
Constant Field Values

MaximumValueKeyParameter

public static final String MaximumValueKeyParameter
See Also:
Constant Field Values

ActionKeyParameter

public static final String ActionKeyParameter
See Also:
Constant Field Values

URLKeyParameter

public static final String URLKeyParameter
See Also:
Constant Field Values

TitleKeysParameter

public static final String TitleKeysParameter
See Also:
Constant Field Values

DetailKeysParameter

public static final String DetailKeysParameter
See Also:
Constant Field Values

DetailRelationshipPathParameter

public static final String DetailRelationshipPathParameter
See Also:
Constant Field Values

ChildrenKeyParameter

public static final String ChildrenKeyParameter
See Also:
Constant Field Values

IsLeafKeyParameter

public static final String IsLeafKeyParameter
See Also:
Constant Field Values

RootKeyParameter

public static final String RootKeyParameter
See Also:
Constant Field Values

IconKeyParameter

public static final String IconKeyParameter
See Also:
Constant Field Values

ExpandedIconKeyParameter

public static final String ExpandedIconKeyParameter
See Also:
Constant Field Values

ParentKeyParameter

public static final String ParentKeyParameter
See Also:
Constant Field Values

IndexKeyParameter

public static final String IndexKeyParameter
See Also:
Constant Field Values

AvailableTitlesKeyParameter

public static final String AvailableTitlesKeyParameter
See Also:
Constant Field Values

RelationshipPathParameter

public static final String RelationshipPathParameter
See Also:
Constant Field Values

MandatoryRelationshipPathsParameter

public static final String MandatoryRelationshipPathsParameter
See Also:
Constant Field Values

SuppressesAssociationParameter

public static final String SuppressesAssociationParameter
See Also:
Constant Field Values

PrefersContinuousChangeNotificationParameter

public static final String PrefersContinuousChangeNotificationParameter
See Also:
Constant Field Values

EditingContextProviderMethodNameParameter

public static final String EditingContextProviderMethodNameParameter
See Also:
Constant Field Values

DisplayGroupProviderMethodNameParameter

public static final String DisplayGroupProviderMethodNameParameter
See Also:
Constant Field Values

EnabledDisplayGroupProviderMethodNameParameter

public static final String EnabledDisplayGroupProviderMethodNameParameter
See Also:
Constant Field Values

TitlesDisplayGroupProviderMethodNameParameter

public static final String TitlesDisplayGroupProviderMethodNameParameter
See Also:
Constant Field Values

FetchesOnConnectEnabledParameter

public static final String FetchesOnConnectEnabledParameter
See Also:
Constant Field Values

SearchesTitlesObjectsInEditingContextParameter

public static final String SearchesTitlesObjectsInEditingContextParameter
See Also:
Constant Field Values

ResetTitlesObjectsOnEveryConnectParameter

public static final String ResetTitlesObjectsOnEveryConnectParameter
See Also:
Constant Field Values

IsQueryWidgetParameter

public static final String IsQueryWidgetParameter
See Also:
Constant Field Values

EditabilityParameter

public static final String EditabilityParameter
See Also:
Constant Field Values

AllowsMultipleSelectionParameter

public static final String AllowsMultipleSelectionParameter
See Also:
Constant Field Values

AllowsDiscontiguousSelectionParameter

public static final String AllowsDiscontiguousSelectionParameter
See Also:
Constant Field Values

AllowsRemoveAllParameter

public static final String AllowsRemoveAllParameter
See Also:
Constant Field Values

AllowsDuplicatesParameter

public static final String AllowsDuplicatesParameter
See Also:
Constant Field Values

IsRootVisibleParameter

public static final String IsRootVisibleParameter
See Also:
Constant Field Values

AllowsOneTouchExpandableParameter

public static final String AllowsOneTouchExpandableParameter
See Also:
Constant Field Values

AllowsSnapToZeroParameter

public static final String AllowsSnapToZeroParameter
See Also:
Constant Field Values

SortsByColumnOrderParameter

public static final String SortsByColumnOrderParameter
See Also:
Constant Field Values

RunsConfirmDialogForEmptyQualifiers

public static final String RunsConfirmDialogForEmptyQualifiers
See Also:
Constant Field Values

AlignsComponentsParameter

public static final String AlignsComponentsParameter
See Also:
Constant Field Values

MinimumWidthParameter

public static final String MinimumWidthParameter
See Also:
Constant Field Values

MinimumHeightParameter

public static final String MinimumHeightParameter
See Also:
Constant Field Values

MinimumWidgetWidthParameter

public static final String MinimumWidgetWidthParameter
See Also:
Constant Field Values

MinimumWidgetHeightParameter

public static final String MinimumWidgetHeightParameter
See Also:
Constant Field Values

LabelComponentWidthParameter

public static final String LabelComponentWidthParameter
See Also:
Constant Field Values

FormatAllowedParameter

public static final String FormatAllowedParameter
See Also:
Constant Field Values

FormatClassParameter

public static final String FormatClassParameter
See Also:
Constant Field Values

FormatPatternParameter

public static final String FormatPatternParameter
See Also:
Constant Field Values

DisplayPatternParameter

public static final String DisplayPatternParameter
See Also:
Constant Field Values

BorderTypeParameter

public static final String BorderTypeParameter
See Also:
Constant Field Values

HorizontalBorderParameter

public static final String HorizontalBorderParameter
See Also:
Constant Field Values

VerticalBorderParameter

public static final String VerticalBorderParameter
See Also:
Constant Field Values

HorizontallyResizableParameter

public static final String HorizontallyResizableParameter
See Also:
Constant Field Values

VerticallyResizableParameter

public static final String VerticallyResizableParameter
See Also:
Constant Field Values

AlignmentParameter

public static final String AlignmentParameter
See Also:
Constant Field Values

LabelAlignmentParameter

public static final String LabelAlignmentParameter
See Also:
Constant Field Values

ImageScalingParameter

public static final String ImageScalingParameter
See Also:
Constant Field Values

ScalingHintsParameter

public static final String ScalingHintsParameter
See Also:
Constant Field Values

QuickTimeCanvasResizingParameter

public static final String QuickTimeCanvasResizingParameter
See Also:
Constant Field Values

WindowPositionParameter

public static final String WindowPositionParameter
See Also:
Constant Field Values

TitlePositionParameter

public static final String TitlePositionParameter
See Also:
Constant Field Values

ActionWidgetPositionParameter

public static final String ActionWidgetPositionParameter
See Also:
Constant Field Values

ButtonPositionParameter

public static final String ButtonPositionParameter
See Also:
Constant Field Values

LabelComponentPositionParameter

public static final String LabelComponentPositionParameter
See Also:
Constant Field Values

UsesHorizontalLayoutParameter

public static final String UsesHorizontalLayoutParameter
See Also:
Constant Field Values

UsesContinuousLayoutParameter

public static final String UsesContinuousLayoutParameter
See Also:
Constant Field Values

ResizeWeightParameter

public static final String ResizeWeightParameter
See Also:
Constant Field Values

PrefersIconOnlyParameter

public static final String PrefersIconOnlyParameter
See Also:
Constant Field Values

UsesLargeButtonRepresentationParameter

public static final String UsesLargeButtonRepresentationParameter
See Also:
Constant Field Values

UsesTitledBorderParameter

public static final String UsesTitledBorderParameter
See Also:
Constant Field Values

UsesLabelComponentParameter

public static final String UsesLabelComponentParameter
See Also:
Constant Field Values

UsesPasswordFieldParameter

public static final String UsesPasswordFieldParameter
See Also:
Constant Field Values

UsesTableLabelsParameter

public static final String UsesTableLabelsParameter
See Also:
Constant Field Values

UsesActionParameter

public static final String UsesActionParameter
See Also:
Constant Field Values

UsesButtonParameter

public static final String UsesButtonParameter
See Also:
Constant Field Values

UsesUserDefaultsWindowSizeParameter

public static final String UsesUserDefaultsWindowSizeParameter
See Also:
Constant Field Values

UsesUserDefaultsWindowLocationParameter

public static final String UsesUserDefaultsWindowLocationParameter
See Also:
Constant Field Values

InsetsParameter

public static final String InsetsParameter
See Also:
Constant Field Values

DisplaysLabelInWidgetParameter

public static final String DisplaysLabelInWidgetParameter
See Also:
Constant Field Values

AdditionalActionsParameter

public static final String AdditionalActionsParameter
See Also:
Constant Field Values

InvokesDefaultActionParameter

public static final String InvokesDefaultActionParameter
See Also:
Constant Field Values

DisabledActionNamesParameter

public static final String DisabledActionNamesParameter
See Also:
Constant Field Values

DisposeIfDeactivatedParameter

public static final String DisposeIfDeactivatedParameter
See Also:
Constant Field Values

HighlightParameter

public static final String HighlightParameter
See Also:
Constant Field Values

ColorParameter

public static final String ColorParameter
See Also:
Constant Field Values

FontParameter

public static final String FontParameter
See Also:
Constant Field Values

LabelParameter

public static final String LabelParameter
See Also:
Constant Field Values

ToolTipParameter

public static final String ToolTipParameter
See Also:
Constant Field Values

IconNameParameter

public static final String IconNameParameter
See Also:
Constant Field Values

IconURLParameter

public static final String IconURLParameter
See Also:
Constant Field Values

SmallIconNameParameter

public static final String SmallIconNameParameter
See Also:
Constant Field Values

SmallIconURLParameter

public static final String SmallIconURLParameter
See Also:
Constant Field Values

ActionNameParameter

public static final String ActionNameParameter
See Also:
Constant Field Values

DescriptionPathParameter

public static final String DescriptionPathParameter
See Also:
Constant Field Values

ShortDescriptionParameter

public static final String ShortDescriptionParameter
See Also:
Constant Field Values

MenuAcceleratorParameter

public static final String MenuAcceleratorParameter
See Also:
Constant Field Values

ActionPriorityParameter

public static final String ActionPriorityParameter
See Also:
Constant Field Values

CategoryPriorityParameter

public static final String CategoryPriorityParameter
See Also:
Constant Field Values

CategoryNameParameter

public static final String CategoryNameParameter
See Also:
Constant Field Values

SendsActionToAllControllersParameter

public static final String SendsActionToAllControllersParameter
See Also:
Constant Field Values

MultipleWindowsAvailableParameter

public static final String MultipleWindowsAvailableParameter
See Also:
Constant Field Values

TaskParameter

public static final String TaskParameter
See Also:
Constant Field Values

TransientParameter

public static final String TransientParameter
See Also:
Constant Field Values
Constructor Detail

EOXMLUnarchiver

public EOXMLUnarchiver(NSDictionary values)
Creates a new EOXMLUnarchiver.

Parameters:
values - the XML attributes as a dictionary
Method Detail

decodeRootObject

public static Object decodeRootObject(NSDictionary rootObjectValues)
Decodes the top object in an XML description, which is represented by an NSDictionary.

Parameters:
rootObjectValues - the XML description as a dictionary
Returns:
the root object unarchived from the XML

decodeClassForKey

public Class decodeClassForKey(String key)
Returns a Class specified by name as the XML attribute key or null if key is not specified in the XML.

Parameters:
key - the name of the XML attribute to look up
Returns:
the Class specified in the XML for the key or null if the key is not specified at all

decodeClassForKey

public Class decodeClassForKey(String key,
                               Class defaultValueIfNotAvailable)
Returns a Class specified by name as the XML attribute key or defaultValueIfNotAvailable if key is not specified in the XML.

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the Class specified in the XML for the key or the default value if the key is not specified at all

decodeValueForKey

public Object decodeValueForKey(String key)
Returns an Object for the key XML attribute. If no value for key is specified, returns null.

Parameters:
key - the name of the XML attribute to look up
Returns:
the value specified in the XML for the key or null if the key is not specified at all

decodeChildren

public NSArray decodeChildren()
Returns an array containing the objects decoded as the receiver's children. The children are the objects created from XML tags contained in the receiver's XML description.

Returns:
the array of children

decodeArrayForKey

public NSArray decodeArrayForKey(String key)
Returns an NSArray specified as child in the XML with the name key or null if key is not specified in the XML.

Parameters:
key - the name of the array to look up
Returns:
the array specified in the XML with the key or null if the key is not specified at all

decodeArrayForKey

public NSArray decodeArrayForKey(String key,
                                 NSArray defaultValueIfNotAvailable)
Returns an NSArray specified as child in the XML with the name key or defaultValueIfNotAvailable if key is not specified in the XML.

Parameters:
key - the name of the array to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the array specified in the XML with the key or the default value if the key is not specified at all

decodeDictionaryForKey

public NSDictionary decodeDictionaryForKey(String key)
Returns an NSDictionary specified as child in the XML with the name key or null if key is not specified in the XML.

Parameters:
key - the name of the dictionary to look up
Returns:
the dictionary specified in the XML with the key or null if the key is not specified at all

decodeDictionaryForKey

public NSDictionary decodeDictionaryForKey(String key,
                                           NSDictionary defaultValueIfNotAvailable)
Returns an NSDictionary specified as child in the XML with the name key or defaultValueIfNotAvailable if key is not specified in the XML.

Parameters:
key - the name of the dictionary to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the dictionary specified in the XML with the key or the default value if the key is not specified at all

decodeStringForKey

public String decodeStringForKey(String key)
Returns a String for the key XML attribute. If no value for key is specified, returns null.

Parameters:
key - the name of the XML attribute to look up
Returns:
the String specified in the XML for the key or null if the key is not specified at all

decodeStringForKey

public String decodeStringForKey(String key,
                                 String defaultValueIfNotAvailable)
Returns a String for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable.

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the String specified in the XML for the key or the default value if the key is not specified at all

decodeDoubleForKey

public double decodeDoubleForKey(String key)
Returns a double for the key XML attribute. If no value for key is specified, returns 0.

Parameters:
key - the name of the XML attribute to look up
Returns:
the double specified in the XML for the key or 0 if the key is not specified at all

decodeDoubleForKey

public double decodeDoubleForKey(String key,
                                 double defaultValueIfNotAvailable)
Returns an integer for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable.

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the integer specified in the XML for the key or the default value if the key is not specified at all

decodeIntForKey

public int decodeIntForKey(String key)
Returns an integer for the key XML attribute. If no value for key is specified, returns 0.

Parameters:
key - the name of the XML attribute to look up
Returns:
the integer specified in the XML for the key or 0 if the key is not specified at all

decodeIntForKey

public int decodeIntForKey(String key,
                           int defaultValueIfNotAvailable)
Returns an integer for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable.

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the integer specified in the XML for the key or the default value if the key is not specified at all

decodeBooleanForKey

public boolean decodeBooleanForKey(String key)
Returns a boolean for the key XML attribute. If no value for key is specified, returns false.

Parameters:
key - the name of the XML attribute to look up
Returns:
the boolean specified in the XML for the key or false if the key is not specified at all

decodeBooleanForKey

public boolean decodeBooleanForKey(String key,
                                   boolean defaultValueIfNotAvailable)
Returns a boolean for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable.

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the boolean specified in the XML for the key or the default value if the key is not specified at all

decodeColorForKey

public Color decodeColorForKey(String key)
Returns a Color for the key XML attribute. If no value for key is specified, returns null. The color can be specified either as "red,green,blue" with red, green and blue being integers between 0 and 255 or as "#RRGGBB" with RR, GG, BB being hexadecimal values between 00 and FF.

Parameters:
key - the name of the XML attribute to look up
Returns:
the Color specified in the XML for the key or null if the key is not specified at all

decodeColorForKey

public Color decodeColorForKey(String key,
                               Color defaultValueIfNotAvailable)
Returns a Color for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable. The color can be specified either as "red,green,blue" with red, green and blue being integers between 0 and 255 or as "#RRGGBB" with RR, GG, BB being hexadecimal values between 00 and FF.

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the Color specified in the XML for the key or the default value if the key is not specified at all

decodeFontForKey

public Font decodeFontForKey(String key)
Returns a Font for the key XML attribute. If no value for key is specified, returns null. The font can be specified as a String "size[,style][:font_name]" with size being an absolute integer or a relative value like "+4", "-2" or "12", the style being one of the values "Plain", "Bold", "Italic", or "BoldItalic", and font_name being the name of the font. style and font_name are optional.

Parameters:
key - the name of the XML attribute to look up
Returns:
the Font specified in the XML for the key or null if the key is not specified at all

decodeFontForKey

public Font decodeFontForKey(String key,
                             Font defaultValueIfNotAvailable)
Returns a Font for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable. The font can be specified as a String "size[,style][:font_name]" with size being an absolute integer or a relative value like "+4", "-2" or "12", the style being one of the values "Plain", "Bold", "Italic", or "BoldItalic", and font_name being the name of the font. style and font_name are optional.

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified and also the base font if the name is not specified explicitly
Returns:
the Font specified in the XML for the key or the default value if the key is not specified at all

decodeInsetsForKey

public Insets decodeInsetsForKey(String key)

decodeInsetsForKey

public Insets decodeInsetsForKey(String key,
                                 Insets defaultValueIfNotAvailable)

decodeAlignmentForKey

public int decodeAlignmentForKey(String key)
Returns an alignment (JTextField.LEFT, JTextField.CENTER, or JTextField.RIGHT) for the key XML attribute. If no value for key is specified, returns JTextField.LEFT. The alignment can be specified as "Center", "Left", or "Right".

Parameters:
key - the name of the XML attribute to look up
Returns:
the alignment specified in the XML for the key or JTextField.LEFT if the key is not specified at all

decodeAlignmentForKey

public int decodeAlignmentForKey(String key,
                                 int defaultValueIfNotAvailable)
Returns an alignment (JTextField.LEFT, JTextField.CENTER, or JTextField.RIGHT) for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable. The alignment can be specified as "Center", "Left", or "Right".

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the alignment specified in the XML for the key or the default value if the key is not specified at all

decodePositionForKey

public int decodePositionForKey(String key)
Returns a position (EOComponentController.Top, EOComponentController.Bottom, EOComponentController.Left, EOComponentController.Right, EOComponentController.TopLeft, EOComponentController.TopRight, EOComponentController.BottomLeft, or EOComponentController.BottomRight) for the key XML attribute. If no value for key is specified, returns EOComponentController.Center. The position can be specified as "Center", "Top", "Bottom", "Left", "Right", "TopLeft", "TopRight", "BottomLeft", or "BottomRight".

Parameters:
key - the name of the XML attribute to look up
Returns:
the position specified in the XML for the key or EOComponentController.Center if the key is not specified at all

decodePositionForKey

public int decodePositionForKey(String key,
                                int defaultValueIfNotAvailable)
Returns a position (EOComponentController.Top, EOComponentController.Bottom, EOComponentController.Left, EOComponentController.Right, EOComponentController.TopLeft, EOComponentController.TopRight, EOComponentController.BottomLeft, or EOComponentController.BottomRight) for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable. The position can be specified as "Center", "Top", "Bottom", "Left", "Right", "TopLeft", "TopRight", "BottomLeft", or "BottomRight".

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the position specified in the XML for the key or the default value if the key is not specified at all

decodeEditabilityForKey

public int decodeEditabilityForKey(String key)
Returns a editability specification (EOEditable.IfSupercontrollerEditable, EOEditable.AlwaysEditable, or EOEditable.NeverEditable) for the key XML attribute. If no value for key is specified, returns EOEditable.IfSupercontrollerEditable. The editability can be specified as "Never", "Always", or "IfSupercontroller".

Parameters:
key - the name of the XML attribute to look up
Returns:
the editability specified in the XML for the key or EOEditable.IfSupercontrollerEditable if the key is not specified at all

decodeEditabilityForKey

public int decodeEditabilityForKey(String key,
                                   int defaultValueIfNotAvailable)
Returns a editability specification (EOEditable.IfSupercontrollerEditable, EOEditable.AlwaysEditable, or EOEditable.NeverEditable) for the key XML attribute. If no value for key is specified, returns defaultValueIfNotAvailable. The editability can be specified as "Never", "Always", or "IfSupercontroller".

Parameters:
key - the name of the XML attribute to look up
defaultValueIfNotAvailable - the default value if the XML attribute is not specified
Returns:
the editability specified in the XML for the key or the default value if the key is not specified at all

Last updated June 2008

Copyright © 2000-2008 Apple Inc.