com.arctorus.documents
Class Run

java.lang.Object
  extended by com.arctorus.documents.Run

public final class Run
extends java.lang.Object

Block of text with the same formatting.

New created Run has default properties:

  • font name - Arial
  • size - 14pt
  • color - black


    Constructor Summary
    Run(java.lang.String text)
              Create new text run with default formatting.
     
    Method Summary
     boolean equals(java.lang.Object obj)
              Indicates whether some other object is "equal to" this one.
     Hyperlink getHyperlink()
              Get hyperlink added to a run.
     java.lang.String getText()
              Get text of a run.
     TextFormat getTextFormat()
              Get format of a text in a run.
     int hashCode()
              Returns a hash code value for the object.
     boolean hasHyperlink()
              Determines whether the run has hyperlink.
     void setHyperlink(Hyperlink hyperlink)
              Set hyperlink to a run.
     void setText(java.lang.String text)
              Set text of a run.
     void setTextFormat(TextFormat textFormat)
              Set format of a text in a run.
     
    Methods inherited from class java.lang.Object
    getClass, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    Run

    public Run(java.lang.String text)
    Create new text run with default formatting.

    Parameters:
    text - new text to add.
    Method Detail

    getText

    public java.lang.String getText()
    Get text of a run.


    setText

    public void setText(java.lang.String text)
    Set text of a run.

    Parameters:
    text - new text.

    getTextFormat

    public TextFormat getTextFormat()
    Get format of a text in a run.


    setTextFormat

    public void setTextFormat(TextFormat textFormat)
    Set format of a text in a run.

    Parameters:
    textFormat - new text format. If textFormat is null then it is not change anything.

    hasHyperlink

    public boolean hasHyperlink()
    Determines whether the run has hyperlink.


    getHyperlink

    public Hyperlink getHyperlink()
    Get hyperlink added to a run. Hyperlink.NULL if hyperlink is not set to a run.


    setHyperlink

    public void setHyperlink(Hyperlink hyperlink)
    Set hyperlink to a run.

    Parameters:
    hyperlink - new hyperlink.

    hashCode

    public int hashCode()
    Returns a hash code value for the object.

    Overrides:
    hashCode in class java.lang.Object

    equals

    public boolean equals(java.lang.Object obj)
    Indicates whether some other object is "equal to" this one.

    Overrides:
    equals in class java.lang.Object