WebObjects 5.2.3

com.webobjects.eoapplication
Class EOXMLUnarchiver

java.lang.Object
  extended bycom.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

ActionKeyParameter

public static final String ActionKeyParameter

ActionNameParameter

public static final String ActionNameParameter

ActionPriorityParameter

public static final String ActionPriorityParameter

ActionWidgetPositionParameter

public static final String ActionWidgetPositionParameter

AdditionalActionsParameter

public static final String AdditionalActionsParameter

AlignmentParameter

public static final String AlignmentParameter

AlignsComponentsParameter

public static final String AlignsComponentsParameter

AllowsDiscontiguousSelectionParameter

public static final String AllowsDiscontiguousSelectionParameter

AllowsDuplicatesParameter

public static final String AllowsDuplicatesParameter

AllowsMultipleSelectionParameter

public static final String AllowsMultipleSelectionParameter

AllowsOneTouchExpandableParameter

public static final String AllowsOneTouchExpandableParameter

AllowsRemoveAllParameter

public static final String AllowsRemoveAllParameter

AllowsSnapToZeroParameter

public static final String AllowsSnapToZeroParameter

ArchiveNameParameter

public static final String ArchiveNameParameter

AvailableTitlesKeyParameter

public static final String AvailableTitlesKeyParameter

BorderTypeParameter

public static final String BorderTypeParameter

ButtonPositionParameter

public static final String ButtonPositionParameter

CategoryNameParameter

public static final String CategoryNameParameter

CategoryPriorityParameter

public static final String CategoryPriorityParameter

ChildrenKeyParameter

public static final String ChildrenKeyParameter

ClassNameParameter

public static final String ClassNameParameter

ColorParameter

public static final String ColorParameter

DescriptionPathParameter

public static final String DescriptionPathParameter

DetailKeysParameter

public static final String DetailKeysParameter

DetailRelationshipPathParameter

public static final String DetailRelationshipPathParameter

DisabledActionNamesParameter

public static final String DisabledActionNamesParameter

DisplayGroupProviderMethodNameParameter

public static final String DisplayGroupProviderMethodNameParameter

DisplayPatternParameter

public static final String DisplayPatternParameter

DisplaysLabelInWidgetParameter

public static final String DisplaysLabelInWidgetParameter

DisposeIfDeactivatedParameter

public static final String DisposeIfDeactivatedParameter

EditabilityParameter

public static final String EditabilityParameter

EditingContextProviderMethodNameParameter

public static final String EditingContextProviderMethodNameParameter

EnabledDisplayGroupProviderMethodNameParameter

public static final String EnabledDisplayGroupProviderMethodNameParameter

EnabledKeyParameter

public static final String EnabledKeyParameter

EntityParameter

public static final String EntityParameter

ExpandedIconKeyParameter

public static final String ExpandedIconKeyParameter

FetchesOnConnectEnabledParameter

public static final String FetchesOnConnectEnabledParameter

FontParameter

public static final String FontParameter

FormatAllowedParameter

public static final String FormatAllowedParameter

FormatClassParameter

public static final String FormatClassParameter

FormatPatternParameter

public static final String FormatPatternParameter

HighlightParameter

public static final String HighlightParameter

HorizontalBorderParameter

public static final String HorizontalBorderParameter

HorizontallyResizableParameter

public static final String HorizontallyResizableParameter

IconKeyParameter

public static final String IconKeyParameter

IconNameParameter

public static final String IconNameParameter

IconURLParameter

public static final String IconURLParameter

ImageScalingParameter

public static final String ImageScalingParameter

IndexKeyParameter

public static final String IndexKeyParameter

InsetsParameter

public static final String InsetsParameter

InvokesDefaultActionParameter

public static final String InvokesDefaultActionParameter

IsLeafKeyParameter

public static final String IsLeafKeyParameter

IsQueryWidgetParameter

public static final String IsQueryWidgetParameter

IsRootVisibleParameter

public static final String IsRootVisibleParameter

KeyValuePairsParameter

public static final String KeyValuePairsParameter

LabelAlignmentParameter

public static final String LabelAlignmentParameter

LabelComponentPositionParameter

public static final String LabelComponentPositionParameter

LabelComponentWidthParameter

public static final String LabelComponentWidthParameter

