Documentation of 'org.jdesktop.swingx.hyperlink.LinkModel' Java class
LinkModel
org.jdesktop.swingx.hyperlink

Class LinkModel

  • All Implemented Interfaces:
    java.lang.Comparable
    Direct Known Subclasses:
    XDemoUtilities.XLinkModel


    public class LinkModel
    extends java.lang.Object
    implements java.lang.Comparable
    An bean which represents an URL link. Text, URL and visited are bound properties. Compares by Text.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String VISITED_PROPERTY 
    • Constructor Summary

      Constructors 
      Constructor and Description
      LinkModel() 
      LinkModel(java.lang.String text) 
      LinkModel(java.lang.String text, java.lang.String target, java.lang.String template, java.lang.String[] args) 
      LinkModel(java.lang.String text, java.lang.String target, java.net.URL url) 
    • Field Detail

      • VISITED_PROPERTY

        public static final java.lang.String VISITED_PROPERTY
        See Also:
        Constant Field Values
    • Constructor Detail

      • LinkModel

        public LinkModel(java.lang.String text,
                         java.lang.String target,
                         java.net.URL url)
        Parameters:
        text -
        target -
        url -
      • LinkModel

        public LinkModel()
      • LinkModel

        public LinkModel(java.lang.String text)
      • LinkModel

        public LinkModel(java.lang.String text,
                         java.lang.String target,
                         java.lang.String template,
                         java.lang.String[] args)
        Parameters:
        text - text to that a renderer would display
        target - the target that a URL should load into.
        template - a string that represents a URL with &{N} place holders for string substitution
        args - an array of strings which will be used for substitition
    • Method Detail

      • setText

        public void setText(java.lang.String text)
        Set the display text.
      • getText

        public java.lang.String getText()
      • setURLString

        public void setURLString(java.lang.String howToURLString)
      • setURL

        public void setURL(java.net.URL url)
        Set the url and resets the visited flag. Think: keep list of visited urls here?
      • getURL

        public java.net.URL getURL()
      • setTarget

        public void setTarget(java.lang.String target)
        Set the target that the URL should load into. This can be a uri representing another control or the name of a window or special targets. See: http://www.w3c.org/TR/html401/present/frames.html#adef-target
      • getTarget

        public java.lang.String getTarget()
        Return the target for the URL.
        Returns:
        value of the target. If null then "_blank" will be returned.
      • setVisited

        public void setVisited(boolean visited)
        Sets a flag to indicate if the link has been visited. The state of this flag can be used to render the color of the link.
      • getVisited

        public boolean getVisited()
      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
      • compareTo

        public int compareTo(java.lang.Object obj)
        Specified by:
        compareTo in interface java.lang.Comparable
      • 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

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.