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 of aDoc Writer document
to the tableName table of sourceName
Data Source. |
static XLoadable |
bindForm(XTextDocument aDoc,
String formName,
String sourceName,
String tableName)
Binds the form with the name specified of aDoc Writer document
to the tableName table of sourceName
Data 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 documentheight
- the height of the shapewidth
- the width of the shapex
- the x-position of the shapey
- the y-position of the shapekind
- 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 of aDoc
Writer document
to the tableName
table of sourceName
Data 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.DatabaseForm
service
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
aDoc
Writer document
to the tableName
table of sourceName
Data 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.DatabaseForm
service
implementation which is the bound form inside the document.
switchDesignOf
public static void switchDesignOf(XMultiServiceFactory xMSF,
XTextDocument aDoc)