|
WUI : API |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.westofj.wui.Widget
org.westofj.wui.WAnchor
Renders an HTML link. The rendered link is client side, the link URL is
rendered into the generated display HTML directly. For an indirect link that
makes a call back to the server before redirecting the client to the target
URL, use WExternalLink
or WExternalPage
.
Constructor Summary | |
WAnchor()
Constructs an anchor widget. |
|
WAnchor(String text)
Constructs an anchor widget with the specified label. |
|
WAnchor(WDisplayable text)
Constructs an anchor widget with the specified label. |
Method Summary | |
Color |
getColor()
Returns the color of the anchor. |
WFont |
getFont()
Returns the font of the anchor. |
Color |
getLinkColor()
Returns the link color. |
WDisplayable |
getText()
Returns the label of the anchor widget. |
String |
getUrl()
Returns the target URL of the anchor. |
boolean |
isEnabled()
Returns true if the anchor is enabled, false otherwise. |
void |
render(WRunner runner,
WRenderContext context,
PrintWriter out)
Renders the widget to the display. |
void |
setColor(Color color)
Sets the color of the anchor. |
void |
setEnabled(boolean enabled)
Enables or disables the anchor. |
void |
setFont(WFont font)
Sets the font of the anchor. |
void |
setLinkColor(Color linkColor)
Sets the link color. |
void |
setText(String text)
Sets the label of the anchor. |
void |
setText(WDisplayable text)
Sets the label of the anchor. |
void |
setUrl(String url)
Sets the target URL. |
Methods inherited from class org.westofj.wui.Widget |
addChangeListener, getRunner, handleNoParams, handleParams, hasChangeListeners, removeChangeListener, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WAnchor()
public WAnchor(String text)
text
- the label of the anchor.public WAnchor(WDisplayable text)
text
- the label of the anchor.Method Detail |
public Color getColor()
public WFont getFont()
public Color getLinkColor()
public WDisplayable getText()
public String getUrl()
public boolean isEnabled()
public void render(WRunner runner, WRenderContext context, PrintWriter out) throws WRenderException
Widget
render
in class Widget
runner
- the current runner context.out
- the output for the display.
WRenderException
public void setColor(Color color)
color
- The color to set.public void setEnabled(boolean enabled)
enabled
- true if the anchor is enabled, false otherwise.public void setFont(WFont font)
font
- The font to set.public void setLinkColor(Color linkColor)
linkColor
- The linkColor to set.public void setText(String text)
text
- the label of the anchor.public void setText(WDisplayable text)
text
- The label of the anchor.public void setUrl(String url)
url
- the new target URL.
|
Copyright (c) 2003 West of J - All rights reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |