Class AbstractWatermark

    • Field Detail

      • m_Enabled

        protected boolean m_Enabled
        whether the watermark is enabled.
    • Constructor Detail

      • AbstractWatermark

        public AbstractWatermark()
    • Method Detail

      • setEnabled

        public void setEnabled​(boolean value)
        Sets whether to enable the watermark.
        Parameters:
        value - true if to enable
      • getEnabled

        public boolean getEnabled()
        Returns whether the watermark is enabled.
        Returns:
        true if enabled
      • enabledTipText

        public String enabledTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • canApplyWatermark

        protected boolean canApplyWatermark​(Graphics g,
                                            Dimension dimension)
        Returns whether the watermark can be applied.
        Default implementation just returns true.
        Parameters:
        g - the graphics context
        dimension - the dimension of the drawing area
        Returns:
        true if it can be applied
      • doApplyWatermark

        protected abstract void doApplyWatermark​(Graphics g,
                                                 Dimension dimension)
        Applies the watermark in the specified graphics context.
        Parameters:
        g - the graphics context
        dimension - the dimension of the drawing area
      • applyWatermark

        public void applyWatermark​(Graphics g,
                                   Dimension dimension)
        Applies the watermark in the specified graphics context.
        Specified by:
        applyWatermark in interface Watermark
        Parameters:
        g - the graphics context
        dimension - the dimension of the drawing area