JIDE动作框架开发者指南:打造功能强大的工具栏与菜单设计

需积分: 12 4 下载量 193 浏览量 更新于2024-07-29 收藏 1.6MB PDF 举报
JIDE Action Framework (动作框架)是一套专为Java应用程序设计的高级工具栏和菜单栏解决方案,旨在增强界面的可定制性和功能性。它提供的CommandBar组件替代了Swing标准的JToolBar和JMenuBar,支持多种风格,如Office 2003、Office 2007、Visual Studio .NET、Office XP、Xerto、Eclipse以及Mac OS X的Aqua风格,提供了丰富的视觉体验。 该开发员技术手册主要介绍了以下关键知识点: 1. **目的与适用范围**:文档面向的是希望使用JIDE Action Framework进行开发的开发者,目的是帮助他们创建具备更多特性和更好外观的工具栏和菜单栏。 2. **组件和功能**: - CommandBar:作为核心组件,支持随意拖放,大小可调整,能放置于窗口四周,并且可以浮动展示或隐藏。不仅适用于主窗口,还支持子窗口。 - JideButton和JideSplitButton:前者是常规按钮的替代,后者则包含一个按钮和下拉菜单,可用于扩展功能。 - JideColorSplitButton:允许用户选择颜色。 - JideMenu:专为CommandBar设计的下拉菜单,包含各种控件选项。 - Layout Management:支持Java内置的首选项保存和加载布局,以及文件保存、流操作,还能列出并切换不同的布局模式。 3. **风格和Look and Feel**:文档详细介绍了多种预设风格,包括Office 2003和2007样式、Visual Studio .NET风格、Eclipse风格等,以及对Mac OS X平台的Aqua风格的支持。 4. **Dockable Bar Manager**:允许用户管理可移动的工具栏,通过DockableBar组件实现灵活的界面布局。 5. **事件处理与国际化**:文档涵盖了DockableBar的相关事件处理机制,以及对国际化的支持,确保应用在不同语言环境下正常运行。 6. **布局持久化**:JIDE Action Framework能够持久保存和加载布局信息,便于跨会话使用和应用间的切换。 7. **与JIDE Docking Framework集成**:该框架与JIDE的Docking Framework结合,提供了更强大的窗口管理能力。 通过本技术手册,开发者可以深入了解如何充分利用JIDE Action Framework来提升他们的Java应用在用户界面方面的表现和用户体验。
2012-02-18 上传
杰地桌面应用框架 Desktop Application Framework 对于大多数开发人员来说,做一个小的Swing应用程序很容易。用JFrame和大多数Swing组件都不难。再加上JIDE提供的一些组件,把它们都用在一起也还行。可是,当您的应用程序越来越大时,问题就出现了。您会发现Swing的应用程序无规律可循。比如说,让您做出一个多文档界面,外面根本没有这样的框架可借鉴。从我们多年的经验来看,我们还很少看到小的Swing项目。这也不奇怪。事实上,很多企业在选择用Swing时,都是因为项目很大。感觉上Swing就是要么不做,要是做的话,Swing的项目一定是大项目。不过问题就出在这。大项目,如果没有规律可循,实在有点让人不放心。 我们当然也注意到这个问题,所以才引进了这样一个桌面应用程序框架。 和网页方面的开发不一样,桌面软件开发没有什么优秀的架构。一方面,您们应该听说过JSR 296。它提供一个非常简单的框架。不幸的是这个项目随着Hans Muller这个最初的作者离开Sun之后,基本上处在一个半死不活的状态。另外一方面,我们有Eclipse和NetBeans中两个RCP平台。您要是用过这两个平台,您就会发现它们怎么这么复杂。也不怪它们。它们最初都是Java IDE方面应用程序的底层,经过多年的改动和调整,才形成目前的RCP平台,所以或多或少还有一些拼凑的成分在里面。所以我们还是需要一个平台。它要强大但是灵活,可以支持跨平台应用程序,不像JSR 296。与此同时,它还要易于使用和维护,不像那两个RCP平台。 我们很高兴地推出杰地桌面应用框架 Desktop Application Framework (简称JDAF)!JDAF 是有史以来第一个跨平台的应用程序平台。为什么这么说呢?难道Swing不是吗?Swing的确可以在各个平台上运行,可是区别就在它仅仅是可以运行,而不能和平台完美结合。只有JDAF才可能让您写一次代码,产生的应用程序,不但是可以运行,还可以符合各个平台的界面设计要求。 JDAF 基于一个强大的“Managed Application”的技术,意思就是应用程序的生命周期都在我们这个平台的管理之下。它还提供了很多现成的功能,让您随时可以用。比如,Model-View-Controller 架构下的data-view的管理。比如,符合各个平台界面设计标准的标准对话框、菜单、工具栏、图标等等。再比如,打印和帮助集成,还有一个产生console类型应用程序的框架。所有这些都让JDAF成为最强大最易用的桌面应用程序开发平台。 主要功能 "Managed Desktop Application" - facilitates the entire application lifecycle OS Guidelines-driven Application UI - Supports Java Cross Platform, Linux/Gnome, Mac OS X, Windows XP Model-View-Controller Architecture - data and view management GUI and Console Application Support - or extend to make your own application types Integration with JIDE Docking Framework, Action Framework, and other components Robust File-Handling - unprecedented file-based application support Polymorphic Resource Binding - bind resource bundles to objects automatically ObjectFormat - powerful MessageFormat replacement makes localization easier Command Line Parsing - capture, parse, convert and type check command line arguments Environment Variables - capture and access environment variables, single 1.4.2+ solution FileFormat API marshals data to/from application - default support for common formats Map file formats to data views Robust implementation of platform-dependant, application-specific file system checks 20+ file-related OS-specific standard dialogs such as save alerts and file replace Recent Documents menu with native path formatting Printing Integration - compatible integration of the Java Printing API Help Integration - snap-in integration of your existing help system Open files from the command line Comprehensive JavaDoc and Developer Guide, including migration guide Optional JSR-296 Compatibility API JDAF Wizard - code generation wizard gets you going quickly Desktop Application UI (按照 OS 界面设计指南) Standard Windows - automatic windowing harness manages UI, emulates native document windowing behavior such as titling semantics, dirty status, and dialog interaction Supports SDI, MDI, TDI, Split, Docking, and mixed windowing styles Standard Icons - platform icons for Actions, including large icon support Standard Menus - Fully functional implementations of File, Edit, Window, and Help menus Standard Toolbars - Fully functional implementations of standard toolbars Standard Dialogs - Organizes dialogs and provides highest-fidelity and integration features Unique OS behavior such as automatic Mac OS X system integration, Windows XP MDI and arrange commands, Linux document age in dialogs, and much more... 一些重要的类 DesktopApplication - root class serves as the controller and center of your application GUIApplication - OS Guidelines-driven GUI application with managed UI FileBasedApplication - direct support for document-centric applications ConsoleApplication - direct support for console applications (Yes, and MVC console application!) ApplicationLifecycleListener - listen to application lifecyle events DataModel/DataModelFactory/DataModelListener - create and manage datspan and datspan lifecycle DataView/DataViewFactory/DataViewListener - create and manage views and view lifecycle ApplicationFeature - create reusable, cross-cutting application features ApplicationAction - Create application-related Actions. Over 30 standard Actions installed and pre-wired MenubarCustomizer - Modify the standard menus and create your application-specific menus ToolBarCustomizer - Modify the standard toolbar and create your application-specific toolbars DialogRequest/DialogResponse/DialogListener - Request/response model for dialogs that facilitate native fidelity, dialog caching, and lifecycle Resources - read and convert resource values, bind resources to objects