EchoPoint API - 3.0.0b5
App Webcontainer

echopoint
Class Anchor

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by echopoint.Anchor
All Implemented Interfaces:
Serializable, RenderIdSupport

public class Anchor
extends Component

A component that represents a HTML anchor tag. This component makes it easier to create regular HTML links without having to configure a Button component and an associated action listener. You can create a raw anchor tag using AbstractHtmlComponent implementations, but may find configuring styles not as convenient.

Note: Since anchor tags cannot be fully styled using in-line styles, this component does not offer the ability to configure styles for hover, active or visited.

The following shows sample usage of this component:

   import echopoint.Anchor;
   import nextapp.echo.app.Color;
   import nextapp.echo.app.Extent;
   import nextapp.echo.app.Font;

     ...
     final Anchor anchor = new Anchor();
     anchor.setUri( "https://echopoint.dev.java.net/" );
     anchor.setColor( new Color( 0x2f2f4f );
     anchor.setFont( new Font( Font.HELVETICA, Font.BOLD, new Extent( 10 ) ) );

     container.add( anchor );
 

Version:
$Id: Anchor.java 74 2008-10-26 00:14:00Z sptrakesh $
Author:
Rakesh 2008-10-23
See Also:
Serialized Form

Nested Class Summary
static class Anchor.Target
          The options for specifying the PROPERTY_TARGET property.
 
Field Summary
static String PROPERTY_TARGET
          The target for the anchor tag.
static String PROPERTY_TEXT
          The text that is to be hyper-linked.
static String PROPERTY_TOOL_TIP_TEXT
          The tooltip (title) for the anchor tag.
static String PROPERTY_URI
          The destination URI to which the anchor tag points.
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
Anchor()
           
 
Method Summary
 String getTarget()
          Return the target attribute for the anchor tag.
 String getText()
          Return the text that is to be hyper-linked.
 String getToolTipText()
          Return the tool tip text displayed for the anchor tag.
 String getUri()
          Return the URI to which the anchor tag points.
 void setTarget(Anchor.Target target)
          Set the value for the target attribute to be applied to the anchor tag.
 void setTarget(String target)
          Set the value for the target attribute to be applied to the anchor tag.
 void setText(String text)
          Set the value of the text that is to be displayed as hyper-linked.
 void setToolTipText(String toolTipText)
          Set the value of the tool tip text that is to be displayed.
 void setUri(String uri)
          Set the value of the URI to which the the anchor tag points.
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_TARGET

public static final String PROPERTY_TARGET
The target for the anchor tag. Use to control target window/frame.

See Also:
Constant Field Values

PROPERTY_TEXT

public static final String PROPERTY_TEXT
The text that is to be hyper-linked.

See Also:
Constant Field Values

PROPERTY_TOOL_TIP_TEXT

public static final String PROPERTY_TOOL_TIP_TEXT
The tooltip (title) for the anchor tag.

See Also:
Constant Field Values

PROPERTY_URI

public static final String PROPERTY_URI
The destination URI to which the anchor tag points.

See Also:
Constant Field Values
Constructor Detail

Anchor

public Anchor()
Method Detail

getTarget

public String getTarget()
Return the target attribute for the anchor tag.

Returns:
The target value.

setTarget

public void setTarget(String target)
Set the value for the target attribute to be applied to the anchor tag.

Parameters:
target - The value to set.
See Also:
setTarget(echopoint.Anchor.Target)

setTarget

public void setTarget(Anchor.Target target)
Set the value for the target attribute to be applied to the anchor tag. Use this method to specify standard target values.

Parameters:
target - The value to set.

getText

public String getText()
Return the text that is to be hyper-linked.

Returns:
The text that is to be hyper-linked.

setText

public void setText(String text)
Set the value of the text that is to be displayed as hyper-linked.

Parameters:
text - The value to set.

getToolTipText

public String getToolTipText()
Return the tool tip text displayed for the anchor tag.

Returns:
The tool tip text that is to be displayed.

setToolTipText

public void setToolTipText(String toolTipText)
Set the value of the tool tip text that is to be displayed.

Parameters:
toolTipText - The value to set.

getUri

public String getUri()
Return the URI to which the anchor tag points.

Returns:
The uri value.

setUri

public void setUri(String uri)
Set the value of the URI to which the the anchor tag points.

Parameters:
uri - The value to set.

EchoPoint API - 3.0.0b5
App Webcontainer