kaos.kpat.gui.hypertext
Class HTComponentImpl

java.lang.Object
  extended by kaos.kpat.gui.hypertext.HTComponentImpl
All Implemented Interfaces:
HyperlinkListener, HypertextComponent
Direct Known Subclasses:
HTComboBox, HTLabel, HTLink, HTTextField, HypertextContainerImpl

public abstract class HTComponentImpl
extends java.lang.Object
implements HypertextComponent

Author:
jlott

Field Summary
protected  java.awt.Component _displayComponent
           
protected  java.lang.String _id
           
protected  java.util.HashSet _listeners
           
protected  HypertextComponent _peer
           
protected  javax.swing.JPopupMenu _popup
           
protected  java.lang.String _prefix
           
protected  java.lang.String _suffix
           
protected  HypertextEditor _templateEditor
           
protected  java.lang.String _templateLinkId
           
protected  java.lang.String _templateLinkName
           
static java.lang.String TEMPLATE_LINK_ID
           
static java.lang.String VISITED_LINK_RGB
           
 
Constructor Summary
HTComponentImpl()
           
 
Method Summary
 void addListener(HypertextListener listener)
           
protected  void fireTextChanged()
           
 java.awt.Component getDisplayComponent()
           
 java.lang.String getDisplayText()
           
 java.lang.String getId()
           
 HypertextContainer getParent()
           
 javax.swing.JPopupMenu getPopupMenu()
           
 java.lang.String getPrefix()
           
 java.awt.Point getRelativeLocation()
           
 java.lang.Object getState()
           
 java.lang.String getTemplateLink()
           
 void removeListener(HypertextListener listener)
           
 void setDisplayComponent(java.awt.Component c)
           
 void setDlgLocation(javax.swing.JDialog dlg)
           
 void setFontSize(int pointSize)
           
 void setId(java.lang.String id)
          Necessary when editing a policy with multiple conditions using role value maps so we know which property maps to which RVM.
 void setParent(HypertextContainer parent)
           
 void setPeer(HypertextComponent peer)
           
 void setPopupMenu(javax.swing.JPopupMenu popup)
           
 void setPrefix(java.lang.String prefix)
           
 void setState(java.lang.Object state)
           
 void setSuffix(java.lang.String suffix)
           
 void setTemplateEditor(HypertextEditor editor)
           
 void setTemplateLink(HypertextEditor editor, java.lang.String linkId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface kaos.kpat.gui.hypertext.HypertextComponent
getText
 
Methods inherited from interface kaos.kpat.gui.hypertext.HyperlinkListener
hyperlinkSelected
 

Field Detail

TEMPLATE_LINK_ID

public static final java.lang.String TEMPLATE_LINK_ID
See Also:
Constant Field Values

_peer

protected HypertextComponent _peer

VISITED_LINK_RGB

public static final java.lang.String VISITED_LINK_RGB
See Also:
Constant Field Values

_templateLinkName

protected java.lang.String _templateLinkName

_templateEditor

protected HypertextEditor _templateEditor

_templateLinkId

protected java.lang.String _templateLinkId

_displayComponent

protected java.awt.Component _displayComponent

_prefix

protected java.lang.String _prefix

_suffix

protected java.lang.String _suffix

_popup

protected javax.swing.JPopupMenu _popup

_listeners

protected java.util.HashSet _listeners

_id

protected java.lang.String _id
Constructor Detail

HTComponentImpl

public HTComponentImpl()
Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface HypertextComponent

setId

public void setId(java.lang.String id)
Necessary when editing a policy with multiple conditions using role value maps so we know which property maps to which RVM. When such a component is created from the RVM definition, its id is set to match the ID stored in the role value map.

Parameters:
id -

addListener

public void addListener(HypertextListener listener)
Specified by:
addListener in interface HypertextComponent

removeListener

public void removeListener(HypertextListener listener)
Specified by:
removeListener in interface HypertextComponent

setFontSize

public void setFontSize(int pointSize)

getDisplayText

public java.lang.String getDisplayText()
Specified by:
getDisplayText in interface HypertextComponent

fireTextChanged

protected void fireTextChanged()

getDisplayComponent

public java.awt.Component getDisplayComponent()
Specified by:
getDisplayComponent in interface HypertextComponent

setDisplayComponent

public void setDisplayComponent(java.awt.Component c)
Specified by:
setDisplayComponent in interface HypertextComponent

setPeer

public void setPeer(HypertextComponent peer)
Specified by:
setPeer in interface HypertextComponent

setParent

public void setParent(HypertextContainer parent)
Specified by:
setParent in interface HypertextComponent

getParent

public HypertextContainer getParent()
Specified by:
getParent in interface HypertextComponent

setPopupMenu

public void setPopupMenu(javax.swing.JPopupMenu popup)

getPopupMenu

public javax.swing.JPopupMenu getPopupMenu()

getRelativeLocation

public java.awt.Point getRelativeLocation()

setTemplateEditor

public void setTemplateEditor(HypertextEditor editor)
Specified by:
setTemplateEditor in interface HypertextComponent

setTemplateLink

public void setTemplateLink(HypertextEditor editor,
                            java.lang.String linkId)
Specified by:
setTemplateLink in interface HypertextComponent

getTemplateLink

public java.lang.String getTemplateLink()
Specified by:
getTemplateLink in interface HypertextComponent

getState

public java.lang.Object getState()
                          throws KAoSPolicyBuilder.PolicyBuildingNotCompleted
Specified by:
getState in interface HypertextComponent
Throws:
KAoSPolicyBuilder.PolicyBuildingNotCompleted

setState

public void setState(java.lang.Object state)
Specified by:
setState in interface HypertextComponent

setPrefix

public void setPrefix(java.lang.String prefix)
Specified by:
setPrefix in interface HypertextComponent

getPrefix

public java.lang.String getPrefix()
Specified by:
getPrefix in interface HypertextComponent

setSuffix

public void setSuffix(java.lang.String suffix)
Specified by:
setSuffix in interface HypertextComponent

setDlgLocation

public void setDlgLocation(javax.swing.JDialog dlg)