org.apache.fop.area

## Class Trait.ExternalLink

- java.lang.Object
- - org.apache.fop.area.Trait.ExternalLink

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    Trait

      public static class Trait.ExternalLink
      extends Object
      implements Serializable

  External Link trait structure
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExternalLink(String destination, boolean newWindow)` Constructs an ExternalLink object with the given destination

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getDestination()` Get the target/destination of the link
    `protected static Trait.ExternalLink` | `makeFromTraitValue(String traitValue)` Create an `ExternalLink` from a trait value/attribute value in the area tree
    `boolean` | `newWindow()` Check if the target has to be displayed in a new window
    `String` | `toString()` Return a String representation of the object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ExternalLink

          public ExternalLink(String destination,
                              boolean newWindow)

      Constructs an ExternalLink object with the given destination
      Parameters:
        `destination` - target of the link
        `newWindow` - true if the target should be opened in a new window

  - ### Method Detail

    - #### makeFromTraitValue

          protected static Trait.ExternalLink makeFromTraitValue(String traitValue)

      Create an `ExternalLink` from a trait value/attribute value in the area tree
      Parameters:
        `traitValue` - the value to use (should match the result of `toString()`
      Returns:
        an `ExternalLink` instance corresponding to the given value

    - #### getDestination

          public String getDestination()

      Get the target/destination of the link
      Returns:
        the destination of the link

    - #### newWindow

          public boolean newWindow()

      Check if the target has to be displayed in a new window
      Returns:
        `true` if the target has to be displayed in a new window

    - #### toString

          public String toString()

      Return a String representation of the object.
      Overrides:
        `toString` in class `Object`
      Returns:
        a `String` of the form "org.apache.fop.area.Trait.ExternalLink[dest=someURL,newWindow=false]"

Copyright © 2023 Apache Software Foundation. All rights reserved.