fi.hut.tml.xsmiles.gui.components.havi
Class HaviCaption

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.havi.HaviStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.havi.HaviCaption
All Implemented Interfaces:
XCaption, XComponent

public class HaviCaption
extends HaviStylableComponent
implements XCaption

A caption object

Author:
Mikko Honkala

Nested Class Summary
 class HaviCaption.NonFocusableLabel
          non - focusable JTextField to be used as a caption
 
Field Summary
protected  HaviCaption.NonFocusableLabel caption
          the caption component
protected static java.awt.Dimension labelMinSize
           
protected  java.awt.Dimension myMinSize
           
protected  java.lang.String textContent
           
protected  java.util.Vector textListeners
          the text listeners of this caption
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, minSize, style
 
Constructor Summary
HaviCaption(java.lang.String text)
           
 
Method Summary
 void addTextListener(java.awt.event.TextListener tl)
           
 java.awt.Color getDefaultBackgroundColor()
          the default background color for this type of component null = transparent.
 java.awt.Dimension getMinimumSize()
          return the minimum size for this component at zoom level 1.0
 java.lang.String getText()
           
 boolean isCaption()
           
 void removeTextListener(java.awt.event.TextListener tl)
           
 void setEnabled(boolean value)
           
 void setMinimumSize(java.awt.Dimension min)
          set the minimum size of this component
 void setText(java.lang.String text)
           
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.havi.HaviStylableComponent
setBackground
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addFocusListener, addHelpListener, addMouseListener, getAddableComponent, getComponent, getDefaultSize, getEnabled, getFormatter, getHeight, getPreferredSize, getSizableComponent, getSize, getStylableComponent, getStyle, getWidth, getX, getY, removeActionListener, removeFocusListener, removeHelpListener, removeMouseListener, setBounds, setDefaultSize, setFocus, setFont, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom, sizeComponent, 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, setFocus, setForeground, setHintText, setInputMode, setStyle, setVisible, setZoom
 

Field Detail

caption

protected HaviCaption.NonFocusableLabel caption
the caption component


labelMinSize

protected static final java.awt.Dimension labelMinSize

myMinSize

protected java.awt.Dimension myMinSize

textContent

protected java.lang.String textContent

textListeners

protected java.util.Vector textListeners
the text listeners of this caption

Constructor Detail

HaviCaption

public HaviCaption(java.lang.String text)
Method Detail

getMinimumSize

public java.awt.Dimension getMinimumSize()
Description copied from class: ComponentBase
return the minimum size for this component at zoom level 1.0

Overrides:
getMinimumSize in class ComponentBase

setMinimumSize

public void setMinimumSize(java.awt.Dimension min)
Description copied from interface: XCaption
set the minimum size of this component

Specified by:
setMinimumSize in interface XCaption

getDefaultBackgroundColor

public java.awt.Color getDefaultBackgroundColor()
Description copied from class: ComponentBase
the default background color for this type of component null = transparent.

Overrides:
getDefaultBackgroundColor in class ComponentBase

isCaption

public boolean isCaption()

getText

public java.lang.String getText()
Specified by:
getText in interface XCaption

setText

public void setText(java.lang.String text)
Specified by:
setText in interface XCaption

addTextListener

public void addTextListener(java.awt.event.TextListener tl)
Specified by:
addTextListener in interface XCaption

removeTextListener

public void removeTextListener(java.awt.event.TextListener tl)
Specified by:
removeTextListener in interface XCaption

setEnabled

public void setEnabled(boolean value)
Specified by:
setEnabled in interface XComponent
Overrides:
setEnabled in class ComponentBase
Parameters:
value - Active or not active


X-Smiles 1.2