提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
一款能通过使用AJAX技术在网页上显示动态实时图片的瘦客户端解决方案
标签:JavaAJAX工业4.0开发商: Generic Logic
当前版本: v4.0
产品类型:控件
产品功能:图表
平台语言:JAVA
开源水平:不提供源码
本产品的分类与介绍仅供参考,具体以商家网站介绍为准,如有疑问请来电 023-68661681 咨询。
GLG图片服务器是一款瘦客户端解决方案,它能通过使用AJAX技术在网页上显示动态实时图片。并且能代替胖客户端操作方法,只需使用客户端上最小限度的功能。
通过基于瘦客户端方法的AJAX,当大部分应用程序进程在中心服务器上运行时,客户端能实现只需使用行业标准HTML与JavaScript显示前台的功能。为显示基于输入数据而动态更新的图片,服务器需要根据每个图像需求转化图片的图像。
The GLG Graphics Server is a thin-client solution for displaying dynamic real-time graphics on a web page using AJAX technology. It is an alternative to the thick client approach and requires only minimal capabilities on the client.
With the AJAX-based thin client approach, the client side serves as a display front end that uses only the industry-standard HTML and JavaScript, while most of the application processing is performed on the central server. To display graphics that update dynamically based on the input data, the server needs to render the image of the graphics on each image request.
声明:本产品中文介绍为慧都网版权所有,未经慧都公司书面许可,严禁拷贝、转载!
* 关于本产品的分类与介绍仅供参考,精准产品资料以官网介绍为准,如需购买请先行测试。
网页上的动态图形界面就是使用—GLG Graphics Builder图形编辑器创建的。通过该创建程序,开发人员能绘制图片对象、定义属性以及为使用实时数据进行动态化的绘图添加动态效果和定义资源。
除了能从零开始创建绘图外,图片创建程序还能提供预定义部件调色板,如dials and meters, graphs以及process control symbols,这些都能通过拖放功能添加到绘制中。创建程序还能使用户定义自定义的图标,并把它们作为可重复使用的控件添加到调色板中。
通过创建程序的帮助,创建与维护图片的工作(从简单的数字化报表到复杂的视觉化操作与自定义HMI屏幕显示)可在一个交互式的点选环境中完成。可在不涉及任何程序的情况下在创建程序中简单地编辑图片。当更新的绘图被保存时,它就已经准备好在不重新编译源代码的情况下被图片服务器使用。
如所说,GLG绘制为独立的屏幕分辨率并能在运行时调整大小。根据客户端屏幕的大小,相同的绘制能用于转化不同分辨率的图像。
使用图片创建程序制作的绘图可展现运行时在应用程序网页上显示的图片。例如,创建自定义AJAX数字报表显示图片与仪表,你能简单地在图片创建程序中打开新绘图,从调色板中添加图片与仪表,为运行时的数据访问命名以及保存绘图。
当在图片创建程序中时,你同样能更改对象属性、在页面上编辑对象布局、添加自定义标签和注释或使用创建程序的倾斜、阴影与透明效果制作自定义装饰。
另一种创建AJAX数字报表的方法是在单一的HTML页面上结合多个widget,就象在GLG AJAX数字报表演示文件中展示的那样。每一完备的widget都使用它们自己的服务器端的servlet以及它能在多网页上以能重复使用的控件的模式进行部署。
除了简单的数字报表,精细的自定义图片显示能在创建程序中制作并能在网页上进行部署,就如所说。
运行时,图片服务器会加载GLG绘图并使用它生成动态图像,在处理每个图像请求前用当前数据更新绘图。绘图包含了所有图片对象的定义与它们的动态操作。当加载绘图时,它被反复用来在没有重新制作图片请求的情况下生成网页图像。
当一个客户端处理一个图像请求时,图片服务器使用当前数据创建了一个绘图的截图。一个图像请求可能包含能定义图像大小的参数、在刻度盘中显示的值、图片的标题或其它自定义属性。例如,在进程控制演示文件中图像请求包含show_pipes参数。如果该参数被设置为1,生成的图像会显示连接到罐子的管道。图像生成参数会使用标准的URL参数语法传送到图片服务器。
生成图像之前,图片服务器会通过设置绘图资源使用当前数据更新该绘图。当在运行中使用SetResource() API程序通过servlet创建与访问绘图时,资源将在图片创建程序中定义。
当更新绘图时,servlet可通过触发CreateImage() API程序生成图像。这个简单的图片服务器程序会在所有对象的当前动态状态下监控转化所有对象的复杂任务。
查看一个显示动态生成的图像的URL范例。重新加载以查看新数据或更改URL的宽度/高度参数以更改图像大小。一个"&show_pipes=1"参数可添加到URL以激活管道显示。在一个应用程序中,如所说,一个JaveScript记时程序会用于定时地重新加载图像以显示新数据。
在JSP环境中,将图片服务器作为GLG Servlet进行部署—一个100%纯正的可与任何Java2EE应用程序服务器兼容的Java servlet。
会提供Servlet的源代码并且应用程序开发人员能根据应用程序的要求将这些代码进行自定义操作。例如,servlet能分享所有servlet示例中的绘图或为每一个单一的servlet会话创建一个独立的绘图示例。
当使用自定义绘图时,servlet代码可能会被修改以设置在绘图中定义的应用程序资源,也会处理特定的应用程序的用户互动。
GLG Servlet采用包含GLG工具包对象以及转化引擎的GlgServer.jar类库。类库既提供GLG标准又提供在GLG Java类文档中描述的扩展API。GLG标准API为访问资源提供程序以运用实时数据更新绘图。扩展API为高级功能提供程序,功能包括创建对象或请求在绘图中定义的资源列表。例如,扩展API会在运行时用于创建大量的动态图标以详解航空信息。
在应用程序中,servlet能从任何数据源中请求数据,如PLC或进程数据库,它还能使用JDBC、Java OPC或任何其它喜欢的数据连接API。除此之外,还可运用HTML或JavaScript通过图像URL参数提供数据。
Servlet可通过设置使用GLG SetResource程序的绘图资源用新数据更新绘图。当创建绘图时,用于动态化具备数据的绘图的资源将在图片创建程序中进行定义。
例如,在进程控制演示文件中使用的绘图里,一个名为"Heater"的对象拥有一个名为"HeaterLevel"能控制加热罐填充度的资源。当绘图被用于servlet中时,servlet可通过使用名为"Heater/HeaterLevel"的资源更新填充度。操作如下:
SetDResource( "Heater/HeaterLevel", heater_level_var );
资源的使用可帮助您将图片从程序逻辑中分离出来。应用程序可简单地设置一个名为"Heater/HeaterLevel"逻辑资源,并且GLG图片引擎会监控对象图片转化的所有低级别详细信息。
除了生成动态图像,servlet可通过处理基于AJAX的请求以处理用户互动。这些请求通常用于对象选择、消息提示以及用户输入,如使用鼠标在绘图中点击按键。这些功能都在进程控制与其它演示文件中进行了说明。
处理用户互动,JavaScript被用于应用程序的网页中以将onclick and onmousemove事件添加到图像中。当用户点击图像或将鼠标指针移动到图像之上时,在脚本中会触发事件处理程序。事件处理程序会将对象选择的AJAX请求发送到图片服务器,并将鼠标坐标作为请求参数进行传送。图片服务器会根据鼠标坐标通过寻找选定对象处理请求。Servlet会在服务器端处理选项或将选项信息返回给客户端用于处理。
客户端可使用选择请求到弹出消息提示的输出、显示选定对象的名称或执行数据下钻操作。例如,当使用鼠标选定对象时,进程控制演示可显示具有对象数据的对话。当鼠标移动到绘图中已命名对象时,可显示消息提示。如果按下绘图底部的Show 3D Pipes键,可在图像中显示连接到罐与阀门的管道。
消息提示与对象选择事件通过在服务器端的GLG图片服务器引擎进行处理,并且不需要在客户端的浏览器中创建的图像地图或矢量对象。此项技术可在忽略与已使用图像地图相关的HTML运行限制的情况下处理大量矢量对象。
查看生成图像与处理用户互动请求的GLG Servlet的所有源代码。
因为在没有图像地图内置到HTML的情况下将在服务器端处理选择与消息提示事件,所以当绘图中对象的几何外形被改变时,不需重新生成HTML页面。
当绘图包含动态移动图标时(如的展示),服务器端对选择事件的处理只是实用性选项。在这种情况下,不可能为图标选择生成的静态图像地图,因为图标改变了它们的位置。由于运行限制,每当图标移动时使用AJAX动态地生成图像地图将是不切实际的。这就使服务器端选择处理成为了唯一的实用选项。
Interactive Graphical Editor
The dynamic graphical screens displayed on web pages are created interactively using a graphical editor - the GLG Graphics Builder. Using the Builder, a developer can draw graphical objects, define their properties, as well as attach dynamics and define resources for animating the drawing with real-time data. The drawing is saved into a file and used by the Graphics Server for image generation.
In addition to creating drawings from scratch, the Graphics Builder provides palettes of pre-built widgets, such as dials and meters, graphs and process control symbols, which can be added to the drawing using Drag and Drop. The Builder also allows the user to define custom symbols and add them to a palette as reusable components.
With the help of the Builder, the job of creating and maintaining graphics, from simple dashboards to complex visualizations and custom HMI screens, is done in an interactive, point-and-click environment. The graphics may be easily edited in the Builder with no programming involved. Once the updated drawing is saved, it is ready to be used by the Graphics Server without recompiling the source code.
The GLG drawings are screen-resolution independent and may be scaled at run-time, as shown in the demos. The same drawing may be used to render images of various resolutions depending on the size of the client's screen.
Custom AJAX Dashboards
The drawings created using the Graphics Builder represent the dynamic graphics displayed on the application's web pages at run time. For example, to create a custom AJAX Dashboard displaying a few graphs and meters you can simply open a new drawing in the Graphics Builder, add a few graphs and meters to it from a palette, name them for run-time data access and save the drawing.
While in the Graphics Builder, you can also change object properties, edit the object layout on the page, add custom labels and annotations or draw custom decorations using the Builder's gradient, shadow and transparency effects.
An alternative way to build an AJAX Dashboard is to combine several widgets on a single HTML page, as shown in the GLG AJAX Dashboard demo. Each self-contained widget is using its own server-side servlet and it may be deployed as a reusable component on multiple web pages.
In addition to simple dashboards, elaborate custom graphical displays may be created in the Builder and deployed on a web page, as shown in the demos.
Run-Time Image Generation
At run-time, the Graphics Server loads the GLG drawing and uses it to generate dynamic images, updating the drawing with the current data before processing each image request. The drawing contains definitions of all graphical objects and their dynamic actions. Once the drawing is loaded, it is used to generate web images over and over without the overhead of recreating the graphics on every request, resulting in superior server performance.
When a client issues an image request, the Graphics Server creates a snapshot image of the drawing using the current data. An image request may contain parameters that define an image size, a value to be displayed in a dial, a title for a graph or other custom attributes. For example, in the process control demo the image request contains the show_pipes parameter. If this parameter is set to 1, the generated image will display pipes connecting the tanks. The image generation parameters are passed to the Graphics Server using the standard URL parameter syntax.
Before generating an image, the Graphics Server updates the drawing with the current data by setting the drawing's resources. The resources are defined in the Graphics Builder when the drawing is created and accessed by the servlet at run time using the SetResource() API method.
When the drawing is updated, the servlet generates an image by simply invoking the CreateImage() API method. This single method of the Graphics Server takes care of the complicated task of rendering all objects in the drawing in their current dynamic state.
Click here to see an example of a URL showing a dynamically generated image. Reload the page to see new data or change the width/height parameters of the URL to change image size. A "&show_pipes=1" parameter may be appended to the URL to activate the pipe display. In an application, a JavaScript timer may be used to reload the image periodically to display new data as shown in the demos.
Servlet Customization
In the JSP environment, the Graphics Server is deployed as a GLG Servlet - a 100% pure Java servlet that may be used with any compliant Java2EE Application server.
The source code of the servlet is provided and may be customized by the application developers according to the application requirements. For example, the servlet may share one drawing between all servlet instances or create a separate instance of the drawing for each servlet session.
When a custom drawing is used, the servlet code may be modified to set the application-specific resources defined in the drawing, as well as handle an application-specific user interaction.
The GLG Servlet uses the GlgServer.jar class library that contains GLG Toolkit's object and rendering engine. The class library provides both the GLG Standard and Extended APIs described in the documentation of the GLG Java classes. The GLG Standard API provides methods for accessing resources to update the drawing with real-time data. The Extended API provides methods for advanced features, such as creating objects programmatically or querying a list of all resources defined in the drawing. For example, the Extended API may be used at run time to create a variable number of dynamic icons representing airplanes as shown in the GIS and AirTraffic Control demos.
Dynamic Data Supply
In an application, the servlet can query data from any data source, such as a PLC or process database, using JDBC, Java OPC or any other preferred data connectivity API. Alternatively, the data may be supplied by the HTML or JavaScript via the parameters of the image URL.
The servlet updates the drawing with the new data by setting the drawing's resources using GLG's SetResource methods. The resources for animating the drawing with data are defined in the Graphics Builder when the drawing is created.
For example, in the drawing used in the process control demo, an object named "Heater" has a resource named "HeaterLevel" that controls the fill level of the heater's tank. When the drawing is used in the servlet, the servlet updates the fill level by using the "Heater/HeaterLevel" resource name as follows:
SetDResource( "Heater/HeaterLevel", heater_level_var );The use of resources helps to separate graphics from the programming logic. The application simply sets a logical resource named "Heater/HeaterLevel", and the GLG's graphics engine takes care of all low-level details of rendering the objects' graphics.
AJAX-Based User Interaction
In addition to generating dynamic images, the servlet may handle user interaction by processing AJAX-based requests for object selection, tooltips and user input, such as pressing buttons in the drawing with the mouse. These features are demonstrated in the process control and other demos.
To handle user interaction, JavaScript is used in the application's web pages to add onclick and onmousemove event handlers to the image. When the user clicks on the image or moves the mouse over it, an event handler is invoked in the script. The event handler sends an object selection AJAX request to the Graphics Server, passing the mouse coordinates as parameters of the request. The Graphics Server processes the request by finding an object selected by the mouse coordinates. The servlet may process the selection on the server side or return the selection information back to the client for processing.
The client may use the output of the selection request to popup a tooltip, display the name of the selected object or execute a drill-down action. For example, the process control demo displays a dialog with the object's data when the object is selected with the mouse. A tooltip is displayed when the mouse is moved over a named object in the drawing. If the Show 3D Pipes button at the bottom of the drawing is pressed, the pipes connecting the tanks and valves will be displayed in the image.
The tooltips and object selection events are processed by the GLG Graphics Server's engine on the server side, with no image maps or vector objects created in the browser on the client side. This technique handles a large number of vector objects in the drawing without the HTML performance limitations related to a number of used image maps.
Click here to see the full source code of the GLG Servlet for generating images and handling user interaction requests.
Since the selection and tooltip events are processed on the server side with no image maps embedded in HTML, the HTML pages do not need to be regenerated when the geometry of the objects in the drawing is changed.
The server-side processing of selection events is the only practical option when the drawing contains dynamic moving icons, as shown in the Airtraffic Control Demo. In this case, generating static image maps for the icon selection is simply impossible, since the icons change their position. Using AJAX to generate image maps dynamically every time the icon moves, would be also impractical due to the performance limitations. This leaves the server-side selection processing as the only practical alternative.
更新时间:2018-02-28 17:01:26.000 | 录入时间:2008-09-11 13:41:21.000 | 责任编辑:何家巧
为开发高级图形的动态界面而设计的框架,是完全动画的图形对象。智能制造推荐产品,帮助企业领跑工业4.0。
DHTMLX 超值正版套包DHTMLX旗下Diagram、Sute、Pivot、Gantt等插件正版授权合集
JointJSJointJS 是一款基于 JavaScript 的开源库,用于创建基于 HTML5 的交互式图表
SciChart WPF Charts一款实时、高性能的WPF图表库,专为金融、医疗和工程应用而设计。
SciChart JavaScript Charts一款用于Web的高性能JavaScript图表和图形库。
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@cahobeh.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