Class ControlAccessor<T extends org.eclipse.swt.widgets.Control>

    • Constructor Detail

      • ControlAccessor

        public ControlAccessor​(@Nullable T control)
        Constructs a new ControlAccessor instance.
        Parameters:
        control - the Control instance to access.
      • ControlAccessor

        public ControlAccessor​(java.util.Optional<T> controlHolder)
        Constructs a new ControlAccessor instance.
        Parameters:
        controlHolder - the optional Control instance to access.
      • ControlAccessor

        public ControlAccessor​(Accessor<T> accessor)
        Constructs a new ControlAccessor instance.
        Parameters:
        accessor - the accessor to the Control instance to access.
    • Method Detail

      • accessEnabled

        public Accessor<T> accessEnabled()
        Gets the control only if it is enabled.
        Returns:
        the accessor for the enabled widget.
      • matchClass

        public static java.util.function.Predicate<org.eclipse.swt.widgets.Control> matchClass​(java.lang.Class<? extends org.eclipse.swt.widgets.Control> type)
        Creates a Predicate for control type matching.
        Parameters:
        type - the control type to match.
        Returns:
        the created Predicate.