LAF Map Java Bean - public properties .fr

LAF Map Java Bean - public properties. These properties can be set or read from any Bean Area whose Implementation Class property is set to: oracle.forms.fd.
147KB taille 4 téléchargements 358 vues
LAF Map Java Bean - public properties These properties can be set or read from any Bean Area whose Implementation Class property is set to: oracle.forms.fd.LAF_Map

Content MAP_SET_IMAGE ...................................................................................3 MAP_SET_POLYGON ...............................................................................3 MAP_SET_RECT .....................................................................................3 MAP_SET_TOOLTIP ................................................................................4 MAP_SET_BORDER.................................................................................4 MAP_SET_FILL.......................................................................................4 MAP_SET_LOG.......................................................................................4 The messages sent back to Forms.........................................................5

A Bean Area – BEAN_MAP – has been added to the laf.olb Object Library, for you, to drag it in your own modules. It has a generic 100x100 pixel size, so you probably have to change the dimensions to suit your needs.

MAP_SET_IMAGE Set the background image of the map. property value:

full_image_name

full_image_name can be one of the following: • • •

image read from the jar file : /image.gif image read from the client machine : c:/image.jpg image read from an internet url: http://…

-- set the background image map -Set_Custom_Property('BL.MAP_BEAN',1, 'MAP_SET_IMAGE' ,'http://fdtool.free.fr/LAF/doc/images/html_map.png' );

MAP_SET_POLYGON Define a polygonal Map zone. property value: zone_name,zone_url,coords Set_Custom_Property('BL.MAP_BEAN',1, 'MAP_SET_POLYGON','Colorado,#Colorado ,171,152,195,154,223,156,244,159,244,171,242,191,241,214,228,214,163,207,171,152');

MAP_SET_RECT Define a rectangular Map zone. property value: zone_name,zone_url,coords Set_Custom_Property('BL.MAP_BEAN',1, 'MAP_SET_RECT' ,'Connecticut,#Connecticut,542,94,568,111');

MAP_SET_TOOLTIP Set the Map zone tooltip properties. property value: display[,foreground_color[,background_color]] Set_Custom_Property('BL.MAP_BEAN',1, 'MAP_SET_TOOLTIP','true,r34g78b5,r200g200b0' );

If display = false, the tooltip is not displayed when the zone is overflown

MAP_SET_BORDER Set the Map zone border properties. property value: type[,border_width[,color]] type can be: • line • dash • none The default color is BLACK. Set_Custom_Property('BL.MAP_BEAN',1, 'MAP_SET_BORDER','line,1,r48g136b66' );

MAP_SET_FILL Set the Map zone fill properties. property value: display[,transparency_factor[,color]] transparency_factor must be between 0.0 and 1.0 The default color is WHITE. Set_Custom_Property('BL.MAP_BEAN',1, 'MAP_SET_FILL','true,.5' );

MAP_SET_LOG Allowed values are : ‘true’ or ‘false’. Set_Custom_Property('BL.MAP_BEAN',1, 'MAP_SET_LOG','true' );

The messages sent back to Forms You know what Map zone has been clicked through the When-Custom-Item-Event trigger attached to the Bean Area. DECLARE eventName varchar2(30) := :system.custom_item_event; eventValues ParamList; eventValueType number; LC$Area varchar2(500); LC$Url varchar2(500); BEGIN ----------------------- HTML Map events ----------------------IF (eventName='MAP_ZONE_CLICKED') THEN eventValues := get_parameter_list(:system.custom_item_event_parameters); get_parameter_attr(eventValues,'MAP_NAME',eventValueType, LC$Area); get_parameter_attr(eventValues,'MAP_URL',eventValueType, LC$Url); :bl.result := LC$Area || ' (' || LC$Url || ')'; END IF; END;

The event name is MAP_ZONE_CLICKED, and the values returned are the following: • •

MAP_NAME MAP_URL

the associated tooltip the associated URL

You can also get the information via the Get_Custom_Property() method: name := Get_Custom_Property('BL.BEAN_MAP',1, 'MAP_NAME') ; url := Get_Custom_Property('BL.BEAN_MAP',1, 'MAP_URL') ;

Oracle Forms Look & Feel project Created and maintained by Francois Degrelle Oracle Forms L&F Web site