Class SameShellProvider

  • All Implemented Interfaces:
    IShellProvider

    public class SameShellProvider
    extends java.lang.Object
    implements IShellProvider
    Standard shell provider that always returns the shell containing the given control. This will always return the correct shell for the control, even if the control is reparented.
    Since:
    3.1
    • Constructor Summary

      Constructors 
      Constructor Description
      SameShellProvider​(Control targetControl)
      Returns a shell provider that always returns the current shell for the given control.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Shell getShell()
      Returns the current shell (or null if none).
      • Methods inherited from class java.lang.Object

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

      • SameShellProvider

        public SameShellProvider​(Control targetControl)
        Returns a shell provider that always returns the current shell for the given control.
        Parameters:
        targetControl - control whose shell will be tracked, or null if getShell() should always return null
    • Method Detail

      • getShell

        public Shell getShell()
        Description copied from interface: IShellProvider
        Returns the current shell (or null if none). This return value may change over time, and should not be cached.
        Specified by:
        getShell in interface IShellProvider
        Returns:
        the current shell or null if none