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

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.general.ComponentBase
      extended byfi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
          extended byfi.hut.tml.xsmiles.gui.components.swing.SwingCaption
All Implemented Interfaces:
XCaption, XComponent

public class SwingCaption
extends SwingStylableComponent
implements XCaption

A caption object

Author:
Mikko Honkala

Nested Class Summary
 class SwingCaption.NonFocusableLabel
          non - focusable JTextField to be used as a caption
 
Field Summary
protected  SwingCaption.NonFocusableLabel caption
          the caption component
protected static java.awt.Dimension labelMinSize
           
protected  java.awt.Dimension myMinSize
           
protected  java.util.Vector textListeners
          the text listeners of this caption
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.swing.SwingStylableComponent
HELPKEY
 
Fields inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
content, currentFont, currentZoom, defaultBGColor, defaultFont, defaultSize, fInputMode, hintText, minSize, style
 
Constructor Summary
SwingCaption(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()
           
 void init()
           
 boolean isCaption()
           
 void removeTextListener(java.awt.event.TextListener tl)
           
 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.swing.SwingStylableComponent
addHelpListener, createHint, getFormatter, removeHelpListener, setBackground, setHintRecursively, setHintText, sizeComponent
 
Methods inherited from class fi.hut.tml.xsmiles.gui.components.general.ComponentBase
addActionListener, addFocusListener, addMouseListener, getAddableComponent, getComponent, getDefaultSize, getEnabled, getHeight, getPreferredSize, 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
 

Field Detail

caption

protected SwingCaption.NonFocusableLabel caption
the caption component


labelMinSize

protected static final java.awt.Dimension labelMinSize

myMinSize

protected java.awt.Dimension myMinSize

textListeners

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

Constructor Detail

SwingCaption

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

init

public void init()
Overrides:
init in class SwingStylableComponent

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()
Overrides:
isCaption in class SwingStylableComponent

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


X-Smiles 1.2