Class SelectionImpl

java.lang.Object
org.loboevolution.js.AbstractScriptableDelegate
org.loboevolution.html.dom.nodeimpl.SelectionImpl
All Implemented Interfaces:
Selection, ScriptableDelegate

public class SelectionImpl extends AbstractScriptableDelegate implements Selection

SelectionImpl class.

  • Constructor Details

    • SelectionImpl

      public SelectionImpl()
  • Method Details

    • getAnchorNode

      public Node getAnchorNode()
      Description copied from interface: Selection

      getAnchorNode.

      Specified by:
      getAnchorNode in interface Selection
      Returns:
      a Node object.
    • getAnchorOffset

      public int getAnchorOffset()
      Description copied from interface: Selection

      getAnchorOffset.

      Specified by:
      getAnchorOffset in interface Selection
      Returns:
      a Integer object.
    • getFocusNode

      public Node getFocusNode()
      Description copied from interface: Selection

      getFocusNode.

      Specified by:
      getFocusNode in interface Selection
      Returns:
      a Node object.
    • getFocusOffset

      public int getFocusOffset()
      Description copied from interface: Selection

      getFocusOffset.

      Specified by:
      getFocusOffset in interface Selection
      Returns:
      a Integer object.
    • isIsCollapsed

      public boolean isIsCollapsed()
      Description copied from interface: Selection

      isIsCollapsed.

      Specified by:
      isIsCollapsed in interface Selection
      Returns:
      a boolean.
    • getRangeCount

      public int getRangeCount()
      Description copied from interface: Selection

      getRangeCount.

      Specified by:
      getRangeCount in interface Selection
      Returns:
      a Integer object.
    • getType

      public String getType()
      Description copied from interface: Selection

      getType.

      Specified by:
      getType in interface Selection
      Returns:
      a String object.
    • addRange

      public void addRange(Range range)
      Description copied from interface: Selection

      addRange.

      Specified by:
      addRange in interface Selection
      Parameters:
      range - a Range object.
    • collapse

      public void collapse(Node node, int offset)
      Description copied from interface: Selection

      collapse.

      Specified by:
      collapse in interface Selection
      Parameters:
      node - a Node object.
      offset - a Integer object.
    • collapse

      public void collapse(Node node)
      Description copied from interface: Selection

      collapse.

      Specified by:
      collapse in interface Selection
      Parameters:
      node - a Node object.
    • collapseToEnd

      public void collapseToEnd()
      Description copied from interface: Selection

      collapseToEnd.

      Specified by:
      collapseToEnd in interface Selection
    • collapseToStart

      public void collapseToStart()
      Description copied from interface: Selection

      collapseToStart.

      Specified by:
      collapseToStart in interface Selection
    • containsNode

      public boolean containsNode(Node node, boolean allowPartialContainment)
      Description copied from interface: Selection

      containsNode.

      Specified by:
      containsNode in interface Selection
      Parameters:
      node - a Node object.
      allowPartialContainment - a boolean.
      Returns:
      a boolean.
    • containsNode

      public boolean containsNode(Node node)
      Description copied from interface: Selection

      containsNode.

      Specified by:
      containsNode in interface Selection
      Parameters:
      node - a Node object.
      Returns:
      a boolean.
    • deleteFromDocument

      public void deleteFromDocument()
      Description copied from interface: Selection

      deleteFromDocument.

      Specified by:
      deleteFromDocument in interface Selection
    • empty

      public void empty()
      Description copied from interface: Selection

      empty.

      Specified by:
      empty in interface Selection
    • extend

      public void extend(Node node, int offset)
      Description copied from interface: Selection

      extend.

      Specified by:
      extend in interface Selection
      Parameters:
      node - a Node object.
      offset - a Integer object.
    • extend

      public void extend(Node node)
      Description copied from interface: Selection

      extend.

      Specified by:
      extend in interface Selection
      Parameters:
      node - a Node object.
    • getRangeAt

      public Range getRangeAt(int index)
      Description copied from interface: Selection

      getRangeAt.

      Specified by:
      getRangeAt in interface Selection
      Parameters:
      index - a Integer object.
      Returns:
      a Range object.
    • removeAllRanges

      public void removeAllRanges()
      Description copied from interface: Selection

      removeAllRanges.

      Specified by:
      removeAllRanges in interface Selection
    • removeRange

      public void removeRange(Range range)
      Description copied from interface: Selection

      removeRange.

      Specified by:
      removeRange in interface Selection
      Parameters:
      range - a Range object.
    • selectAllChildren

      public void selectAllChildren(Node node)
      Description copied from interface: Selection

      selectAllChildren.

      Specified by:
      selectAllChildren in interface Selection
      Parameters:
      node - a Node object.
    • setBaseAndExtent

      public void setBaseAndExtent(Node anchorNode, int anchorOffset, Node focusNode, int focusOffset)
      Description copied from interface: Selection

      setBaseAndExtent.

      Specified by:
      setBaseAndExtent in interface Selection
      Parameters:
      anchorNode - a Node object.
      anchorOffset - a Integer object.
      focusNode - a Node object.
      focusOffset - a Integer object.
    • setPosition

      public void setPosition(Node node, int offset)
      Description copied from interface: Selection

      setPosition.

      Specified by:
      setPosition in interface Selection
      Parameters:
      node - a Node object.
      offset - a Integer object.
    • setPosition

      public void setPosition(Node node)
      Description copied from interface: Selection

      setPosition.

      Specified by:
      setPosition in interface Selection
      Parameters:
      node - a Node object.