Class BlurredPanel


  • public class BlurredPanel
    extends java.lang.Object
    Instances of this class are controls located on the top of a shell. They display a blurred version of the content of the shell
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String BLURED_PANEL_KEY  
      private org.eclipse.swt.widgets.Canvas canvas  
      private org.eclipse.swt.widgets.Shell panel  
      private org.eclipse.swt.widgets.Shell parent  
      private int radius  
    • Constructor Summary

      Constructors 
      Constructor Description
      BlurredPanel​(org.eclipse.swt.widgets.Shell shell)
      Constructs a new instance of this class given its parent.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private org.eclipse.swt.graphics.Image createBlurredImage()  
      int getRadius()  
      void hide()
      Hide the panel
      private void paintCanvas​(org.eclipse.swt.events.PaintEvent e)
      Paint the canvas that holds the panel
      void setRadius​(int radius)  
      void show()
      Show the blurred panel
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • parent

        private final org.eclipse.swt.widgets.Shell parent
      • BLURED_PANEL_KEY

        private static final java.lang.String BLURED_PANEL_KEY
        See Also:
        Constant Field Values
      • radius

        private int radius
      • panel

        private org.eclipse.swt.widgets.Shell panel
      • canvas

        private org.eclipse.swt.widgets.Canvas canvas
    • Constructor Detail

      • BlurredPanel

        public BlurredPanel​(org.eclipse.swt.widgets.Shell shell)
        Constructs a new instance of this class given its parent.
        Parameters:
        shell - a shell that will be the parent of the new instance (cannot be null)
        Throws:
        java.lang.IllegalArgumentException -
        • ERROR_NULL_ARGUMENT - if the parent is null
        org.eclipse.swt.SWTException -
        • ERROR_WIDGET_DISPOSED - if the parent has been disposed
        • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
    • Method Detail

      • show

        public void show()
        Show the blurred panel
      • paintCanvas

        private void paintCanvas​(org.eclipse.swt.events.PaintEvent e)
        Paint the canvas that holds the panel
        Parameters:
        e - PaintEvent
      • createBlurredImage

        private org.eclipse.swt.graphics.Image createBlurredImage()
      • hide

        public void hide()
        Hide the panel
      • getRadius

        public int getRadius()
        Returns:
        the radius of the blur effect
      • setRadius

        public void setRadius​(int radius)
        Parameters:
        radius - the radius to set