Class AdjacentSiblingCombinator

  • All Implemented Interfaces:
    Selector

    public class AdjacentSiblingCombinator
    extends Combinator
    An adjacent sibling combinator selects by checking the widget immediate sibling.

    Equivalent to widget+widget selector in CSS.

    See Also:
    Widget.getParent()
    • Constructor Detail

      • AdjacentSiblingCombinator

        public AdjacentSiblingCombinator​(Selector selector1,
                                         Selector selector2)
        Creates an adjacent sibling combinator.
        Parameters:
        selector1 - the first selector.
        selector2 - the second selector.
    • Method Detail

      • appliesToWidget

        public boolean appliesToWidget​(Widget widget)
        Description copied from interface: Selector
        Checks whether or not this selector applies to the given widget.
        Parameters:
        widget - the widget to test.
        Returns:
        true if this selectors applies to the given widget, false otherwise.