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

java.lang.Object
  extended byfi.hut.tml.xsmiles.gui.components.swing.SwingLabelCompound
All Implemented Interfaces:
java.util.EventListener, java.awt.event.TextListener, XCompound, XLabelCompound

public class SwingLabelCompound
extends java.lang.Object
implements XLabelCompound, java.awt.event.TextListener

A caption object

Author:
Mikko Honkala

Field Summary
protected  int axis
          the axis depends on the caption side CSS attribute
protected  SwingCaption caption
          the caption component
protected  java.lang.String captionSide
          the caption-side string
protected  XComponent component
          the component itself
protected  java.awt.Container container
          the top-level container, containing the caption and the content component
protected  double currentZoom
           
protected  boolean layoutDone
           
static int X_AXIS
          Specifies that components should be laid out left to right.
static int Y_AXIS
          Specifies that components should be laid out top to bottom.
 
Constructor Summary
SwingLabelCompound(XComponent comp, XCaption capt, java.lang.String captSide)
           
 
Method Summary
 void add(XComponent c)
           
protected  java.lang.String calculateAxis(java.lang.String cs)
           
protected  void createContainer()
          creates the main container
 java.awt.Component getComponent()
          Return the visual component for this extension element
 java.awt.Dimension getSize()
          Returns the size of this compound
 void init()
           
protected  void layoutComponent()
          layouts the component using the caption, content and the main container parts of the control
 void remove(XComponent c)
           
 void removeAll()
          Remove all components from conatiner.
 void setVisible(boolean v)
          Set this drawing area visible.
 void setZoom(double zoom)
          Set's this components zoom (1.0 is the default).
 void textValueChanged(java.awt.event.TextEvent e)
          Invoked when the value of the text has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caption

protected SwingCaption caption
the caption component


component

protected XComponent component
the component itself


captionSide

protected java.lang.String captionSide
the caption-side string


container

protected java.awt.Container container
the top-level container, containing the caption and the content component


axis

protected int axis
the axis depends on the caption side CSS attribute


layoutDone

protected boolean layoutDone

currentZoom

protected double currentZoom

X_AXIS

public static final int X_AXIS
Specifies that components should be laid out left to right.

See Also:
Constant Field Values

Y_AXIS

public static final int Y_AXIS
Specifies that components should be laid out top to bottom.

See Also:
Constant Field Values
Constructor Detail

SwingLabelCompound

public SwingLabelCompound(XComponent comp,
                          XCaption capt,
                          java.lang.String captSide)
Method Detail

init

public void init()

createContainer

protected void createContainer()
creates the main container


layoutComponent

protected void layoutComponent()
layouts the component using the caption, content and the main container parts of the control


calculateAxis

protected java.lang.String calculateAxis(java.lang.String cs)

setZoom

public void setZoom(double zoom)
Set's this components zoom (1.0 is the default).

Specified by:
setZoom in interface XCompound

getComponent

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

Specified by:
getComponent in interface XCompound

getSize

public java.awt.Dimension getSize()
Description copied from interface: XCompound
Returns the size of this compound

Specified by:
getSize in interface XCompound

setVisible

public void setVisible(boolean v)
Set this drawing area visible.

Specified by:
setVisible in interface XCompound
Parameters:
v - true=visible, false=invisible

add

public void add(XComponent c)
Specified by:
add in interface XCompound
Parameters:
c - The component to be added

remove

public void remove(XComponent c)
Specified by:
remove in interface XCompound
Parameters:
c - Remove component c

removeAll

public void removeAll()
Remove all components from conatiner.

Specified by:
removeAll in interface XCompound

textValueChanged

public void textValueChanged(java.awt.event.TextEvent e)
Invoked when the value of the text has changed. The code written for this method performs the operations that need to occur when text changes.

Specified by:
textValueChanged in interface java.awt.event.TextListener


X-Smiles 1.2