fi.hut.tml.xsmiles.gui.components.swing
Class SwingLink
java.lang.Object
fi.hut.tml.xsmiles.gui.components.general.ComponentBase
fi.hut.tml.xsmiles.gui.components.awt.AWTStylableComponent
fi.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
| 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 |
SwingLink
public SwingLink()
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