Class DarkPanel


  • public class DarkPanel
    extends java.lang.Object
    Instances of this class are controls located on the top of a shell. They display a dark panel on this shell
    • Field Summary

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

      Constructors 
      Constructor Description
      DarkPanel​(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
      int getAlpha()  
      void hide()
      Hide the dark panel
      private void paintCanvas​(org.eclipse.swt.events.PaintEvent e)
      Paint the canvas that holds the panel
      void setAlpha​(int alpha)  
      void show()
      Show the dark 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
      • alpha

        private int alpha
      • panel

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

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

      • DarkPanel

        public DarkPanel​(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 dark panel
      • paintCanvas

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

        public void hide()
        Hide the dark panel
      • getAlpha

        public int getAlpha()
        Returns:
        the alpha value
      • setAlpha

        public void setAlpha​(int alpha)
        Parameters:
        alpha - the alpha to set