LAF 1.7.7 new properties

oracle.forms.fd.DrawLAF Java Bean new properties


Canvas mouse move


You can trap mouse events like move and click on the current DrawLAF bean associated canvas.
argument can be  false | full | x,y,width,height.
If full is specified the entire canvas size is used.
If false is specified the mouse tracking is removed.
If coordinates are given, they discribe the canvas area that handles the mouse events.

 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'CANVAS_MOUSE_MOVE','5,40,485,230');

message sent back (DrawLAF Bean Area WHEN-CUSTOM-ITEM-EVENT trigger)

 ------------------------------
 -- Canvas mouse move event  --
 ------------------------------
 ELSIF (eventName='CANVAS_MOUSE_MOVE') THEN
  get_parameter_attr(eventValues,'MOUSE_X_POS',eventValueType, p1);
  get_parameter_attr(eventValues,'MOUSE_Y_POS',eventValueType, p2);
 -------------------------------
 -- Canvas mouse click event  --
 -------------------------------
 ELSIF (eventName='CANVAS_MOUSE_CLICK') THEN
  get_parameter_attr(eventValues,'ITEM_ACTION_MOUSEBUTTON',eventValueType, p1);             
 
  

shape animation


SHAPE_MOVE_TO
Move with animation a shape from starting to a target position.
argument is shape_type,shape_name,start_x,start_y,end_x,end_y[,delay in millisecond ,step in pixel]]

 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN',1,'SHAPE_MOVE_TO','text,hello,10,140,350,140,20,2');

SHAPE_ROTATE_TO
Rotate with animation a shape to a given degree angle.
argument is shape_type,shape_name,rotation_in_degrees,rotation_sens[,delay in millisecond[,step in degree][,rotation_center_point]]

Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN',1,'SHAPE_ROTATE_TO','text,hello,360,1,20,5,c');

rotation_center_point can be:

  • ul (Up Left) default
  • ur (Up Right)
  • c (center)
  • dl (Down Left)
  • dr (Down Right)

SHAPE_STRETCH_TO
Resize with animation a shape to a given size.
argument is shape_type,shape_name,new_width,new_height[,delay in millisecond[,step in pixel]]

 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN',1,'SHAPE_STRETCH_TO','rect,re,100,100,50,4');

SHAPE_ADD_ANIMATION_STEP
Add a shape animation to a list in order to combine several effects.
argument is shape_stretch_to|shape_move_to|shape_rotate_to,effect_arguments

 -- add a 3 steps animation (stretch, rotate and move) --
 set_custom_property('laf_block.laf_bean',1,'SHAPE_ADD_ANIMATION_STEP'
 ,'shape_stretch_to=rect,re,140,100,100,4');
 set_custom_property('laf_block.laf_bean',1,'SHAPE_ADD_ANIMATION_STEP'
 ,'shape_rotate_to=rect,re,360,1,60,10,c');
 set_custom_property('laf_block.laf_bean',1,'SHAPE_ADD_ANIMATION_STEP'
 ,'shape_move_to=rect,re,100,50,260,150,80,5');

  
SHAPE_PLAY_ANIMATION
Play the current animation list.

 set_custom_property('laf_block.laf_bean',1,'SHAPE_PLAY_ANIMATION','');

SHAPE_CLEAR_ANIMATION
Clear the current animation list.

 set_custom_property('laf_block.laf_bean',1,'SHAPE_CLEAR_ANIMATION','');

message sent back (DrawLAF Bean Area WHEN-CUSTOM-ITEM-EVENT trigger)

 ----------------------------
 -- Shape animation event  --
 ----------------------------

 ELSIF (eventName='SHAPE_MOVE_EVENT') THEN
 get_parameter_attr(eventValues,'SHAPE_MOVE_DONE',eventValueType, p1);

ANIMATION_DELAY
Sleep the given delay in milliseconds

 set_custom_property('laf_block.laf_bean',1,'ANIMATION_DELAY','500');

shape transformation


