public class LinkModel extends Object implements Comparable
Modifier and Type | Field and Description |
---|---|
static String |
VISITED_PROPERTY |
Constructor and Description |
---|
LinkModel() |
LinkModel(String text) |
LinkModel(String text,
String target,
String template,
String[] args) |
LinkModel(String text,
String target,
URL url) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener l) |
int |
compareTo(Object obj) |
boolean |
equals(Object obj) |
protected void |
firePropertyChange(String property,
boolean oldValue,
boolean newValue) |
protected void |
firePropertyChange(String property,
Object oldValue,
Object newValue) |
String |
getTarget()
Return the target for the URL.
|
String |
getText() |
URL |
getURL() |
boolean |
getVisited() |
int |
hashCode() |
void |
removePropertyChangeListener(PropertyChangeListener l) |
void |
setTarget(String target)
Set the target that the URL should load into.
|
void |
setText(String text)
Set the display text.
|
void |
setURL(URL url)
Set the url and resets the visited flag.
|
void |
setURLString(String howToURLString) |
void |
setVisited(boolean visited)
Sets a flag to indicate if the link has been visited.
|
String |
toString() |
public static final String VISITED_PROPERTY
public LinkModel()
public LinkModel(String text)
public LinkModel(String text, String target, String template, String[] args)
text
- text to that a renderer would displaytarget
- the target that a URL should load into.template
- a string that represents a URL with
&{N} place holders for string substitutionargs
- an array of strings which will be used for substititionpublic void setText(String text)
public String getText()
public void setURLString(String howToURLString)
public void setURL(URL url)
public URL getURL()
public void setTarget(String target)
public String getTarget()
public void setVisited(boolean visited)
public boolean getVisited()
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
protected void firePropertyChange(String property, Object oldValue, Object newValue)
protected void firePropertyChange(String property, boolean oldValue, boolean newValue)
public int compareTo(Object obj)
compareTo
in interface Comparable
Copyright © 2013. All Rights Reserved.