fi.hut.tml.xsmiles.gui.components.awt
Class AWTLink

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.awt.ComponentWithCaption
      extended byfi.hut.tml.xsmiles.gui.components.awt.AWTComponent
          extended byfi.hut.tml.xsmiles.gui.components.awt.AWTLink
All Implemented Interfaces:
XComponent, XLinkComponent

public class AWTLink
extends AWTComponent
implements XLinkComponent

Default desktop lightweight linkcomponent.

Author:
Juha, Mikko Honkala

Nested Class Summary
 class AWTLink.InvisibleComponent
           
 class AWTLink.MouseHandler
           
 
Field Summary
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.awt.AWTComponent
fInputMode
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.awt.ComponentWithCaption
actionable, axis, caption, container, content, currentZoom, layoutDone, X_AXIS, Y_AXIS
 
Constructor Summary
AWTLink()
           
 
Method Summary
 void addClickedActionListener(java.awt.event.ActionListener al)
           
 void addHoverListener(XHoverListener fl)
           
 void focusGained()
           
 void focusLost()
           
 java.awt.Component getComponent()
          Return the visual component for this extension element
 java.lang.String getDestination()
           
 boolean getEnabled()
           
 java.lang.String getLabel()
           
 void init()
          in init the subclass always creates its component first and then calls super.init
 boolean isActive()
          Is link active
 boolean isFocusTraversable()
           
 void layoutComponent()
          layouts the component using the caption, content and the main container parts of the control
 void openAction()
           
 void paint(java.awt.Graphics g)
          Draw a rectangle around the active link, if in Digitv GUI
 void setActive(boolean val)
          Sets active flag
 void setDestination(java.lang.String dest)
           
 void setLabel(java.lang.String l)
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.awt.AWTComponent
addCaption, createHint, setHintText, setInputMode, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.awt.ComponentWithCaption
addActionListener, addFocusListener, addHelpListener, addMouseListener, getActionable, getDefaultBackgroundColor, getHeight, getMinimumSize, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeHelpListener, removeMouseListener, setActionable, setBackground, setBounds, setCaptionStyle, setCaptionText, setEnabled, setFocus, setFont, setForeground, setStyle, setVisible, setZoom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.gui.components.XComponent
addActionListener, addFocusListener, addHelpListener, addMouseListener, getHeight, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Constructor Detail

AWTLink

public AWTLink()
Method Detail

init

public void init()
Description copied from class: AWTComponent
in init the subclass always creates its component first and then calls super.init

Overrides:
init in class AWTComponent

getComponent

public java.awt.Component getComponent()
Description copied from interface: XComponent
Return the visual component for this extension element

Specified by:
getComponent in interface XComponent
Overrides:
getComponent in class ComponentWithCaption

isFocusTraversable

public boolean isFocusTraversable()

setDestination

public void setDestination(java.lang.String dest)
Specified by:
setDestination in interface XLinkComponent
Parameters:
dest - Set the destination

getDestination

public java.lang.String getDestination()
Specified by:
getDestination in interface XLinkComponent
Returns:
The destination where the link points to

setLabel

public void setLabel(java.lang.String l)

getLabel

public java.lang.String getLabel()

paint

public void paint(java.awt.Graphics g)
Draw a rectangle around the active link, if in Digitv GUI

Parameters:
g - ...

layoutComponent

public void layoutComponent()
Description copied from class: ComponentWithCaption
layouts the component using the caption, content and the main container parts of the control

Overrides:
layoutComponent in class ComponentWithCaption

setActive

public void setActive(boolean val)
Sets active flag

Specified by:
setActive in interface XLinkComponent
Parameters:
val - true or false

isActive

public boolean isActive()
Is link active

Returns:
true if active

addClickedActionListener

public void addClickedActionListener(java.awt.event.ActionListener al)
Specified by:
addClickedActionListener in interface XLinkComponent

addHoverListener

public void addHoverListener(XHoverListener fl)
Specified by:
addHoverListener in interface XLinkComponent
Parameters:
fl - Receive event when link has pointer focus or when it is lost

openAction

public void openAction()

focusLost

public void focusLost()

focusGained

public void focusGained()

getEnabled

public boolean getEnabled()
Specified by:
getEnabled in interface XComponent
Returns:


X-Smiles 1.2