TRANSFORM_GRAPHIC
Change a shape location, size or rotation angle.
argument is shape_type,shape_name,moveto|stretch|rotate,effect_arguments

 -- change shape location --
 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN',1,'TRANSFORM_GRAPHIC','text,txt_end,moveto,50,140');
 -- change shape size 110% of current size --
 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN',1,'TRANSFORM_GRAPHIC','text,txtrot,stretch,110%,110%');
 -- rotate shape around center --
 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN',1,'TRANSFORM_GRAPHIC','text,txt_end,rotate,90,c');

shape properties


POINT_SHAPE_PROPERTY  
Indicates which shape/property we want to get the current value.
argument is shape_type,shape_name,property_name

 
SHAPE_GET_PROPERTY 
Get the given shape property value.

 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'POINT_SHAPE_PROPERTY', 'line,l,linewidth' );
 synchronize;
 message(Get_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'SHAPE_GET_PROPERTY' ));
 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'POINT_SHAPE_PROPERTY'
                    , 'text,txtrot,alignment' );
 synchronize;
 message(Get_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'SHAPE_GET_PROPERTY' ));
 

 text property list:

  •  StartPoint
  •  Scale
  •  LineColor
  •  ShapeColor
  •  Gradient
  •  Rotation
  •  RotationPoint
  •  FontName | FontSize | FontStyle
  •  Alignment
  •  Box
  •  Paint
  •  Image

 line property list:

  •  StartPoint
  •  EndPoint
  •  LineColor
  •  Rotation
  •  LineWidth
  •  RotationPoint

 ellipse/rectangle property list:

  •  StartPoint
  •  ShapeColor
  •  LineColor
  •  Gradient
  •  Rotation
  •  RotationPoint
  •  LineWidth
  •  Paint
  •  Width
  •  Height

 polygon property list:

  •  StartPoint
  •  Rotation
  •  RotationPoint


SHAPE_SET_PROPERTY
Set a shape property.
argument is shape_type,shape_name,property_name,property_value

 Set_Custom_Property( 'laf_block.laf_bean', 1, 'SHAPE_SET_PROPERTY', 'ellipse,ball2,width,30');
 Set_Custom_Property( 'laf_block.laf_bean', 1, 'SHAPE_SET_PROPERTY'
                    , 'ellipse,ball2,startpoint,30|100');


REMOVE_GRAPHIC
Remove the given shape.
argument is shape_type,shape_name

 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'REMOVE_GRAPHIC', 'shape,shape1');

REMOVE_LINES
Remove all lines

 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'REMOVE_LINES', '');

REMOVE_RECTS
Remove all rectangles

 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'REMOVE_RECTS', '');

REMOVE_SHAPES
Remove all polygons

 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'REMOVE_SHAPES', '');

REMOVE_ELLIPSES
Remove all ellipses
   
 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'REMOVE_ELLIPSES', '');

REMOVE_TEXTS
Remove all texts
   
 Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'REMOVE_ELLIPSES', '');

ADD_SHAPE
Add a new polygon to the current canvas.
argument is name,texture_paint_name,xPos,yPos[,transparency factor]
    
 declare
  n pls_integer := get_Block_property(:system.trigger_block, current_record);
  s varchar2(100);
 begin
  n := (n-1) * 18 ;
  s := '30,300,m0-' || n || '.' ;
  s := s || 'l28-20.';
  s := s || 'l28-70.';
  s := s || 'l0-' || (n+18) || '.z';
  -- create the shape --
  Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'ADD_TEXTUREPAINT'
  ,'tp1,shape,r255g255b255,#C0E0FF,#C0E0FF,' || s );
  -- display the shape on the canvas --
  Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'REMOVE_GRAPHIC', 'shape,shape1');
  Set_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'ADD_SHAPE', 'shape1,tp1,659,45' );
 end;

ADD_ELLIPSE
Add a new ellipse on the current canvas.
argument is name,xpos,ypos,width,height,line_width,frame_color,inside_color_transparency
             ,inside_color,shade_color,gradient_start,gradient_end,gradient_direction,motif


 set_custom_property('laf_block.laf_bean',1,'ADD_ELLIPSE','el,100,100,40,20,2,#000000');

miscelaneous

GET_USER_IP
Get the user IP

 ip := Get_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'GET_USER_IP');

FORMS_SERVER_URL
Get the Forms Server url

 host := Get_Custom_Property( 'LAF_BLOCK.LAF_BEAN', 1, 'FORMS_SERVER_URL');