com.taco.swinger.text2gui
Class LayoutAndComponentAddStrategy

java.lang.Object
  extended by com.taco.swinger.text2gui.LayoutAndComponentAddStrategy
All Implemented Interfaces:
ILayoutAndComponentAddStrategy

public class LayoutAndComponentAddStrategy
extends java.lang.Object
implements ILayoutAndComponentAddStrategy

The default implementation of ILayoutAndComponentAddStrategy that simply passes the constraint string to Container.add().


Field Summary
protected  java.awt.LayoutManager _layout
          The layout manager associated with this instance.
 
Constructor Summary
LayoutAndComponentAddStrategy(java.awt.LayoutManager layout)
          Construct a new instance that returns the argument layout when layoutManager() is called.
 
Method Summary
 void addComponent(java.awt.Container container, java.awt.Component component, java.lang.String constraintString)
          Add component to container using Container.add(), passing the argument string as the constraints parameter if non-null.
 java.awt.LayoutManager layoutManager()
          Return the layout manager passed to the constructor.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_layout

protected java.awt.LayoutManager _layout
The layout manager associated with this instance.

Constructor Detail

LayoutAndComponentAddStrategy

public LayoutAndComponentAddStrategy(java.awt.LayoutManager layout)
Construct a new instance that returns the argument layout when layoutManager() is called.

Method Detail

layoutManager

public java.awt.LayoutManager layoutManager()
Return the layout manager passed to the constructor.

Specified by:
layoutManager in interface ILayoutAndComponentAddStrategy

addComponent

public void addComponent(java.awt.Container container,
                         java.awt.Component component,
                         java.lang.String constraintString)
Add component to container using Container.add(), passing the argument string as the constraints parameter if non-null.

Specified by:
addComponent in interface ILayoutAndComponentAddStrategy

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object