Class AbstractStyleSheet

    • Constructor Detail

      • AbstractStyleSheet

        protected AbstractStyleSheet()
    • Method Detail

      • getStyleProperty

        public Object getStyleProperty​(StyleKey key)
        Returns the value of a style. If the style is not found in this style-sheet, the code looks in the parent style-sheets. If the style is not found in any of the parent style-sheets, then null is returned.
        Specified by:
        getStyleProperty in interface StyleSheet
        Parameters:
        key - the style key.
        Returns:
        the value.
      • getBooleanStyleProperty

        public boolean getBooleanStyleProperty​(StyleKey key)
        Returns a boolean style (defaults to false if the style is not found).
        Specified by:
        getBooleanStyleProperty in interface StyleSheet
        Parameters:
        key - the style key.
        Returns:
        true or false.
      • getBooleanStyleProperty

        public boolean getBooleanStyleProperty​(StyleKey key,
                                               boolean defaultValue)
        Returns a boolean style.
        Specified by:
        getBooleanStyleProperty in interface StyleSheet
        Parameters:
        key - the style key.
        defaultValue - the default value.
        Returns:
        true or false.
      • getIntStyleProperty

        public int getIntStyleProperty​(StyleKey key,
                                       int def)
        Returns an integer style.
        Specified by:
        getIntStyleProperty in interface StyleSheet
        Parameters:
        key - the style key.
        def - the default value.
        Returns:
        the style value.
      • getDoubleStyleProperty

        public double getDoubleStyleProperty​(StyleKey key,
                                             double def)
        Returns an double style.
        Specified by:
        getDoubleStyleProperty in interface StyleSheet
        Parameters:
        key - the style key.
        def - the default value.
        Returns:
        the style value.
      • getId

        public InstanceID getId()
        Returns the ID of the stylesheet. The ID does identify an element stylesheet an all all cloned instances of that stylesheet.
        Specified by:
        getId in interface StyleSheet
        Returns:
        the ID of this stylesheet.
      • derive

        public StyleSheet derive​(boolean preserveId)