Class GeneralSiblingCombinator

  • All Implemented Interfaces:
    Selector

    public class GeneralSiblingCombinator
    extends Combinator
    A general sibling combinator selects by checking the widget sibling.

    Equivalent to widget~widget selector in CSS.

    See Also:
    Widget.getParent()
    • Constructor Detail

      • GeneralSiblingCombinator

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