Class CoolBarAccessor

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

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

      • CoolBarAccessor

        public CoolBarAccessor​(@Nullable org.eclipse.swt.widgets.CoolBar coolBar)
        Constructs a new CoolBarAccessor instance.
        Parameters:
        coolBar - the CoolBar object to access.
      • CoolBarAccessor

        public CoolBarAccessor​(java.util.Optional<org.eclipse.swt.widgets.CoolBar> coolBarHolder)
        Constructs a new CoolBarAccessor instance.
        Parameters:
        coolBarHolder - the optional CoolBar object to access.
      • CoolBarAccessor

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

      • items

        public java.util.stream.Stream<org.eclipse.swt.widgets.CoolItem> items()
        Gets all CoolItems of this CoolBar.
        Returns:
        all CoolItems of this CoolBar.
      • accessItem

        public CoolItemAccessor accessItem​(java.util.function.Predicate<org.eclipse.swt.widgets.CoolItem> predicate)
        Convenience function which gets a specific CoolItem.

        A test failure is signaled if either none or more than one matching ToolItem exists.

        Parameters:
        predicate - the match criteria to use.
        Returns:
        the found CoolItem.
      • accessItem

        public CoolItemAccessor accessItem​(int itemIndex)
        Convenience function which gets a specific CoolItem from this CoolBar.

        A test failure is signaled if the CoolItem does not exist.

        Parameters:
        itemIndex - the item index to get.
        Returns:
        the found CoolItem.