LabelParameter

public static final String LabelParameter

MandatoryRelationshipPathsParameter

public static final String MandatoryRelationshipPathsParameter

MaximumValueKeyParameter

public static final String MaximumValueKeyParameter

MenuAcceleratorParameter

public static final String MenuAcceleratorParameter

MinimumHeightParameter

public static final String MinimumHeightParameter

MinimumValueKeyParameter

public static final String MinimumValueKeyParameter

MinimumWidgetHeightParameter

public static final String MinimumWidgetHeightParameter

MinimumWidgetWidthParameter

public static final String MinimumWidgetWidthParameter

MinimumWidthParameter

public static final String MinimumWidthParameter

MultipleWindowsAvailableParameter

public static final String MultipleWindowsAvailableParameter

ParentKeyParameter

public static final String ParentKeyParameter

PrefersContinuousChangeNotificationParameter

public static final String PrefersContinuousChangeNotificationParameter

PrefersIconOnlyParameter

public static final String PrefersIconOnlyParameter

QuickTimeCanvasResizingParameter

public static final String QuickTimeCanvasResizingParameter

RelationshipPathParameter

public static final String RelationshipPathParameter

ResetTitlesObjectsOnEveryConnectParameter

public static final String ResetTitlesObjectsOnEveryConnectParameter

ResizeWeightParameter

public static final String ResizeWeightParameter

RootKeyParameter

public static final String RootKeyParameter

RunsConfirmDialogForEmptyQualifiers

public static final String RunsConfirmDialogForEmptyQualifiers

ScalingHintsParameter

public static final String ScalingHintsParameter

SearchesTitlesObjectsInEditingContextParameter

public static final String SearchesTitlesObjectsInEditingContextParameter

SendsActionToAllControllersParameter

public static final String SendsActionToAllControllersParameter

SharedIdentifierParameter

public static final String SharedIdentifierParameter

ShortDescriptionParameter

public static final String ShortDescriptionParameter

SmallIconNameParameter

public static final String SmallIconNameParameter

SmallIconURLParameter

public static final String SmallIconURLParameter

SortsByColumnOrderParameter

public static final String SortsByColumnOrderParameter

SuppressesAssociationParameter

public static final String SuppressesAssociationParameter

TaskParameter

public static final String TaskParameter

TitleKeysParameter

public static final String TitleKeysParameter

TitlePositionParameter

public static final String TitlePositionParameter

TitlesDisplayGroupProviderMethodNameParameter

public static final String TitlesDisplayGroupProviderMethodNameParameter

TitlesEntityParameter

public static final String TitlesEntityParameter

ToolTipParameter

public static final String ToolTipParameter

TransientParameter

public static final String TransientParameter

TypeNameParameter

public static final String TypeNameParameter

URLKeyParameter

public static final String URLKeyParameter

UsesActionParameter

public static final String UsesActionParameter

UsesButtonParameter

public static final String UsesButtonParameter

UsesContinuousLayoutParameter

public static final String UsesContinuousLayoutParameter

UsesHorizontalLayoutParameter

public static final String UsesHorizontalLayoutParameter

UsesLabelComponentParameter

public static final String UsesLabelComponentParameter

UsesLargeButtonRepresentationParameter

public static final String UsesLargeButtonRepresentationParameter

UsesPasswordFieldParameter

public static final String UsesPasswordFieldParameter

UsesTableLabelsParameter

public static final String UsesTableLabelsParameter

UsesTitledBorderParameter

public static final String UsesTitledBorderParameter

UsesUserDefaultsWindowLocationParameter

public static final String UsesUserDefaultsWindowLocationParameter

UsesUserDefaultsWindowSizeParameter

public static final String UsesUserDefaultsWindowSizeParameter

ValueKeyParameter

public static final String ValueKeyParameter

VerticalBorderParameter

public static final String VerticalBorderParameter

VerticallyResizableParameter

public static final String VerticallyResizableParameter

WindowPositionParameter

public static final String WindowPositionParameter
Constructor Detail

EOXMLUnarchiver

public EOXMLUnarchiver(NSDictionary values)
Creates a new EOXMLUnarchiver.

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

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

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

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

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

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

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

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

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

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

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)

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

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

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

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

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

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.