LAF_XP_TextField.java - public properties

 

These properties can be set or read from any single-line Text item whose Implementation Class property is set to:

oracle.forms.fd.LAF_XP_TextField

 

 

  

 

Regular Expressions properties

Blinking text properties

HyperLink properties

Cursor position/selection properties

Miscellaneous properties

 

 

 

 

 

 

Regular Expressions properties

 

 

 


Set the Regular Expression pattern.

property value: regex_pattern

Set_Custom_Property( '…', 1, 'SET_REGEX_PATTERN', '^[a-z0-9._-]+@[a-z0-9._-]{2,}\.[a-z]{2,4}$' ) ;

The result of the expression's evaluation can be obtained with the GET_REGEX_RESULT method, or in the When-Custom-Item-Event Forms trigger if the ENABLE_EVENTS() method is used on this text Item.

 



Set the error message when the pattern validation fails


Set_Custom_Property( '…', 1, 'SET_REGEX_MESSAGE', 'incorrect pattern. must be [A-Z][a-z][a-z]' ) ;


 

 


Returns the result of the Regular Expression's evaluation

 
varchar2 := Get_Custom_Property
( '…', 1, 'GET_REGEX_RESULT' ) ;

 

The returned value is 'true' if the pattern is found or 'false'

 

 


Returns the group in the string that matches the pattern

 

varchar2 := Get_Custom_Property( '…', 1, 'GET_REGEX_GROUP' ) ;

 

 

  1. GET_REGEX_POSITION

Returns start,end position in the string that matches the pattern


Returned value is a coma delimited string : start_pos,end_pos

 

varchar2 := Get_Custom_Property( '…', 1, 'GET_REGEX_POSITION' ) ;

 

 

 

Blinking text properties

 

 

 

  1. SET_BLINK_RATE

Set the blinking rate in milliseconds

property value : number_of_milliseconds.



Set_Custom_Property( '…', 1, 'SET_BLINK_RATE', '400' ) ;

 

 

  1. SET_BLINK_FG_COLOR

Set the foreground color of the text item.

property value : rgb_color



Set_Custom_Property( '…', 1, 'SET_BLINK_FG_COLOR', 'r0g0b255' ) ;



 

  1. SET_BLINK_BG_COLOR

Set the background color of the text item.

property value : rgb_color



Set_Custom_Property( '…', 1, 'SET_BLINK_BG_COLOR', 'r0g0b255' ) ;



 

 

  1. START_BLINK


Start the blinking process.


Set_Custom_Property( '…', 1, 'START_BLINK', '' ) ;


 

 

  1. STOP_BLINK


Stop the blinking process.


Set_Custom_Property( '…', 1, 'STOP_BLINK', '' ) ;


 

 

HyperLink properties

 

 

  1. SET_HYPER_LINK

Set the URL associated to the Text Item.


Set_Custom_Property( '…', 1, 'SET_HYPER_LINK', 'http://otn.oracle.com' ) ;


 

 

  1. SET_HYPER_LINK_COLORS

Set the unclicked and visited link colors.

property_value : rgb_color[,rgb_visited_color]


Set_Custom_Property( '…', 1, 'SET_HYPER_LINK_COLORS', 'r255g255b0' ) ;


 

 

Cursor/selection properties

 

 

  1. SET_CURSOR_POSITION

Move the caret to the given position.


Set_Custom_Property( '…', 1, 'SET_CURSOR_POSITION', '12' ) ;

 

 

 

  1. INSERT_TEXT

Insert the given text at the current cursor position.


Set_Custom_Property( '…', 1, 'INSERT_TEXT', 'Hello world' ) ;

 

 

 

  1. INSERT_TEXT_AT_POSITION

Insert the given text at the given position.

property_value : position,text


Set_Custom_Property( '…', 1, 'INSERT_TEXT_AT_POSITION', '12,Hello world' ) ;

 

 

 

  1. GET_CURSOR_POSITION

Returns the current cursor position.


Varchar2 :=
Get_Custom_Property( '…', 1, 'GET_CURSOR_POSITION' ) ;

 

 

 

  1. SET_SELECTION_INDEX

Pre-select the given characters in the text.

property_value : start_index,end_index


-- select the substring from the 12th to the 18th characters --

Set_Custom_Property( '…', 1, 'SET_SELECTION_INDEX', '12,18' ) ;

 

 

 

  1. GET_SELECTION_INDEX

Returns the current selected index.

the returning value is a coma delimited string : start_pos,end_pos


Varchar2 :=
Get_Custom_Property( '…', 1, 'GET_SELECTION_INDEX' ) ;

 

 

 

  1. GET_SELECTION_VALUE

Returns the current selected value.


Varchar2 :=
Get_Custom_Property( '…', 1, 'GET_SELECTION_VALUE' ) ;

 

 

 

 

Miscellaneous properties

 

 

  1. SET_MAX_CHAR

Set the maximum number of characters allowed.


Set_Custom_Property( '…', 1, 'SET_MAX_CHAR', '30' ) ;

 

 

 

  1. ENABLE EVENTS

Enable/disable messages to be sent back to Forms.

property_value : Forms item name,true | false


Set_Custom_Property( '…', 1, 'ENABLE_EVENTS', 'CTRL.TEXT4,true' ) ;

 

Events that can be sent back to Forms are the following:

 

·         Regular Expression error message

·         cursor_position

·         last key pressed (int value, char value, keybaord modifier)

·         hyperlink that has been clicked

 

These events are captured in the When-Custom-Item-Event Forms trigger.

 

 

  1. SET_LOG

Enable/disable the log messages.


Set_Custom_Property( '…', 1, 'SET_LOG', 'true' ) ;