Class ButtonAccessor

  • All Implemented Interfaces:
    java.util.function.Supplier<org.eclipse.swt.widgets.Button>

    public class ButtonAccessor
    extends ControlAccessor<org.eclipse.swt.widgets.Button>
    Accessor class for Button objects.
    • Constructor Detail

      • ButtonAccessor

        public ButtonAccessor​(@Nullable org.eclipse.swt.widgets.Button button)
        Constructs a new ButtonAccessor instance.
        Parameters:
        button - the Button instance to access.
      • ButtonAccessor

        public ButtonAccessor​(java.util.Optional<org.eclipse.swt.widgets.Button> buttonHolder)
        Constructs a new ButtonAccessor instance.
        Parameters:
        buttonHolder - the optional Button instance to access.
      • ButtonAccessor

        public ButtonAccessor​(Accessor<org.eclipse.swt.widgets.Button> accessor)
        Constructs a new ButtonAccessor instance.
        Parameters:
        accessor - the accessor to the Button instance to access.
    • Method Detail

      • matchText

        public static java.util.function.Predicate<org.eclipse.swt.widgets.Button> matchText​(java.lang.String text)
        Creates a Predicate for exact text matching.
        Parameters:
        text - the text to match.
        Returns:
        the created Predicate.
      • matchText

        public static java.util.function.Predicate<org.eclipse.swt.widgets.Button> matchText​(java.util.regex.Pattern textPattern)
        Creates a Predicate for pattern text matching.
        Parameters:
        textPattern - the pattern to match.
        Returns:
        the created Predicate.
      • select

        public void select()
        Generate a selection event to the Button.