Oracle® Fusion Middleware ?· Oracle® Fusion Middleware Developing Swing Applications for Oracle Application…

Download Oracle® Fusion Middleware ?· Oracle® Fusion Middleware Developing Swing Applications for Oracle Application…

Post on 01-Aug-2018

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

<ul><li><p>Oracle Fusion MiddlewareDeveloping Swing Applications for Oracle Application Development Framework </p><p>12c (12.1.2) </p><p>E22580-01</p><p>June 2013</p><p>Describes how to create and deploy Swing desktop applications using ADF Swing and Oracle Application Development Framework (Oracle ADF).</p></li><li><p>Oracle Fusion Middleware Developing Swing Applications for Oracle Application Development Framework 12c (12.1.2)</p><p>E22580-01</p><p>Copyright 2013 Oracle and/or its affiliates. All rights reserved.</p><p>Primary Author: Ralph Gordon</p><p>Contributing Author: David Mathews, Cindy Hall</p><p>This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.</p><p>The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.</p><p>If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:</p><p>U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.</p><p>This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.</p><p>Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p><p>Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.</p><p>This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.</p></li><li><p>iii</p><p>Contents</p><p>Preface ................................................................................................................................................................ vii</p><p>Audience...................................................................................................................................................... viiDocumentation Accessibility .................................................................................................................... viiRelated Documents .................................................................................................................................... viiConventions ............................................................................................................................................... viii</p><p>1 Introduction to ADF Swing Applications</p><p>1.1 About ADF Swing ............................................................................................................ 1-11.1.1 Advantages of Using ADF Swing .............................................................................. 1-11.1.2 ADF Swing Architecture ............................................................................................ 1-21.1.2.1 Swing MVC ......................................................................................................... 1-21.1.2.2 Oracle Application Development Framework ..................................................... 1-31.2 Creating a Desktop Application That Works with Oracle ADF ........................................ 1-31.3 What Happens When You Create a Desktop Application with ADF Swing .................... 1-41.4 Connecting to Business Components ............................................................................... 1-51.4.1 How to Modify the Configuration Name ................................................................... 1-51.4.2 How to Modify the Configuration File ...................................................................... 1-61.4.3 What You May Need to Know About the Client Application Libraries ..................... 1-6</p><p>2 Creating ADF Swing Forms and Panels</p><p>2.1 About Creating ADF Swing Forms and Panels ................................................................ 2-12.1.1 ADF Swing Design Time Wizards ............................................................................. 2-22.1.2 A Typical ADF Swing Form ....................................................................................... 2-22.1.3 Navigation in an ADF Swing Form ........................................................................... 2-32.2 Process for Creating ADF Swing Panels and Forms ......................................................... 2-42.3 What Happens When You Create an ADF Swing Form ................................................... 2-52.4 What You May Need to Know About ADF Swing Code Generation ............................... 2-52.5 What You May Need to Know About Business Components Attribute Settings ............. 2-62.6 How to Create a Client Data Model Definition ................................................................ 2-62.7 How to Create a Single Table ADF Swing Form .............................................................. 2-72.8 How to Create a Master-Detail ADF Swing Form ............................................................ 2-82.9 How to Create an Empty ADF Swing Form ..................................................................... 2-92.10 How to Create an Empty ADF Swing Panel ................................................................... 2-102.11 How to Create ADF Swing Edit Forms from the Data Controls Panel ........................... 2-112.12 How to Create ADF Swing Forms from the Databases Window .................................... 2-12</p></li><li><p>iv</p><p>3 Modifying ADF Swing Forms and Panels</p><p>3.1 About Modifying ADF Swing Forms and Panels ............................................................. 3-13.1.1 Value Bindings for the Entire Collection or Data Object ............................................ 3-13.1.2 Value Bindings for Individual Data Object Attribute Values .................................... 3-23.2 How to Assemble ADF Swing Forms Using the Java Visual Editor ................................. 3-33.3 How to Insert UI Components into ADF Swing Panels ................................................... 3-43.4 How to Change Client Data Model References ................................................................ 3-53.5 How to Open an ADF Swing Form with an Action Handler ........................................... 3-63.6 How to Drop Data Panels Onto an Empty ADF Swing Form .......................................... 3-73.7 How to Lay Out Data Panels in an Empty Swing Form ................................................... 3-73.8 Binding a Method with Parameters in an ADF Swing Form ............................................ 3-73.8.1 How to Populate the Data Controls Panel with JavaBean Methods .......................... 3-83.8.2 How to Create an ADF Swing Form with Method Bindings ..................................... 3-83.8.3 What You May Need to Know About Displaying a Method Result Using a JTable </p><p>Component ................................................................................................................ 3-9</p><p>4 Working with Data Binding</p><p>4.1 About Working With Data Binding ................................................................................. 4-14.1.1 ADF Swing Containers .............................................................................................. 4-24.1.2 Standard Java Containers .......................................................................................... 4-24.2 Navigating the UI Using ADF Swing Controls ................................................................ 4-24.2.1 How to Navigate Using the Navigation Bar .............................................................. 4-34.2.2 How to Navigate Using Tree Navigation .................................................................. 4-34.3 What You May Need to Know About the ADF Swing Data Context ............................... 4-44.4 What Happens at Runtime: How Panel Bindings Function ............................................. 4-44.5 What You May Need to Know About the ADF Swing Bootstrap Code ........................... 4-54.6 How to Display Object Attributes in a Databound Text Field .......................................... 4-64.7 How to Create a New Row in a Databound Table or Tree Control .................................. 4-74.8 How to Sort Columns in a Databound Table ................................................................... 4-74.9 What Happens At Runtime: How Control Bindings Function ......................................... 4-84.9.1 Populating Controls with Data .................................................................................. 4-84.9.2 Updating Data through Controls ............................................................................... 4-8</p><p>5 Customizing ADF Bindings</p><p>5.1 About Customizing ADF Bindings .................................................................................. 5-15.2 How to Customize ADF Bindings for ADF Swing Panels ................................................ 5-25.3 How to Customize an ADF Action Binding ..................................................................... 5-35.4 How to Customize an ADF Attribute Binding ................................................................. 5-55.5 How to Customize an ADF Array Combobox Binding .................................................... 5-65.6 How to Customize an ADF Boolean Binding ................................................................... 5-75.7 How to Customize an ADF Bounded Range Binding ...................................................... 5-85.8 How to Customize an ADF Formatted Text Field Binding ............................................ 5-105.9 How to Customize an ADF Iterator Binding .................................................................. 5-115.10 How to Customize an ADF List Binding ........................................................................ 5-125.11 How to Customize an ADF List Binding in Enumeration Mode .................................... 5-135.12 How to Customize an ADF List Binding in LOV Mode ................................................. 5-15</p></li><li><p>v</p><p>5.13 How to Customize an ADF LOV Button Binding ........................................................... 5-175.14 What You May Need to Know About the LOV Dialog .................................................. 5-195.15 How to Customize an ADF Scroll Binding ..................................................................... 5-205.16 How to Customize an ADF Table Binding ..................................................................... 5-215.17 How to Customize an ADF Tree Binding ....................................................................... 5-23</p><p>6 Displaying Graphs in ADF Swing Panels</p><p>6.1 About Graphs in ADF Swing Panels ................................................................................ 6-16.2 How to Create a Graph for an ADF Swing Panel ............................................................. 6-36.3 What Happens When You Create a Graph Component ................................................... 6-56.4 How to Customize the Graph Component ....................................................................... 6-76.5 How to Change Graph Data ............................................................................................. 6-7</p><p>7 Working with ADF Swing Controls</p><p>7.1 About ADF Swing-Specific Controls ................................................................................ 7-17.2 How to Use the JUArrayComboBox Control .................................................................... 7-27.3 How to Use the JUImage Control ..................................................................................... 7-37.4 What You May Need to Know About Multimedia in ADF Swing Applications .............. 7-47.5 How to Use the JULabel Control ...................................................................................... 7-47.6 How to Use the Label For Control .................................................................................... 7-57.7 How to Use the JULovEditButton Control ....................................................................... 7-67.8 How to Use the JUNavigationBar Control ....................................................................... 7-67.9 How to Use the JUNavigationBar Control with Find Mode ............................................. 7-77.10 How to Disable Find Mode for ADF Swing Controls in a Panel ...................................... 7-87.11 What You May Need to Know About Iterator Bindings in Find Mode ............................ 7-87.12 How to Use the JURadioButtonGroupPanel Control ..................................................... 7-107.13 How to Use the JUShuttlePanel Control ......................................................................... 7-107.14 How to Use the JUStatusBar Control .............................................................................. 7-11</p><p>8 Using Validation in the ADF Swing...</p></li></ul>