Class TextMarginFinder

  • All Implemented Interfaces:
    IEventListener

    public class TextMarginFinder
    extends java.lang.Object
    implements IEventListener
    This class allows you to find the rectangle which contains all the text in the given content stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void eventOccurred​(IEventData data, EventType type)
      Called when some event occurs during parsing a content stream.
      java.util.Set<EventType> getSupportedEvents()
      Provides the set of event types this listener supports.
      Rectangle getTextRectangle()
      Returns the common text rectangle, containing all the text found in the stream so far, ot null, if no text has been found yet.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • textRectangle

        private Rectangle textRectangle
    • Constructor Detail

      • TextMarginFinder

        public TextMarginFinder()
    • Method Detail

      • eventOccurred

        public void eventOccurred​(IEventData data,
                                  EventType type)
        Description copied from interface: IEventListener
        Called when some event occurs during parsing a content stream.
        Specified by:
        eventOccurred in interface IEventListener
        Parameters:
        data - Combines the data required for processing corresponding event type.
        type - Event type.
      • getSupportedEvents

        public java.util.Set<EventType> getSupportedEvents()
        Description copied from interface: IEventListener
        Provides the set of event types this listener supports. Returns null if all possible event types are supported.
        Specified by:
        getSupportedEvents in interface IEventListener
        Returns:
        Set of event types supported by this listener or null if all possible event types are supported.
      • getTextRectangle

        public Rectangle getTextRectangle()
        Returns the common text rectangle, containing all the text found in the stream so far, ot null, if no text has been found yet.
        Returns:
        common text rectangle