SAP Picture Control(图片加载)
Screen display
效果
源代码
program sap_picture_demo. set screen 200. TYPE-POOLS cndp. ************************************************************************
* CLASS c_event_receiver
* DEFINITION
************************************************************************
class c_event_receiver definition.
* The class is used to test the events raised by the cl_gui_picture
* class
public section.
methods event_handler_picture_dblclick
for event picture_dblclick of cl_gui_picture
importing mouse_pos_x mouse_pos_y sender.
methods event_handler_context_menu
for event context_menu of cl_gui_picture
importing sender.
methods event_handler_context_menu_sel
for event context_menu_selected of cl_gui_picture
importing fcode sender.
endclass. ************************************************************************
* DATA
************************************************************************
data function like sy-ucomm. " OK-Code field in screen 200
data url type cndp_url. " URL-field in screen 200
data url2 type cndp_url. " URL-field in screen 200
data picture_control_1 type ref to cl_gui_picture.
data picture_control_2 type ref to cl_gui_picture.
data container_1 type ref to cl_gui_custom_container.
data container_2 type ref to cl_gui_custom_container.
data event_receiver type ref to c_event_receiver.
data event_tab type cntl_simple_events.
data event_tab_line type cntl_simple_event.
data return type i. ************************************************************************
* PBO
* before_output
************************************************************************
module before_output output.
set pf-status 'MAIN0001'.
IF PICTURE_CONTROL_1 IS INITIAL. * Create controls
create object container_1
exporting container_name = 'PICTURE_CONTROL_1'.
create object container_2
exporting container_name = 'PICTURE_CONTROL_2'. CREATE OBJECT PICTURE_CONTROL_1 exporting parent = container_1.
CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2. * Register the events
EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_PICTURE_DBLCLICK.
append EVENT_TAB_LINE to EVENT_TAB.
EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_CONTEXT_MENU.
append EVENT_TAB_LINE to EVENT_TAB.
EVENT_TAB_LINE-EVENTID = CL_GUI_PICTURE=>EVENTID_CONTEXT_MENU_SELECTED.
append EVENT_TAB_LINE to EVENT_TAB. CALL METHOD PICTURE_CONTROL_1->SET_REGISTERED_EVENTS
exporting
EVENTS = event_tab. CALL METHOD PICTURE_CONTROL_2->SET_REGISTERED_EVENTS
exporting
EVENTS = event_tab. * Create the event_receiver object and set the handlers for the events
* of the picture controls
create object event_receiver.
set handler event_receiver->event_handler_picture_dblclick
FOR PICTURE_CONTROL_1.
set handler event_receiver->event_handler_context_menu
FOR PICTURE_CONTROL_1.
set handler event_receiver->event_handler_context_menu_sel
FOR PICTURE_CONTROL_1.
set handler event_receiver->event_handler_picture_dblclick
FOR PICTURE_CONTROL_2.
set handler event_receiver->event_handler_context_menu
FOR PICTURE_CONTROL_2.
set handler event_receiver->event_handler_context_menu_sel
FOR PICTURE_CONTROL_2. * Set the display mode to 'normal' (0)
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL. * Set 3D Border
CALL METHOD PICTURE_CONTROL_1->SET_3D_BORDER
exporting border = 1.
CALL METHOD PICTURE_CONTROL_2->SET_3D_BORDER
exporting border = 1. * new async implementation since 4.6C
CALL FUNCTION 'DP_PUBLISH_WWW_URL'
EXPORTING
OBJID = 'HTMLCNTL_TESTHTM2_SAP_AG'
LIFETIME = cndp_lifetime_transaction
IMPORTING
URL = url
EXCEPTIONS
OTHERS = 1. * Load the picture by using the url generated by the data provider.
if sy-subrc = 0.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL_ASYNC
exporting url = url.
endif. CALL FUNCTION 'DP_PUBLISH_WWW_URL'
EXPORTING
OBJID = 'DEMOWORD97SAPLOGO'
LIFETIME = cndp_lifetime_transaction
IMPORTING
URL = url2
EXCEPTIONS
OTHERS = 1. * load image
if sy-subrc = 0.
CALL METHOD PICTURE_CONTROL_2->LOAD_PICTURE_FROM_URL_async
exporting url = url2.
endif. endif.
endmodule. ************************************************************************
* PAI
* after_input
************************************************************************
module after_input input.
case function.
* At the end of the program destroy the control
when 'BACK'.
CALL METHOD container_1->FREE.
CALL METHOD container_2->FREE.
leave to screen 0. * Change the display mode
when 'NORMAL'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
when 'STRETCH'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
when 'FIT'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
when 'NORMAL_CTR'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
when 'FIT_CTR'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER. * Clear the picture
when 'CLEAR'.
CALL METHOD PICTURE_CONTROL_1->CLEAR_PICTURE. * Load a new picture
when space.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
exporting url = url
importing result = return.
call method cl_gui_cfw=>flush.
if return = 0.
url = text-000.
endif. endcase. clear function.
endmodule. ************************************************************************
* CLASS c_event_receiver
* IMPLEMENTATION
************************************************************************
CLASS C_event_receiver implementation. ************************************************************************
* CLASS c_event_receiver
* METHOD event_handler_picture_dblclick
************************************************************************
METHOD EVENT_HANDLER_PICTURE_DBLCLICK.
* for event picture_dblclick of c_picture_control
* importing mouse_pos_x mouse_pos_y.
DATA pos_x(5) type c.
DATA pos_y(5) type c.
pos_x = mouse_pos_x.
pos_y = mouse_pos_y. IF SENDER = PICTURE_CONTROL_1.
MESSAGE I000(0K) WITH
'DoubleClick' 'Upper Picture' POS_X POS_Y. "#EC NOTEXT
else.
MESSAGE I000(0K) WITH
'DoubleClick' 'Lower Picture' POS_X POS_Y. "#EC NOTEXT
endif.
endmethod. ************************************************************************
* CLASS c_event_receiver
* METHOD event_handler_context_menu
************************************************************************
METHOD EVENT_HANDLER_CONTEXT_MENU.
data menu type ref to cl_ctmenu.
create object menu.
call method menu->ADD_FUNCTION exporting
fcode = text-001
TEXT = TEXT-001.
call method menu->ADD_FUNCTION exporting
FCODE = TEXT-002
TEXT = TEXT-002.
call method menu->ADD_FUNCTION exporting
FCODE = TEXT-003
TEXT = TEXT-003.
call method menu->ADD_FUNCTION exporting
FCODE = TEXT-004
TEXT = TEXT-004.
call method menu->ADD_FUNCTION exporting
FCODE = TEXT-005
TEXT = TEXT-005. CALL METHOD SENDER->DISPLAY_CONTEXT_MENU
EXPORTING CONTEXT_MENU = MENU.
endmethod. ************************************************************************
* CLASS c_event_receiver
* METHOD event_handler_context_menu_sel
************************************************************************
METHOD EVENT_HANDLER_CONTEXT_MENU_sel.
DATA DISPLAY_MODE TYPE I.
IF FCODE = TEXT-001.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
ENDIF.
IF FCODE = TEXT-002.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
ENDIF.
IF FCODE = TEXT-003.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
ENDIF.
IF FCODE = TEXT-004.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
ENDIF.
IF FCODE = TEXT-005.
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
ENDIF.
CALL METHOD SENDER->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = DISPLAY_MODE. endmethod. endclass.
屏幕
program sap_picture_demo_icon. set screen 200. TYPE-POOLS cndp. ************************************************************************
* CLASS c_event_receiver
* DEFINITION
************************************************************************
class c_event_receiver definition.
* The class is used to test the events raised by the cl_gui_picture
* class
public section.
methods event_handler_control_click
for event control_click of cl_gui_picture
importing mouse_pos_x mouse_pos_y.
methods event_handler_control_dblclick
for event control_dblclick of cl_gui_picture
importing mouse_pos_x mouse_pos_y.
endclass. ************************************************************************
* DATA
************************************************************************
data function like sy-ucomm. " OK-Code field in screen 200
data event1(255) type c.
data picture_control_1 type ref to cl_gui_picture.
data picture_control_2 type ref to cl_gui_picture.
data container_1 type ref to cl_gui_custom_container.
data container_2 type ref to cl_gui_custom_container.
data event_receiver type ref to c_event_receiver.
data event_tab type cntl_simple_events.
data event type cntl_simple_event. ************************************************************************
* PBO
* before_output
************************************************************************
module before_output output.
set pf-status 'MAIN0001'.
IF PICTURE_CONTROL_1 IS INITIAL. * Create controls
create object container_1
exporting container_name = 'PICTURE_CONTROL_1'.
create object container_2
exporting container_name = 'PICTURE_CONTROL_2'. CREATE OBJECT PICTURE_CONTROL_1 exporting parent = container_1.
CREATE OBJECT PICTURE_CONTROL_2 exporting parent = container_2. * Register the events
EVENT-eventid = CL_GUI_PICTURE=>EVENTID_CONTROL_DBLCLICK.
append event to EVENT_TAB.
CALL METHOD PICTURE_CONTROL_1->SET_REGISTERED_EVENTS
exporting
EVENTS = event_tab.
clear event_tab.
EVENT-EVENTID = CL_GUI_PICTURE=>EVENTID_CONTROL_CLICK.
append event to EVENT_TAB.
CALL METHOD PICTURE_CONTROL_2->SET_REGISTERED_EVENTS
exporting
EVENTS = event_tab. * Create the event_receiver object and set the handlers for the events
* of the picture controls
create object event_receiver.
set handler event_receiver->event_handler_control_dblclick
FOR PICTURE_CONTROL_1.
set handler event_receiver->event_handler_control_dblclick
FOR PICTURE_CONTROL_2.
set handler event_receiver->event_handler_control_click
FOR PICTURE_CONTROL_1.
set handler event_receiver->event_handler_control_click
FOR PICTURE_CONTROL_2. CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER. CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_SAP_ICONS
exporting icon = '@01@'.
CALL METHOD PICTURE_CONTROL_2->LOAD_PICTURE_FROM_SAP_ICONS
exporting icon = '@02@'. endif.
endmodule. ************************************************************************
* PAI
* after_input
************************************************************************
module after_input input.
case function.
* At the end of the program destroy the control
when 'BACK'.
CALL METHOD PICTURE_CONTROL_1->FREE.
CALL METHOD PICTURE_CONTROL_2->FREE.
CALL METHOD container_1->FREE.
CALL METHOD container_2->FREE.
leave to screen 0. * Change the display mode
when 'NORMAL'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL.
when 'STRETCH'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
when 'FIT'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
when 'NORMAL_CTR'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_NORMAL_CENTER.
when 'FIT_CTR'.
CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
CALL METHOD PICTURE_CONTROL_2->SET_DISPLAY_MODE
EXPORTING DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER. * Clear the picture
when 'CLEAR'.
CALL METHOD PICTURE_CONTROL_1->CLEAR_PICTURE. * Load a new picture
when space.
CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_SAP_ICONS
exporting icon = event1. endcase. clear function.
endmodule. ************************************************************************
* CLASS c_event_receiver
* IMPLEMENTATION
************************************************************************
CLASS C_event_receiver implementation. ************************************************************************
* CLASS c_event_receiver
* METHOD event_handler_control_click
************************************************************************
method event_handler_control_click.
* for event control_click of c_picture_control
* importing mouse_pos_x mouse_pos_y.
DATA pos_x(5) type c.
DATA pos_y(5) type c.
pos_x = mouse_pos_x.
pos_y = mouse_pos_y. MESSAGE I000(0K) WITH
'Click' 'Lower Picture' POS_X POS_Y. "#EC NOTEXT
endmethod. ************************************************************************
* CLASS c_event_receiver
* METHOD event_handler_control_dblclick
************************************************************************
method event_handler_control_dblclick.
* for event control_dblclick of c_picture_control
* importing mouse_pos_x mouse_pos_y.
DATA pos_x(5) type c.
DATA pos_y(5) type c.
pos_x = mouse_pos_x.
pos_y = mouse_pos_y. MESSAGE I000(0K) WITH
'DoubleClick' 'Upper Picture' POS_X POS_Y. "#EC NOTEXT
endmethod. endclass.
*&---------------------------------------------------------------------*
*& Report RSDEMO_PICTURE_CONTROL *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------* REPORT rsdemo_picture_control .
include <icon>.
DATA container TYPE REF TO cl_gui_custom_container.
DATA picture TYPE REF TO cl_gui_picture.
DATA init.
DATA ok_code TYPE sy-ucomm.
DATA save_ok TYPE sy-ucomm.
TYPE-POOLS cndp. ##CLASS_FINAL
CLASS lcl_event_receiver DEFINITION. PUBLIC SECTION.
METHODS contextmenurequest
FOR EVENT context_menu OF cl_gui_picture.
METHODS contextmenuselected
FOR EVENT context_menu_selected OF cl_gui_picture
IMPORTING fcode.
ENDCLASS.
DATA event_receiver TYPE REF TO lcl_event_receiver.
DATA events TYPE cntl_simple_events.
DATA wa_events TYPE cntl_simple_event. SET SCREEN 100. CLASS lcl_event_receiver IMPLEMENTATION.
METHOD contextmenurequest.
DATA menu TYPE REF TO cl_ctmenu.
CREATE OBJECT menu.
CALL METHOD menu->load_gui_status
EXPORTING program = 'RSDEMO_PICTURE_CONTROL'
status = 'CONTEXT'
menu = menu
EXCEPTIONS read_error = 1.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF.
CALL METHOD picture->display_context_menu
EXPORTING context_menu = menu
EXCEPTIONS error = 1.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF.
* <weiterer Aufbau des Kontext Menüs>
ENDMETHOD.
METHOD contextmenuselected. MESSAGE i300(eu) WITH fcode. "#EC NOTEXT ENDMETHOD.
ENDCLASS. *&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS'.
* SET TITLEBAR 'xxx'.
IF init is initial.
CREATE OBJECT container
EXPORTING container_name = 'CUSTOM_CONTAINER'.
CREATE OBJECT picture
EXPORTING parent = container
EXCEPTIONS error = 1.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF. wa_events-eventid = picture->eventid_context_menu.
wa_events-appl_event = ' '.
APPEND wa_events TO events.
wa_events-eventid = picture->eventid_context_menu_selected.
wa_events-appl_event = ' '.
APPEND wa_events TO events.
CALL METHOD picture->set_registered_events
EXPORTING events = events
EXCEPTIONS cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF. CREATE OBJECT event_receiver.
SET HANDLER event_receiver->contextmenurequest FOR picture.
SET HANDLER event_receiver->contextmenuselected FOR picture.
init = 'X'.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'LOAD_PICTURE'.
* Request an URL from the data provider by exporting the pic_data.
##DECL_MODUL
DATA url(255).
CLEAR url.
PERFORM load_pic_from_db CHANGING url. * load picture
CALL METHOD picture->load_picture_from_url
EXPORTING url = url.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF.
WHEN 'DELETE'.
CALL METHOD picture->clear_picture
EXCEPTIONS error = 1.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF.
WHEN 'STRETCH'.
CALL METHOD picture->set_display_mode
EXPORTING display_mode = picture->display_mode_stretch
EXCEPTIONS error = 1.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF.
WHEN 'NORMAL'.
CALL METHOD picture->set_display_mode
EXPORTING display_mode = picture->display_mode_normal
EXCEPTIONS error = 1.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF.
WHEN 'LOAD_ICON'.
CALL METHOD picture->load_picture_from_sap_icons
EXPORTING icon = '@00@'
EXCEPTIONS error = 1.
##NEEDED
IF sy-subrc ne 0.
* Fehlerbehandlung
ENDIF. ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
*& Module EXIT INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE exit INPUT.
CALL METHOD picture->free.
CALL METHOD container->free.
LEAVE PROGRAM.
ENDMODULE. " EXIT INPUT
*&---------------------------------------------------------------------*
*& Form LOAD_PIC_FROM_DB
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
##PERF_NO_TYPE
FORM load_pic_from_db CHANGING url.
DATA query_table LIKE w3query OCCURS 1 WITH HEADER LINE.
DATA html_table LIKE w3html OCCURS 1.
DATA return_code LIKE w3param-ret_code.
DATA content_type LIKE w3param-cont_type.
DATA content_length LIKE w3param-cont_len.
DATA pic_data LIKE w3mime OCCURS 0.
DATA pic_size TYPE i. REFRESH query_table.
query_table-name = '_OBJECT_ID'.
query_table-value = 'ENJOYSAP_LOGO'.
APPEND query_table. ##FM_OLDED
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
query_string = query_table
html = html_table
mime = pic_data
CHANGING
return_code = return_code
content_type = content_type
content_length = content_length
EXCEPTIONS
OBJECT_NOT_FOUND = 1
parameter_not_found = 2
OTHERS = 3.
IF sy-subrc = 0.
pic_size = content_length.
ENDIF. CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
##NO_TEXT
type = 'image'
subtype = cndp_sap_tab_unknown
size = pic_size
lifetime = cndp_lifetime_transaction
TABLES
data = pic_data
CHANGING
url = url
##FM_SUBRC_OK
EXCEPTIONS
OTHERS = 1. ENDFORM. " LOAD_PIC_FROM_DB
SAP Picture Control(图片加载)的更多相关文章
- Android图片加载框架最全解析(二),从源码的角度理解Glide的执行流程
在本系列的上一篇文章中,我们学习了Glide的基本用法,体验了这个图片加载框架的强大功能,以及它非常简便的API.还没有看过上一篇文章的朋友,建议先去阅读 Android图片加载框架最全解析(一),G ...
- android-------非常好的图片加载框架和缓存库(Picasso)
Picasso是Square公司开源的一个Android图形缓存库, 可以实现图片加载(本地和网络)和缓存功能. 地址:http://square.github.io/picasso/ jar包下载: ...
- 巧用代理设计模式(Proxy Design Pattern)改善前端图片加载体验
这篇文章介绍一种使用代理设计模式(Proxy Design Pattern)的方法来改善您的前端应用里图片加载的体验. 假设我们的应用里需要显示一张尺寸很大的图片,位于远端服务器.我们用一些前端框架的 ...
- Android中常见的图片加载框架
图片加载涉及到图片的缓存.图片的处理.图片的显示等.而随着市面上手机设备的硬件水平飞速发展,对图片的显示要求越来越高,稍微处理不好就会造成内存溢出等问题.很多软件厂家的通用做法就是借用第三方的框架进行 ...
- 强大的图片加载框架Fresco的使用
前面在卓新科技有限公司实习的时候,在自己的爱吖头条APP中,在图片异步加载的时候和ListView的滑动中,总会出现卡顿,这是因为图片的缓存做的不是足够到位,在项目监理的帮助下,有使用Xutils框架 ...
- Android之图片加载框架Fresco基本使用(二)
PS:最近看到很多人都开始写年终总结了,时间过得飞快,又到年底了,又老了一岁. 学习内容: 1.进度条 2.缩放 3.ControllerBuilder,ControllerListener,Post ...
- ios新手开发——toast提示和旋转图片加载框
不知不觉自学ios已经四个月了,从OC语法到app开发,过程虽然枯燥无味,但是结果还是挺有成就感的,在此分享我的ios开发之路中的小小心得~废话不多说,先上我们今天要实现的效果图: 有过一点做APP经 ...
- Fresco从配置到使用(最高效的图片加载框架)
Frescoj说明: facebook开源的针对android应用的图片加载框架,高效和功能齐全. 支持加载网络,本地存储和资源图片: 提供三级缓存(二级memory和一级internal ...
- iOS 正确选择图片加载方式
正确选择图片加载方式能够对内存优化起到很大的作用,常见的图片加载方式有下面三种: //方法1 UIImage *imag1 = [UIImage imageNamed:@"image.png ...
- iOS 解决LaunchScreen中图片加载黑屏问题
iOS 解决LaunchScreen中图片加载黑屏问题 原文: http://blog.csdn.net/chengkaizone/article/details/50478045 iOS 解决Lau ...
随机推荐
- POP3协议(电子邮件邮局协议)中UIDL和TOP命令在实际使用中的作用
POP3是电子邮件协议中用于接收邮件的协议,相较于发送邮件的SMTP协议,POP3的命令要多一些.主要的命令有LIST.STAT.RETR.DELE.UIDL.TOP.QUIT,以及用于登录邮箱的US ...
- vue3 - 事件处理之事件修饰符
内容取自>> <!-- 阻止单击事件冒泡 --> <a v-on:click.stop="doThis"></a> <!-- ...
- 2021.07.20 P3951 小凯的疑惑(最大公因数,未证)
2021.07.20 P3951 小凯的疑惑(最大公因数,未证) 重点: 1.最大公因数 题意: 求ax+by最大的表示不了的数(a,b给定 x,y非负). 分析: 不会.--2021.07.20 代 ...
- fpm工具来制作rpm包软件
第1章 rpm包的制作 1.1 fpm的概念介绍 FPM功能简单说就是将一种类型的包转换成另一种类型 1.1.1.支持的源类型 类型 说明 dir 将目录打包成所需要的类型,可以用于源码编译安装的 ...
- C3P0反序列化链学习
C3P0 c3p0第一次听闻是用于fastjson的回显上,大佬们总结三种方法,后面两种主要就是用于fastjson和jackjson的回显利用(注入内存马) http base jndi hex序列 ...
- Python 函数进阶-高阶函数
高阶函数 什么是高阶函数 高阶函数就是能够把函数当成参数传递的函数就是高阶函数,换句话说如果一个函数的参数是函数,那么这个函数就是一个高阶函数. 高阶函数可以是你使用def关键字自定义的函数,也有Py ...
- [AcWing 862] 三元组排序
点击查看代码 #include <iostream> #include <algorithm> using namespace std; const int N = 1e5 + ...
- 关于div及display
1.DIV div被看作是一个盒子,可以设置width.height.这个盒子其实是由三部分构成width(height).padding.border.在默认情况下,所见到的div是border和p ...
- vue - Vue路由(扩展)
忙里偷闲,还在学校,趁机把后面的路由多出来的知识点学完 十.缓存路由组件 让不展示的路由组件保持挂载,不被销毁 在我们的前面案例有一个问题,都知道vue的路由当我们切换一个路由后,另一个路由就会被销毁 ...
- Angular中懒加载一个模块并动态创建显示该模块下声明的组件
angular中支持可以通过路由来懒加载某些页面模块已达到减少首屏尺寸, 提高首屏加载速度的目的. 但是这种通过路由的方式有时候是无法满足需求的. 比如, 点击一个按钮后显示一行工具栏, 这个工具栏组 ...