技术开发 频道

Swing第二刀:枝间新绿一重重

  右侧快捷列表的分割文字,也是通过如下xml进行定义:

<shortcuts>  
<separator text="Most Often Used Reports"/>  
<shortcut text="Add a Part" tooltip="Tooltip"                          
icon="/free/test/submodule.png" action="Z010"/>  

  分隔条可以携带一个文字,用来对很多列表项进行分组:

右侧快捷列表的

  还有工具条也是可以配置的。工具条在这个框架里被放在了模块栏的顶部。通过如下XML配置其按钮:

<?xml version="1.0" encoding="UTF-8"?>  
<toolbar>  
<button tooltip="Tooltip" icon="/free/test/message.png" action="B001" />    
<separator/>  
<button tooltip="Tooltip" icon="/free/test/user.png" action="B001" />  
<separator/>  
<button tooltip="Tooltip" icon="/free/test/email.png" action="B001" />  
<separator/>  
<button tooltip="Tooltip" icon="/free/test/viewer.png" action="B001" />  
<separator/>  
<button tooltip="Tooltip" icon="/free/test/chart.png" action="B001" />  
<separator/>  
<button tooltip="Tooltip" icon="/free/test/capture.png" action="B001" />  
<separator/>  
<button tooltip="Tooltip" icon="/free/test/image_edit.png" action="B001" />  
<separator/>  
</toolbar>

  其中定义了一个分割竖线 ,完全美观之用。显示效果如下:

右侧快捷列表的

  最后一个配置项是软件右上角的LOGO。每个系统都想有一个地方漂亮的显示咱家的LOGO,那才有成就感!这里通过menubar菜单的XML文件如下配置:

<logo image="/free/test/logo_company.png" tooltip="WPT Power Transmission" />

  可以对图片、tooltip进行定义。显示效果如下:

右侧快捷列表的

  这样,一个完整的”纯绿色“应用程序框架就差不多被”配置“出来了。

0