fi.hut.tml.xsmiles.gui.components.swing
Class SwingLink

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.swing.SwingLink
All Implemented Interfaces:
XComponent, XLinkComponent

public class SwingLink
extends AWTStylableComponent
implements XLinkComponent

Default desktop lightweight linkcomponent.

Author:
Juha, Mikko Honkala

Nested Class Summary
 class SwingLink.InvisibleComponent
           
 class SwingLink.MouseHandler
           
 
Field Summary
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
hiddenFrame
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, minSize, style
 
Constructor Summary
SwingLink()
           
 
Method Summary
 void addClickedActionListener(java.awt.event.ActionListener al)
           
 void addHoverListener(XHoverListener fl)
           
 void focusGained()
           
 void focusLost()
           
 java.lang.String getDestination()
           
 java.lang.String getLabel()
           
 void init()
           
 boolean isActive()
          Is link active
 boolean isFocusTraversable()
           
 void layoutComponent()
           
 void openAction(java.awt.event.MouseEvent e)
           
 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.AWTStylableComponent
addHelpListener, createHint, getHiddenFrame, getPreferredSize, isCaption, removeHelpListener, setBackground, setHintRecursively, setHintText, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addFocusListener, addMouseListener, getAddableComponent, getComponent, getDefaultBackgroundColor, getDefaultSize, getEnabled, getFormatter, getHeight, getMinimumSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeMouseListener, setBounds, setDefaultSize, setEnabled, setFocus, setFont, setForeground, setInputMode, setStyle, setVisible, setZoom, sizeComponent
 
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, getComponent, getEnabled, getHeight, getSize, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeHelpListener, removeMouseListener, setBackground, setBounds, setEnabled, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Constructor Detail

SwingLink

public SwingLink()
Method Detail

init

public void init()
Overrides:
init in class AWTStylableComponent

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()

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(java.awt.event.MouseEvent e)

focusLost

public void focusLost()

focusGained

public void focusGained()


X-Smiles 1.2