info.joseluismartin.gui.form
Class SimpleBoxFormBuilder

java.lang.Object
  extended by info.joseluismartin.gui.form.SimpleBoxFormBuilder

public class SimpleBoxFormBuilder
extends Object

A FormBuilder that create form using BoxLayouts Add components using a implicit cursor.

Author:
Jose Luis Martin - (jlm@joseluismartin.info)

Field Summary
static int SIZE_UNDEFINED
           
 
Constructor Summary
SimpleBoxFormBuilder()
          Default Ctor
SimpleBoxFormBuilder(Border border)
           
SimpleBoxFormBuilder(int defaultRowHeight)
           
SimpleBoxFormBuilder(int defaultRowHeight, Border border)
           
 
Method Summary
 void add(Component c)
          Add a component to Form at position pointer by cursor, Increments cursor by one.
 void add(Component c, int maxWidth)
           
 void add(String name, Component c)
          Add a component with label, increments cursor by two.
 void addBox(Component c)
           
 Border getBorder()
           
 int getCharWidth()
           
 int getDefaultRowHeight()
           
 int getDefaultSpace()
           
 JComponent getForm()
          Builds the panel form.
 int getHeight()
           
 org.springframework.context.MessageSource getMessageSource()
           
 boolean isDebug()
           
 boolean isFixedHeight()
           
 void next()
           
 void reset()
          Reset the form builder to reuse for creating a new panel
 void row()
           
 void row(int rowHeight)
          Move cursor to next row.
 void setBorder(Border border)
           
 void setCharWidth(int charWidth)
           
 void setDebug(boolean debug)
           
 void setDefaultRowHeight(int defaultRowHeight)
           
 void setDefaultSpace(int defaultSpace)
           
 void setFixedHeight(boolean fixedHeight)
           
 void setHeight(int height)
           
 void setMaxWidth(int i)
           
 void setMessageSource(org.springframework.context.MessageSource messageSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SIZE_UNDEFINED

public static final int SIZE_UNDEFINED
See Also:
Constant Field Values
Constructor Detail

SimpleBoxFormBuilder

public SimpleBoxFormBuilder()
Default Ctor


SimpleBoxFormBuilder

public SimpleBoxFormBuilder(Border border)

SimpleBoxFormBuilder

public SimpleBoxFormBuilder(int defaultRowHeight)

SimpleBoxFormBuilder

public SimpleBoxFormBuilder(int defaultRowHeight,
                            Border border)
Method Detail

add

public void add(Component c)
Add a component to Form at position pointer by cursor, Increments cursor by one.

Parameters:
c - Component to add

add

public void add(Component c,
                int maxWidth)

addBox

public void addBox(Component c)

add

public void add(String name,
                Component c)
Add a component with label, increments cursor by two.

Parameters:
name - label string
c - component.

setMaxWidth

public void setMaxWidth(int i)
Parameters:
i -

row

public void row()

row

public void row(int rowHeight)
Move cursor to next row.


getForm

public JComponent getForm()
Builds the panel form.

Returns:
the form component

reset

public void reset()
Reset the form builder to reuse for creating a new panel


next

public void next()

getHeight

public int getHeight()

setHeight

public void setHeight(int height)

isDebug

public boolean isDebug()

setDebug

public void setDebug(boolean debug)

getMessageSource

public org.springframework.context.MessageSource getMessageSource()

setMessageSource

public void setMessageSource(org.springframework.context.MessageSource messageSource)

isFixedHeight

public boolean isFixedHeight()
Returns:
the fixedHeight

setFixedHeight

public void setFixedHeight(boolean fixedHeight)
Parameters:
fixedHeight - the fixedHeight to set

getDefaultRowHeight

public int getDefaultRowHeight()
Returns:
the defaultRowHeight

setDefaultRowHeight

public void setDefaultRowHeight(int defaultRowHeight)
Parameters:
defaultRowHeight - the defaultRowHeight to set

getBorder

public Border getBorder()
Returns:
the border

setBorder

public void setBorder(Border border)
Parameters:
border - the border to set

getDefaultSpace

public int getDefaultSpace()
Returns:
the defaultSpace

setDefaultSpace

public void setDefaultSpace(int defaultSpace)
Parameters:
defaultSpace - the defaultSpace to set

getCharWidth

public int getCharWidth()
Returns:
the charWidth

setCharWidth

public void setCharWidth(int charWidth)
Parameters:
charWidth - the charWidth to set


Copyright © 2013 JDAL. All Rights Reserved.