Interface ISelector


  • public interface ISelector
    A selector context to hold a root IComponent for seeking icomponents.
    Author:
    jumperchen
    • Method Detail

      • get

        <T extends IComponent<?>> T get​(java.lang.String id)
        Returns the target icomponent by its given id if matched.
        Parameters:
        id - the id of the icomponent for seeking
      • get

        <T extends IComponent<?>> T get​(int[] path)
        Returns the target icomponent by its given path if matched.
        Parameters:
        path - the path of the icomponent for seeking
      • getAncestor

        <T extends IComponent<?>> java.util.List<T> getAncestor​(int[] path)
        Returns all the ancestor from top to bottom for the given path.
        Parameters:
        path - the path of the icomponent for seeking
      • getAncestor

        <T extends IComponent<?>> java.util.List<T> getAncestor​(IComponent ichild)
        Returns all the ancestor from top to bottom for the given ichild.
        Parameters:
        ichild - the icomponent for seeking
      • getParent

        <T extends IComponent<?>> T getParent​(IComponent ichild)
        Returns the target parent.

        Note: If not found, null is assumed

        Parameters:
        ichild - the icomponent for seeking
      • getPath

        int[] getPath​(IComponent ichild)
        Returns the target path.

        Note: If not found, null is assumed

        Parameters:
        ichild - the icomponent for seeking