org.eclipse.ecf.ui.hyperlink
Class AbstractURLHyperlink

java.lang.Object
  extended by org.eclipse.ecf.ui.hyperlink.AbstractURLHyperlink
All Implemented Interfaces:
org.eclipse.jface.text.hyperlink.IHyperlink

public abstract class AbstractURLHyperlink
extends java.lang.Object
implements org.eclipse.jface.text.hyperlink.IHyperlink

Abstract class for representing ECF URL hyperlinks. This class can be subclassed to create an URL hyperlink specifically for accessing ECF protocols. For example, and XMPPURLHyperlink subclass can be created to open URLs of the form:

xmpp://foo@bar.com


Constructor Summary
AbstractURLHyperlink(org.eclipse.jface.text.IRegion region, java.net.URI uri)
          Creates a new URL hyperlink.
 
Method Summary
protected abstract  IConnectWizard createConnectWizard()
          Create a connect wizard for this hyperlink.
protected abstract  IContainer createContainer()
           
 org.eclipse.jface.text.IRegion getHyperlinkRegion()
           
 java.lang.String getHyperlinkText()
           
protected  org.eclipse.jface.text.IRegion getRegion()
           
 java.lang.String getTypeLabel()
           
protected  java.net.URI getURI()
           
 java.lang.String getURLString()
          Returns the URL string of this hyperlink.
 void open()
           
protected  void setHyperlinkText(java.lang.String hyperlinkText)
           
protected  void setRegion(org.eclipse.jface.text.IRegion region)
           
protected  void setTypeLabel(java.lang.String typeLabel)
           
protected  void setURI(java.net.URI uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractURLHyperlink

public AbstractURLHyperlink(org.eclipse.jface.text.IRegion region,
                            java.net.URI uri)
Creates a new URL hyperlink.

Parameters:
region -
uri -
Method Detail

getURI

protected java.net.URI getURI()

setURI

protected void setURI(java.net.URI uri)

getRegion

protected org.eclipse.jface.text.IRegion getRegion()

setRegion

protected void setRegion(org.eclipse.jface.text.IRegion region)

setTypeLabel

protected void setTypeLabel(java.lang.String typeLabel)

createContainer

protected abstract IContainer createContainer()
                                       throws ContainerCreateException
Throws:
ContainerCreateException

createConnectWizard

protected abstract IConnectWizard createConnectWizard()
Create a connect wizard for this hyperlink. Subclasses must implement this method to return a non-null instance of IConnectWizard when this method is called (during open().

Returns:
non-null instance implementing IConnectWizard.

getHyperlinkRegion

public org.eclipse.jface.text.IRegion getHyperlinkRegion()
Specified by:
getHyperlinkRegion in interface org.eclipse.jface.text.hyperlink.IHyperlink

getTypeLabel

public java.lang.String getTypeLabel()
Specified by:
getTypeLabel in interface org.eclipse.jface.text.hyperlink.IHyperlink

getHyperlinkText

public java.lang.String getHyperlinkText()
Specified by:
getHyperlinkText in interface org.eclipse.jface.text.hyperlink.IHyperlink

getURLString

public java.lang.String getURLString()
Returns the URL string of this hyperlink.

Returns:
the URL string
Since:
3.2

setHyperlinkText

protected void setHyperlinkText(java.lang.String hyperlinkText)
Parameters:
hyperlinkText - the hyperlinkText to set

open

public void open()
Specified by:
open in interface org.eclipse.jface.text.hyperlink.IHyperlink