Class OverlayLayer

    • Constructor Detail

      • OverlayLayer

        public OverlayLayer()
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class AbstractLayer
      • setName

        public void setName​(String value)
        Sets the name of the layer.
        Specified by:
        setName in class AbstractImageLayer
        Parameters:
        value - the name
      • getName

        public String getName()
        Returns the name of the layer.
        Specified by:
        getName in class AbstractLayer
        Returns:
        the name
      • setAlpha

        public void setAlpha​(float value)
        Sets the alpha value to use for transparency.
        Parameters:
        value - the alpha value
      • getAlpha

        public float getAlpha()
        Returns the alpha value for transparency.
        Returns:
        the alpha value
      • setDefaultAlpha

        public void setDefaultAlpha​(float value)
        Sets the default alpha.
        Parameters:
        value - the default
      • getDefaultAlpha

        public float getDefaultAlpha()
        Returns the default alpha.
        Returns:
        the default
      • setColor

        public void setColor​(Color value)
        Sets the color value to use for the layer.
        Parameters:
        value - the color value
      • getColor

        public Color getColor()
        Returns the color value for the layer.
        Returns:
        the color value
      • setDefaultColor

        public void setDefaultColor​(Color value)
        Sets the default color.
        Parameters:
        value - the default
      • getDefaultColor

        public Color getDefaultColor()
        Returns the default color.
        Returns:
        the default
      • setActive

        public void setActive​(boolean value)
        Sets the active state of the layer.
        Parameters:
        value - true if active
      • isActive

        public boolean isActive()
        Returns the active state of the layer.
        Returns:
        true if active
      • isRemovable

        public boolean isRemovable()
        Returns whether the layer can be removed.
        Specified by:
        isRemovable in class AbstractLayer
        Returns:
        true if can be removed
      • setRemovable

        public void setRemovable​(boolean value)
        Sets whether the layer can be removed.
        Parameters:
        value - true if removable
      • hasActionsAvailable

        public boolean hasActionsAvailable()
        Returns whether actions are available.
        Specified by:
        hasActionsAvailable in class AbstractLayer
        Returns:
        true if available
      • setActionsAvailable

        public void setActionsAvailable​(boolean value)
        Sets whether the layer actions are available.
        Parameters:
        value - true if available
      • updateImage

        protected void updateImage()
        Updates the image using the current color.
      • getBinaryImage

        public BufferedImage getBinaryImage()
        Returns the image as binary image.
        Returns:
        the converted image
      • doDraw

        protected void doDraw​(Graphics2D g2d)
        Performs the drawing.
        Specified by:
        doDraw in class AbstractLayer
        Parameters:
        g2d - the graphics context
      • update

        protected void update()
        Notifies the change listeners.
        Overrides:
        update in class AbstractLayer
      • getFavoritesOptions

        protected String getFavoritesOptions()
        Returns the options for the favorites.
        Returns:
        the JSON string from the options
      • setFavoritesOptions

        protected void setFavoritesOptions​(String json)
        Parses the JSON string and sets the options.
        Parameters:
        json - the options as json string
      • showFavoritesMenu

        protected void showFavoritesMenu()
        Displays the favorites menu.