AddItem Java Bean – List of properties

 

 

1. The properties you can set

 

Add a new item

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'ADD_ITEM', 'v1,...,vn' ) ;

 

 

examples:

 

add a text area with a 50 max length characters with standard alignment

Set_Custom_Property ( 'BLOC.BEAN', 1, 'ADD_ITEM', 'TA,1, ,50,10,10,100,40' ) ;

 

add a second text area with a 80 max length characters with a right alignment

Set_Custom_Property ( 'BLOC.BEAN', 1, 'ADD_ITEM', 'TA,2, ,80,10,10,100,40,right' ) ;

 

add a first button with 'Button 1' as label and 'BT1' as action name  with a left alignment

Set_Custom_Property ( 'BLOC.BEAN', 1, 'ADD_ITEM', 'BT,1,Button 1,BT1,10,10,100,40,left' ) ;

 

 

Set the frame property

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FRAME', 'v1,...,vn' ) ;

 

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FRAME', 'TA,1,Title,Arial,12,B,center' ) ;

 

 

Set the frame color property

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FRAME_COLOR', 'v1,...,vn' ) ;

 

 

If  the color is not specified, the current canvas color is applied.

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FRAME_COLOR', 'TF,1,100,150,25' ) ;

 

 

Set the text

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_TEXT', 'v1^...^vn' ) ;

 

 

Text is the label for a button

 

Because the text could contains the standard separator charater (,) this function takes the particular text separator set by the SET_SEPARATOR property.

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_TEXT', 'TF^1^Hello, world' ) ;

 

 

Set the font

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FONT', 'v1,...,vn' ) ;

 

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FONT', 'TA, 2, Arial ) ;

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FONT', 'BT,4,Arial,14,B' ) ;

 

 

Set the alignment

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_ALIGN', 'v1,...,vn' ) ;

 

 

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_ALIGN', 'TF,1,center' ) ;

 

 

Set the bevel

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_BEVEL', 'v1,...,vn' ) ;

 

 

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_BEVEL', 'TF,1,titled' ) ;

 

 

Set the foreground/background color

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FG_COLOR', 'v1,...,vn' ) ;

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_BG_COLOR', 'v1,...,vn' ) ;

 

 

If  the color is not specified, the current canvas color is applied.

 

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_BG_COLOR', 'BT,1,125,80,68' ) ;

 

 

Set the max length for a text component

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_MAXLENGTH', 'v1,...,vn' ) ;

 

 

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_MAXLENGTH', 'FT,1,200' ) ;

 

 

Set the text separator (for the SET_TEXT property)

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_SEPARATOR', 'separator_character' ) ;

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_SEPARATOR', 'µ' ) ;

 

 

Set the focus on a particular component

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FOCUS', 'v1,...,vn' ) ;

 

 

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_FOCUS', 'BT,4' ) ;

 

 

Set the debug modes

 

For all components

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_DEBUG', 'true|false' ) ;

 

For a particular component

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_DEBUG_COMP', 'v1,...,vn' ) ;

 

 

 

examples:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_DEBUG', 'true' ) ;

Set_Custom_Property ( 'BLOC.BEAN', 1, 'SET_DEBUG_COMP', 'BT,4,true' ) ;

 

 

Remove a component

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'REMOVE_ITEM', 'v1,...,vn' ) ;

 

 

example:

 

Set_Custom_Property ( 'BLOC.BEAN', 1, 'REMOVE_ITEM', 'BT,5' ) ;

 

 

 

2. The properties you can get

 

Get the last button pressed

 

Varchar2 := Get_Custom_Property ( 'BLOC.BEAN', 1, 'GET_BT_PRESSED' ) ;

 

example:

 

button_name := Get_Custom_Property ( 'BLOC.BEAN', 1, 'GET_BT_PRESSED' ) ;

 

 

 

Get the current selected component

 

Varchar2 := Get_Custom_Property ( 'BLOC.BEAN', 1, 'GET_SELITEM' ) ;

 

example:

 

current_item := Get_Custom_Property ( 'BLOC.BEAN', 1, 'GET_SELITEM' ) ;

 

 

 

Get the text of the current selected component

 

Varchar2 := Get_Custom_Property ( 'BLOC.BEAN', 1, 'GET_TEXT' ) ;

 

example:

 

the_text := Get_Custom_Property ( 'BLOC.BEAN', 1, 'GET_TEXT' ) ;

 

 

 

3. The events raised by the bean

 

A button has been pressed

 

BUTTONPRESSED

 

 

A focus has changed

 

FOCUSCHANGED