Class AbstractLayer

    • Field Detail

      • m_Manager

        protected LayerManager m_Manager
        the layer manager.
      • m_CheckboxEnabled

        protected BaseCheckBox m_CheckboxEnabled
        Whether the layer is enabled.
    • Constructor Detail

      • AbstractLayer

        public AbstractLayer()
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class BasePanel
      • setManager

        public void setManager​(LayerManager value)
        Sets the layer manager.
        Parameters:
        value - the manager
      • getManager

        public LayerManager getManager()
        Returns the layer manager.
        Returns:
        the manager
      • getName

        public abstract String getName()
        Returns the name of the layer.
        Overrides:
        getName in class Component
        Returns:
        the layer
      • setEnabled

        public void setEnabled​(boolean value)
        Sets whether the layer is enabled.
        Overrides:
        setEnabled in class JComponent
        Parameters:
        value - true if enabled
      • isEnabled

        public boolean isEnabled()
        Returns whether the layer is enabled.
        Overrides:
        isEnabled in class Component
        Returns:
        true if enabled
      • isRemovable

        public abstract boolean isRemovable()
        Returns whether the layer can be removed.
        Returns:
        true if can be removed
      • hasActionsAvailable

        public abstract boolean hasActionsAvailable()
        Returns whether actions are available.
        Returns:
        true if available
      • update

        protected void update()
        Notifies the change listeners.
      • doDraw

        protected abstract void doDraw​(Graphics2D g2d)
        Performs the drawing.
        Parameters:
        g2d - the graphics context
      • draw

        public void draw​(Graphics2D g2d)
        Performs the drawing.
        Parameters:
        g2d - the graphics context
      • setSettings

        public abstract void setSettings​(AbstractLayer.AbstractLayerState settings)
        Restores the settings of the layer.
        Parameters:
        settings - the settings
      • createApplyButton

        public static BaseFlatButton createApplyButton()
        Creates an apply button (icon/tooltip), but without action.
        Returns:
        the button
      • setApplyButtonState

        public static void setApplyButtonState​(BaseFlatButton button,
                                               boolean modified)
        Sets the state of the "Apply" button according to the modified flag.
        Parameters:
        button - the button to update
        modified - whether applying needs doing or not