util
Class  FormTools
java.lang.Object
  |
  +--util.FormTools
- public class FormTools- extends Object
contains helper methods forms
 
| Method Summary | 
| static XLoadable | bindForm(XTextDocument aDoc)
 | 
| static XLoadable | bindForm(XTextDocument aDoc,
         String formName)
 | 
| static XLoadable | bindForm(XTextDocument aDoc,
         String sourceName,
         String tableName)Binds
 'Standard'form ofaDocWriter document
 to thetableNametable ofsourceNameData Source. | 
| static XLoadable | bindForm(XTextDocument aDoc,
         String formName,
         String sourceName,
         String tableName)Binds the form with the name specified of
 aDocWriter document
 to thetableNametable ofsourceNameData Source. | 
| static XInterface | createControl(XComponent oDoc,
              String kind)
 | 
| static XControlShape | createControlShape(XComponent oDoc,
                   int height,
                   int width,
                   int x,
                   int y,
                   String kind)creates a XControlShape
 | 
| static XControlShape | createControlShapeWithDefaultControl(XComponent oDoc,
                                     int height,
                                     int width,
                                     int x,
                                     int y,
                                     String kind)
 | 
| static XControlShape | createUnoControlShape(XComponent oDoc,
                      int height,
                      int width,
                      int x,
                      int y,
                      String kind,
                      String defControl)
 | 
| static XNameContainer | getForms(XDrawPage oDP)
 | 
| static XControlShape | insertControlShape(XComponent oDoc,
                   int height,
                   int width,
                   int x,
                   int y,
                   String kind)
 | 
| static void | insertForm(XComponent aDoc,
           XNameContainer Forms,
           String aName)
 | 
| static void | switchDesignOf(XMultiServiceFactory xMSF,
               XTextDocument aDoc)
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
FormTools
public FormTools()
createControlShape
public static XControlShape createControlShape(XComponent oDoc,
                                               int height,
                                               int width,
                                               int x,
                                               int y,
                                               String kind)
- creates a XControlShape- 
- Parameters:
- oDoc- the document
- height- the height of the shape
- width- the width of the shape
- x- the x-position of the shape
- y- the y-position of the shape
- kind- the kind of the shape
- Returns:
- the created XControlShape
 
createUnoControlShape
public static XControlShape createUnoControlShape(XComponent oDoc,
                                                  int height,
                                                  int width,
                                                  int x,
                                                  int y,
                                                  String kind,
                                                  String defControl)
createControlShapeWithDefaultControl
public static XControlShape createControlShapeWithDefaultControl(XComponent oDoc,
                                                                 int height,
                                                                 int width,
                                                                 int x,
                                                                 int y,
                                                                 String kind)
createControl
public static XInterface createControl(XComponent oDoc,
                                       String kind)
getForms
public static XNameContainer getForms(XDrawPage oDP)
insertForm
public static void insertForm(XComponent aDoc,
                              XNameContainer Forms,
                              String aName)
insertControlShape
public static XControlShape insertControlShape(XComponent oDoc,
                                               int height,
                                               int width,
                                               int x,
                                               int y,
                                               String kind)
bindForm
public static XLoadable bindForm(XTextDocument aDoc)
bindForm
public static XLoadable bindForm(XTextDocument aDoc,
                                 String sourceName,
                                 String tableName)
                          throws Exception
- Binds 'Standard'form ofaDocWriter document
 to thetableNametable ofsourceNameData Source.
- 
- Parameters:
- aDoc- Writer document where DB controls are added.
- sourceName- The name of DataSource in the- DatabaseContext.
- tableName- The name of the table to which controls are bound.
- Returns:
- com.sun.star.form.component.DatabaseFormservice
 implementation which is the bound form inside the document.
 
bindForm
public static XLoadable bindForm(XTextDocument aDoc,
                                 String formName)
bindForm
public static XLoadable bindForm(XTextDocument aDoc,
                                 String formName,
                                 String sourceName,
                                 String tableName)
                          throws Exception
- Binds the form with the name specified of aDocWriter document
 to thetableNametable ofsourceNameData Source.
- 
- Parameters:
- aDoc- Writer document where DB controls are added.
- formName- The name of the form to be bound.
- sourceName- The name of DataSource in the- DatabaseContext.
- tableName- The name of the table to which controls are bound.
- Returns:
- com.sun.star.form.component.DatabaseFormservice
 implementation which is the bound form inside the document.
 
switchDesignOf
public static void switchDesignOf(XMultiServiceFactory xMSF,
                                  XTextDocument aDoc)