Class ChildCombinator

  • All Implemented Interfaces:
    Selector

    public class ChildCombinator
    extends Combinator
    A child combinator selects by checking the widget direct hierarchy.

    Equivalent to widget>widget selector in CSS.

    See Also:
    Widget.getParent()
    • Constructor Detail

      • ChildCombinator

        public ChildCombinator​(Selector selector1,
                               Selector selector2)
        Creates a child 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.