com.aspose.page

Class UserProperties

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<Object,Object>


    public class UserProperties
    extends Properties

    Special property class which allows typed properties to be set and returned. It also allows the hookup of two default property objects to be searched if this property object does not contain the property.

    See Also:
    Serialized Form
    • Constructor Detail

      • UserProperties

        public UserProperties()

        Initializes an empty instance of UserProperties class.

      • UserProperties

        public UserProperties(Properties defaults)

        Initializes an of UserProperties class with default values.

        Parameters:
        defaults - Default properties values.
      • UserProperties

        public UserProperties(Properties defaults,
                              Properties altDefaults)

        Constructs UserProperties with a defaults and altDefaults table, which are searched in that order.

        Parameters:
        defaults - Default properties.
        altDefaults - Alternative default properties.
    • Method Detail

      • setProperties

        public void setProperties(Properties properties)

        Copies properties, including its defaults into this UserProperties

        Parameters:
        properties - Properties.
      • setProperty

        public Object setProperty(String key,
                                  String value)

        Sets string property value.

        Overrides:
        setProperty in class Properties
        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  String[] value)

        Sets string array property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         String[] value)

        Sets string array property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  Color value)

        Sets color property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         Color value)

        Sets color property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  Rectangle value)

        Sets rectangle property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         Rectangle value)

        Sets rectangle property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  Insets value)

        Sets insets property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         Insets value)

        Sets insets property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  Dimension value)

        Sets dimension property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         Dimension value)

        Sets dimension property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  int value)

        Sets integer property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         int value)

        Sets integer property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  double value)

        Sets double property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         double value)

        Sets double property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  float value)

        Sets float property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         float value)

        Sets float property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public Object setProperty(String key,
                                  boolean value)

        Sets boolean property value.

        Parameters:
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • setProperty

        public static Object setProperty(Properties properties,
                                         String key,
                                         boolean value)

        Sets boolean property value in specified properties table.

        Parameters:
        properties - The properties table.
        key - The name of property.
        value - The value of property.
        Returns:
        A property.
      • getProperty

        public String getProperty(String key)

        Gets string property value.

        Overrides:
        getProperty in class Properties
        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getProperty

        public String getProperty(String key,
                                  String def)

        Gets string property value. If requested property is absent, returns provided default value.

        Overrides:
        getProperty in class Properties
        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • getPropertyStringArray

        public String[] getPropertyStringArray(String key)

        Gets string array property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getPropertyStringArray

        public String[] getPropertyStringArray(String key,
                                               String[] def)

        Gets string array property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • getPropertyColor

        public Color getPropertyColor(String key)

        Gets color property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getPropertyColor

        public Color getPropertyColor(String key,
                                      Color def)

        Gets color property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • getPropertyRectangle

        public Rectangle getPropertyRectangle(String key)

        Gets rectangle property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getPropertyRectangle

        public Rectangle getPropertyRectangle(String key,
                                              Rectangle def)

        Gets rectangle property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • getPropertyInsets

        public Insets getPropertyInsets(String key)

        Gets insets property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getPropertyInsets

        public Insets getPropertyInsets(String key,
                                        Insets def)

        Gets insets property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • getPropertyDimension

        public Dimension getPropertyDimension(String key)

        Gets dimension property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getPropertyDimension

        public Dimension getPropertyDimension(String key,
                                              Dimension def)

        Gets dimension property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • getPropertyInt

        public int getPropertyInt(String key)

        Gets integer property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getPropertyInt

        public int getPropertyInt(String key,
                                  int def)

        Gets integer property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • getPropertyDouble

        public double getPropertyDouble(String key)

        Gets double property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getPropertyDouble

        public double getPropertyDouble(String key,
                                        double def)

        Gets double property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • getPropertyFloat

        public float getPropertyFloat(String key)

        Gets float property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • getPropertyFloat

        public float getPropertyFloat(String key,
                                      float def)

        Gets float property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.
      • isProperty

        public boolean isProperty(String key)

        Gets boolean property value.

        Parameters:
        key - The name of property.
        Returns:
        Property value.
      • isProperty

        public boolean isProperty(String key,
                                  boolean def)

        Gets boolean property value. If requested property is absent, returns provided default value.

        Parameters:
        key - The name of property.
        def - Default value of property.
        Returns:
        Property value.