BBjFormElement

Description

In BBj 4.0 and higher, the BBjFormElement is the base class for objects placed on a BBjFormPage.

Creation

BBjAPIBBjPrinterBBjFormBBjFormPage > BBjFormElement

The BBjFormElement is a base class and cannot be directly constructed.

Methods of BBjFormElement

Return Value

Method

void

add(BBjFormElement object)

double

getBottomMargin()

double

getDrawingHeight()

point

getDrawingOrigin()

dimension

getDrawingSize()

double

getDrawingWidth()

double

getDrawingX()

double

getDrawingY()

double

getHeight()

int

getHorizontalSticky()

double

getLeftMargin()

BBjFormPage

getPage()

BBjFormElement

getParent()

point

getPosition()

double

getRightMargin()

dimension

getSize()

double

getTopMargin()

int

getVerticalSticky()

double

getWidth()

double

getX()

double

getY()

int

isChild()

int

isHorizontalFill()

int

isVerticalFill()

void

remove(BBjFormElement object)

void

setBottomMargin(double margin)

void

setHeight(double height)

void

setHorizontalFill(int fill)

void

setHorizontalSticky(int sticky)

void

setLeftMargin(double margin)

void

setPosition(double x,double y)

void

setPosition(Point point)

void

setRelative(int relative)

void

setRightMargin(double margin)

void

setSize(double width,double height)

void

setSize(dimension size)

void

setTopMargin(double margin)

void

setVerticalFill(int fill)

void

setVerticalSticky(int sticky)

void

setWidth(double width)

 

Remarks

All BBjFormElement coordinates are specified in points or units specified at page creation. A point is approximately 1/72 inch or 1/3 millimeter.

Constants

CAP_BUTT

Ends unclosed subpaths and dash segments with no added decoration

CAP_ROUND

Ends unclosed subpaths and dash segments with a round decoration that has a radius equal to half of the width of the pen

CAP_SQUARE

Ends unclosed subpaths and dash segments with a square projection that extends beyond the end of the segment to a distance equal to half of the line width. This is the default.

JOIN_BEVEL

Joins path segments by connecting the outer corners of their wide outlines with a straight segment.

JOIN_MITER

Joins path segments by extending their outside edges until they meet. This is the default.

JOIN_ROUND

Joins path segments by rounding off the corner at a radius of half the line width.

STICKY_LEFT

Sets the horizontal value to position the object to the left within its parent container.

STICKY_RIGHT

Sets the horizontal value to position the object to the right within its parent container.

STICKY_TOP

Sets the vertical value to position the object to the top within its parent container.

STICKY_BOTTOM

Sets the vertical value to position the object to the bottom within its parent container.

STICKY_CENTER

Sets the horizontal or vertical value to position the object to the center within its parent container.

STICKY_NONE

Voids a previously set value.

Example

rem 'Set horizontal sticky

rem 'Obtain the instance to the BBjAPI object
myAPI! = BBjAPI()

rem 'Obtain an instance of a default BBjPrinter object
let myBBjPrinter! = myAPI!.getBBjPrinter(0)

rem 'Get BBjForm for the selected printer
let myBBjForm! = myBBjPrinter!.getForm(0)

rem 'Get a new page
let myBBjFormPage! = myBBjForm!.createPage()

rem 'Get a new paragraph
let para! = myBBjFormPage!.newParagraph()

rem 'Set horizontal sticky
para!.setHorizontalSticky(para!.STICKY_CENTER)

rem 'Set vertical sticky
para!.setVerticalSticky(para!.STICKY_CENTER)

rem 'Set the text
para!.setText("This text should be in the center of the page")

rem 'Preview the form
myBBjFormPage!.add(para!)
myBBjForm!.preview()

release

See Also

BBjAPI

BBj Object Variables

BBj Object Assignment

BBj Object Error Handling

BBj Object Operators

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.