Class Locator

  • All Implemented Interfaces:
    java.io.Serializable

    public class Locator
    extends java.lang.Object
    implements java.io.Serializable
    For associating a CSS event with a document location.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int columnNumber_  
      private int lineNumber_  
      private java.lang.String uri_  
    • Constructor Summary

      Constructors 
      Constructor Description
      Locator​(java.lang.String uri, int line, int column)
      Creates new LocatorImpl.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int getColumnNumber()
      Return the column number where the current document event ends.
      int getLineNumber()
      Return the line number where the current document event ends.
      java.lang.String getUri()  
      int hashCode()  
      void setColumnNumber​(int column)
      Set the columnNumber to a new value.
      void setLineNumber​(int line)
      Set the lineNumber to a new value.
      void setUri​(java.lang.String uri)
      Set the uri to a new value.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • uri_

        private java.lang.String uri_
      • lineNumber_

        private int lineNumber_
      • columnNumber_

        private int columnNumber_
    • Constructor Detail

      • Locator

        public Locator​(java.lang.String uri,
                       int line,
                       int column)
        Creates new LocatorImpl.
        Parameters:
        uri - the uri
        line - the lineNumber
        column - the columnNumber
    • Method Detail

      • getUri

        public java.lang.String getUri()
        Returns:
        the uri
      • setUri

        public void setUri​(java.lang.String uri)
        Set the uri to a new value.
        Parameters:
        uri - the new uri
      • getColumnNumber

        public int getColumnNumber()
        Return the column number where the current document event ends. Note that this is the column number of the first character after the text associated with the document event. The first column in a line is position 1.
        Returns:
        The column number, or -1 if none is available.
        See Also:
        getLineNumber()
      • setColumnNumber

        public void setColumnNumber​(int column)
        Set the columnNumber to a new value.
        Parameters:
        column - the new columnNumber
      • getLineNumber

        public int getLineNumber()
        Return the line number where the current document event ends. Note that this is the line position of the first character after the text associated with the document event.
        Returns:
        The line number, or -1 if none is available.
        See Also:
        getColumnNumber()
      • setLineNumber

        public void setLineNumber​(int line)
        Set the lineNumber to a new value.
        Parameters:
        line - the new lineNumber
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object