Semantic Web Service Composition Via Logic-Based Program Synthesis

Total Page:16

File Type:pdf, Size:1020Kb

Semantic Web Service Composition Via Logic-Based Program Synthesis Jinghai Rao Semantic Web Service Composition via Logic-based Program Synthesis Department of Computer and Information Science Norwegian University of Science and Technology N-7491 Trondheim, Norway Norwegian University of Science and Technology Faculty of Information Technology, Mathematics and Electrical Engineering Department of Computer and Information Sciences N-7491 Trondheim Norway Dr.Ing. Thesis 2004:121 ISBN 82-471-6464-7 (printed ver.) ISBN 82-471-6463-9 (electronic ver.) ISSN 1503-8181 Abstract The ability to efficiently select and integrate inter-organizational heteroge- neous Web services at runtime is an important requirement to the success of Web service provision. In a Web service application, if there is no single Web service that can satisfy the functionality required by the user, there should be a program or a software agent which can automatically combine existing ser- vices together in order to fulfill the request. The aim of this thesis is to view the Web service composition problem from the viewpoint of logic-based program synthesis and to propose an agent-based framework for supporting the composition process in a scalable and flexible manner. The approach described in this thesis uses Linear Logic-based theo- rem proving to assist and automate the composition of Semantic Web services. The approach uses a Semantic Web service language, DAML-S, for the exter- nal presentation of Web services, while, internally, the services are presented by extralogical axioms and proofs in Linear Logic. Linear Logic, as a resource conscious logic, enables us to capture the concurrent features of Web services formally (including parameters, states and non-functional attributes). The ap- proach uses a process calculus to present the process model of the composite service. The process calculus is attached to the Linear Logic inference rules in the form of type theory. Thus, the process model for a composite service can be generated directly from the complete proof. We introduce a set of subtyp- ing rules that define the valid dataflow for composite services. The subtyping rules that are used for semantic reasoning are presented with Linear Logic in- ference figures. The composition system is based on a multi-agent architecture, AGORA. The agent-based design enables the different components of the Web service composition system, such as the theorem prover, semantic reasoner and translator, to be integrated in a loosely coupled manner. We conclude by discussing how this approach has been directed to meet the main challenges in Web service composition. First, it is autonomous such that the users are not required to analyze the huge amount of services available manually. Second, it has good scalability and flexibility such that the composi- tion performs reasonably well in a dynamic environment. Third, it solves the heterogeneity problem because semantic information is used for matching and composing Web services. We argue that Linear Logic theorem proving, combined with semantic rea- soning, offers a practical approach to the success of Web services composi- tion. Linear Logic, as a logic for specifying concurrent programming, provides higher expressive powers in the modeling of Web services than classical logic. Further, the agent-based architecture provides a scalable and flexible platform for the Web service composition system. The main contributions of this thesis are summarized as follows. First, a generic framework for the purpose of presenting an abstract process of the ii automated Semantic Web service composition has been developed. Second, a specific system based on the generic framework has been developed. This sys- tem focuses on the translation between the internal and external languages as well as the process extraction from the proof. Third, applications of the subtyp- ing inference rules that are used for semantic reasoning are discussed. Fourth, an agent architecture is developed as the platform for Web service provision and composition. Contents Preface xi 1 Introduction 1 1.1 Motivation and Aim . 1 1.2 An Application Example . 2 1.3 Research Questions . 4 1.4 Background . 5 1.5 Proposed Solution . 8 1.6 Research Activities and Contributions . 11 1.7 Thesis Outline . 12 2 Web Service Composition: State of the Art 15 2.1 Web Services: Standards and Related Technologies . 15 2.1.1 IBM Web Service Languages . 17 2.1.2 Semantic Web Service Description with DAML-S . 18 2.1.3 ebXML . 18 2.1.4 Platforms . 19 2.2 An Abstract Model for Web Service Composition . 20 2.3 Web Service Composition via Business Process . 22 2.4 Web Service Composition via AI Planning . 24 2.4.1 Situation Calculus . 25 2.4.2 Planning Domain Definition Language (PDDL) . 25 2.4.3 Rule-based Planning . 26 2.4.4 Other AI-planning Methods . 27 2.5 Service Composition using Program Synthesis . 28 2.6 Summary . 29 3 Logical Presentation of Web Services 31 3.1 Introduction . 31 3.2 Linear Logic . 32 3.3 The Expressive Power of LL . 36 3.4 The Upper Ontology of Web Services and LL . 39 3.5 Transformation of Functionalities . 43 iii iv CONTENTS 3.5.1 Information Transformation . 44 3.5.2 State Change . 47 3.6 Transformation of Non-functional Attributes . 49 3.7 Example . 53 3.8 Summary . 54 4 Extraction of a Process Model from Proof 57 4.1 Introduction . 57 4.2 The π-calculus: a Formality of Web Service Process . 58 4.3 An Upper Ontology for the Process Model . 64 4.4 From the Proof to the Process Model . 69 4.5 An Example Proof . 74 4.6 Summary . 77 5 Semantic Web Service Composition 79 5.1 Introduction . 79 5.2 Semantic Web and Languages . 80 5.3 Semantic Reasoning for DAML+OIL . 84 5.4 Subtyping Rules for LL . 88 5.5 Summary . 90 6 A Multi-agent Architecture 93 6.1 Introduction . 93 6.2 The AGORA Multi-agent Platform . 94 6.2.1 General Description . 94 6.2.2 Agent . 95 6.2.3 Agora node . 96 6.3 The Agent Architecture . 98 6.3.1 The Agent Model for Service Composition . 99 6.3.2 The Interaction Model . 101 6.3.3 Facilitating Agora Nodes . 102 6.4 Summary . 105 7 The Prototype Implementation 109 7.1 Introduction . 109 7.2 LL Theorem Prover . 110 7.3 Jena . 114 7.4 FaCT . 116 7.5 GUI . 117 7.6 Summary . 119 CONTENTS v 8 Evaluation 121 8.1 Answers to the Research Questions . 121 8.2 Contributions . 124 8.3 Comparison with Other Methods . 126 8.4 Publications . 127 8.5 Performance Evaluation . 131 8.6 Limitations . 132 8.7 Lessons Learned . 133 9 Conclusion 135 9.1 Summary of Results and Contributions . 135 9.2 Directions for Future Work . 137 9.2.1 Partial Deduction . 137 9.2.2 Reusability of Composition Result . 137 vi CONTENTS List of Figures 1.1 The core service for buying skis. 3 1.2 The available value-added services. 4 1.3 The required service for buying skis. 4 1.4 The final service structure for buying skis. 5 1.5 The relations between the background researches. 8 2.1 An overview of Web service standard languages . 17 2.2 A framework of service composition system. 20 2.3 The process of Web service composition using program synthesis. 29 3.1 The upper ontology for Web service declarative specification. 40 4.1 π-calculus flow graph. 61 4.2 The upper ontology for the process model. 67 4.3 The example proof. 76 4.4 The illustration of result process for example. 77 5.1 The layer of data representation standards for the Semantic Web 81 5.2 The connections among DLs' components, adapted from [78] . 87 6.1 Basic AGORA system architecture. 95 6.2 An agent architecture. 96 6.3 An architecture for Web services provision. 99 6.4 An interaction model of service composition participants. 103 6.5 The agent architecture for facilitators. 104 6.6 An interaction model for facilitators. 105 7.1 An illustration of the implemented agents. 110 7.2 The Jena architecture, from [28] . 115 7.3 A screen shot of main window. 117 7.4 Namespaces mapping window. 118 7.5 A screen shot of generated process model. 118 vii viii LIST OF FIGURES List of Tables 3.1 Inference rules for MAILL fragment. 34 3.2 The classification of non-functional attributes. 52 4.1 The concepts in process specification. 65 4.2 Inference rules for process extraction. 72 5.1 The correspondence of DL and DAML+OIL terms. 85 6.1 Meanings of performatives. 107 7.1 Forum specification of the LL sequent calculus. 112 7.2 The connectives in UMA Forum. 113 8.1 Experimental settings. 132 8.2 Process generation time. 132 ix x LIST OF TABLES Preface This thesis is submitted to the Norwegian University of Science and Technol- ogy (NTNU) in partial fulfillment of the requirements for the degree doktor ingeniør. This work has been conducted at the Department of Computer and Information Sciences (IDI), NTNU, Trondheim, Norway, under the supervi- sion of Professor Mihhail Matskin. Part of this work was conducted while I was a visiting researcher at the Department of Microelectronics and Informa- tion Technology, the Royal Institute of Technology, Stockholm, Sweden. Acknowledgments First and foremost, I would like to thank my supervisor Professor Mihhail Matskin for his expert guidance, constant encouragement and enduring pa- tience during my doctoral research. I am lucky to work in his group and have been surrounded by knowledgeable and helpful co-workers. I am grateful to Peep Kungas¨ for our wonderful cooperation and all the interesting discus- sions about Linear Logic. Thanks to Sobah Abbas Petersen and Amund Tveit for their discussions, information and inspiration.
Recommended publications
  • Swing: Components for Graphical User Interfaces
    Swing: Components for Graphical User Interfaces Computer Science and Engineering College of Engineering The Ohio State University Lecture 22 GUI Computer Science and Engineering The Ohio State University GUI: A Hierarchy of Nested Widgets Computer Science and Engineering The Ohio State University Visual (Containment) Hierarchy Computer Science and Engineering The Ohio State University Top-level widgets: outermost window (a container) Frame, applet, dialog Intermediate widgets: allow nesting (a container) General purpose Panel, scroll pane, tabbed pane, tool bar Special purpose Layered pane Atomic widgets: nothing nested inside Basic controls Button, list, slider, text field Uneditable information displays Label, progress bar, tool tip Interactive displays of highly formatted information Color chooser, file chooser, tree For a visual (“look & feel”) of widgets see: http://java.sun.com/docs/books/tutorial/uiswing/components Vocabulary: Widgets usually referred to as “GUI components” or simply “components” History Computer Science and Engineering The Ohio State University Java 1.0: AWT (Abstract Window Toolkit) Platform-dependent implementations of widgets Java 1.2: Swing Most widgets written entirely in Java More portable Main Swing package: javax.swing Defines various GUI widgets Extensions of classes in AWT Many class names start with “J” Includes 16 nested subpackages javax.swing.event, javax.swing.table, javax.swing.text… Basic GUI widgets include JFrame, JDialog JPanel, JScrollPane, JTabbedPane,
    [Show full text]
  • View of XML Technology
    AN APPLICATION OF EXTENSlBLE MARKUP LANGUAGE FOR INTEGRATION OF KNOWLEDGE-BASED SYSTEM WITH JAVA APPLICATIONS A Thesis Presented to The Faculty of the Fritz J. and Dolores H. Russ College of Engineering and Technology Ohio University In Partial Fulfillment of the Requirement for the Degree Master of Science BY Sachin Jain November, 2002 ACKNOWLEDGEMENTS It is a pleasure to thank the many people who made this thesis possible. My sincere gratitude to my thesis advisor, Dr. DuSan Sormaz, who helped and guided me towards implementing the ideas presented in this thesis. His dedication to research and his effort in the development of my thesis was an inspiration throughout this work. The thesis would not be successful without other members of my committee, Dr. David Koonce and Dr. Constantinos Vassiliadis. Special thanks to them for their substantial help and suggestions during the development of this thesis. I would like also to thank Dr. Dale Masel for his class on guidelines for how to write thesis. Thanlts to my fellow colleagues and members of the lMPlanner Group, Sridharan Thiruppalli, Jaikumar Arumugam and Prashant Borse for their excellent cooperation and suggestions. A lot of infom~ation~1sef~11 to the work was found via the World Wide Web; 1 thank those who made their material available on the Web and those who kindly responded back to my questions over the news-groups. Finally, it has been pleasure to pursue graduate studies at IMSE department at Ohio University, an unique place that has provided me with great exposures to intricacies underlying development, prograrn~ningand integration of different industrial systems; thus making this thesis posslbie.
    [Show full text]
  • Programming Java for OS X
    Programming Java for OS X hat’s so different about Java on a Mac? Pure Java applica- tions run on any operating system that supports Java. W Popular Java tools run on OS X. From the developer’s point of view, Java is Java, no matter where it runs. Users do not agree. To an OS X user, pure Java applications that ignore the feel and features of OS X are less desirable, meaning the customers will take their money elsewhere. Fewer sales translates into unhappy managers and all the awkwardness that follows. In this book, I show how to build GUIs that feel and behave like OS X users expect them to behave. I explain development tools and libraries found on the Mac. I explore bundling of Java applications for deployment on OS X. I also discuss interfacing Java with other languages commonly used on the Mac. This chapter is about the background and basics of Java develop- ment on OS X. I explain the history of Java development. I show you around Apple’s developer Web site. Finally, I go over the IDEs commonly used for Java development on the Mac. In This Chapter Reviewing Apple Java History Exploring the history of Apple embraced Java technologies long before the first version of Java on Apple computers OS X graced a blue and white Mac tower. Refugees from the old Installing developer tan Macs of the 1990s may vaguely remember using what was tools on OS X called the MRJ when their PC counterparts were busy using JVMs. Looking at the MRJ stands for Mac OS Runtime for Java.
    [Show full text]
  • GUI Object Level Architectures Recap
    GUI Object Level Architectures Recap • Lots of Input Devices – Basic input devices (keyboard, mouse, buttons, valuators) – Exotic input devices (3D Input, Gloves, Crosspads) – Research input devices (Peephole display, speech, touch) Recap • Handling input – Predefine all kinds of devices (too rigid, didn’t work too well) – Instead, organize everything as event or sampled devices – Handle everything in software as events Mouse Events Software Keyboard Software Today • Object-level architectures – Design patterns for GUIs – Model-View-Controller – Pluggable Look and Feel – Undo / Redo Internal Organization of Widgets • GUI widgets organized Model-View-Controller (MVC) – Basic idea: split widget into three separate objects – Each handles different aspect of widget Model-View-Controller • Model handles core functionality and data • Micro-level (internal to widget) – Scrollbar state – Checkbox state – What cell in table is currently highlighted • Macro-level (application) – Table data – Content in a document – Image in paint program Model-View-Controller • Model provides: – methods to edit data, which Controller can call – methods to access state, which View and Controller can request • Model has registry of dependent Views to notify on data changes • In Swing, listeners stored here Model-View-Controller • Model examples: – text editor: model is text string – slider: model is an integer – spreadsheet: collection of values related by functional constraints Model-View-Controller • View handles how the widget appears – Handles display of information
    [Show full text]
  • Jquery: Animations
    jQuery: Animations ATLS 3020 - Digital Media 2 Week 9 - Day 2 jQuery Overview ● All HTML must be valid! ● Define elements in HTML ● Styling and presentation in CSS ● Add interactivity with javascript/jQuery jQuery Overview All jQuery must go inside of $(document).ready(function(){}) HTML <head> // meta, title, css <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"> </script> <script> $(document).ready(function() { // your javascript and jQuery code goes here }); </script> </head> jQuery Overview You can only add jQuery variables with jQuery methods and javascript variables with javascript methods Javscript We have a function that changes function change_color() { the color of an element: // changes the color of something } We can use ONE of the two options. We cannot combine document.getElementById() with the click method. And we cannot combine $(selector) with the onclick method. Javscript jQuery var button; $("#button").click(change_color); button = document.getElementById("button"); button.onclick(change_color); Some jQuery animations jQuery Makes a hidden element fade into view $("#banner").fadeIn(); jQuery Hides an element by fading it out $("#banner").fadeOut(); jQuery Makes a visible element side out of view $("#banner").slideUp(); jQuery $("#banner").slideDown(); Makes a hidden element slide into view jQuery Alternates between hiding and showing the $("#banner").toggle(); “banner” id jQuery Alternates between hiding and showing the $("#banner").slideToggle(); “banner” id, while sliding in and out jQuery and CSS We can also edit CSS directly with jQuery: $(selector).css("property", "value"); jQuery $("#banner").css("font-size", "100px"); Changes the font-size of the banner element jQuery $("#banner").css("color", "#00f"); Changes the font color of the banner element Or change multiple properties at once: $(selector).css({ "attribute", "value", jQuery "attribute", "value" }); $("#banner").css({ "font-size", "100px", "color", "#00f" }); Exercise (pairs) 1.
    [Show full text]
  • The Abstract Window Toolkit (AWT), from Java
    Components Containers and Layout Menus Dialog Windows Event Handling The Abstract Window Toolkit (AWT), from Java : Abstract Window Toolkit Interface to the GUI Interface to platform's components: Layout: Placing GUI event keyboard, window system Buttons, text components handling mouse, … (Win, Mac, …) fields, … Uses operating system components Don't use these! . Looks like a native application . One must sometimes be aware of differences between operating systems… . Small set of components . , … – no table, no color chooser, … The Java Foundation Classes, from Java : Java Foundation Classes (JFC) Java : AWT, Swing More advanced Abstract Window Toolkit graphics classes Components based on pure Java "Painting on the screen" . Won't always look "native”, . The basis of Swing but works identically on all platforms components – and your own . Replaces AWT components, adds more . Discussed next lecture . We still use many other parts of AWT Components: JTable, JButton, … extending JComponent Containers: JFrame – a top level window; JPanel – a part of a window, grouping some components together Layout Managers: Decide how to place components inside containers Swing: Can replace the look and feel dynamically . Nimbus (current Java standard) . Metal (earlier Java standard) . Windows classic Running example: A very simple word processor Ordinary window in Swing: JFrame . A top-level container: Not contained in anything else ▪ AWT Base class for all Swing components Common implementation details Has two states, on/off Radio buttons: Only one per Standard button active at a time Checkbox, on / off Editing styled text: Abstract base class, HTML, RTF, common functionality custom formats A single line of text Multi-line text area Special formatting for Passwords are not shown dates, currency, … as they are entered .
    [Show full text]
  • Swingstates: Adding State Machines to Java and the Swing Toolkit Caroline Appert, Michel Beaudouin-Lafon
    SwingStates: Adding state machines to Java and the Swing toolkit Caroline Appert, Michel Beaudouin-Lafon To cite this version: Caroline Appert, Michel Beaudouin-Lafon. SwingStates: Adding state machines to Java and the Swing toolkit. Software: Practice and Experience, Wiley, 2008, 38 (11), pp.1149-1182. 10.1002/spe.867. inria-00538334 HAL Id: inria-00538334 https://hal.inria.fr/inria-00538334 Submitted on 25 Nov 2010 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. SwingStates: Adding state machines to Java and the Swing toolkit C. Appert∗ and M. Beaudouin-Lafon LRI (Universit´eParis-Sud & CNRS), INRIA, bˆat 490, 91405 Orsay, France. SUMMARY This article describes SwingStates, a Java toolkit designed to facilitate the development of graphical user interfaces and bring advanced interaction techniques to the Java platform. SwingStates is based on the use of finite-state machines specified directly in Java to describe the behavior of interactive systems. State machines can be used to redefine the behavior of existing Swing widgets or, in combination with a new canvas widget that features a rich graphical model, to create brand new widgets. SwingStates also supports arbitrary input devices to implement novel interaction techniques based, for example, on bi-manual or pressure-sensitive input.
    [Show full text]
  • GUI Programming in Java Using Swing  Junit Testing Exercise Is Due Now
    GUI programming in Java Using Swing JUnit Testing exercise is due now. Turn in your written problems from Assignment 6. You should be done BigRational, but I’ll extend due date until next class, so you can add extra unit tests or documentation. Try to finish earlier so you can get an early day and start GUI programming! Any questions about course material? Python provides an extensive GUI toolkit called Tkinter, which is built on top of the (not specific to Python) Tcl/Tk framework. ◦ http://www.python.org/doc/life-preserver/ ◦ www.tcl.tktktktk/software/tcltktktktk/ ◦ http://en.wikipedia.org/wiki/Tk_(computing) In CSSE120, we did not use Tkinter directly Instead used ZelleGraphics ◦ a simplified collection of classes for drawing on the screen. ◦ Hides details that would be confusing to beginners in OOP. In Java, we'll see "the real thing": Swing Appendices in the Weiss book (sketchy). Java Swing by Cole, Eckstein, et. al . ◦ This is a great Swing resource (for both learning and reference): ◦ Available for you to read on Safari Tech Books Online http://proquest.safaribooksonline.com/?uicode=rosehulman Then find the Java Swing book If that link does not work for you, go to the Logan Library page, and choose Safari from the Databases drop-down list near the top of the page, then click GoGoGo.Go SUN's Swing Tutorial at http://java.sun.com/docs/ books/tutorial/uiswing/index.html ◦ This one has great examples, but it tends to assume a deeper familiarity with Java than most of you have now. AWT (Abstract Windowing Toolkit) was part of the original Java release ◦ Many features are still used ◦ But users were dissatisfied … Swing was standardized with Java 2 (1999) ◦ The most widely used Java GUI toolkit.
    [Show full text]
  • Classjs Documentation Release 1.0
    classjs Documentation Release 1.0 Angelo Dini March 21, 2015 Contents 1 Requirements 3 2 Plugins 5 2.1 Cl.Accordion...............................................5 2.2 Cl.Autocomplete.............................................7 2.3 Cl.Carousel................................................8 2.4 Cl.Debug................................................. 10 2.5 Cl.Gallery................................................ 11 2.6 Cl.Lightbox................................................ 13 2.7 Cl.Mobilemenu.............................................. 16 2.8 Cl.Uniform................................................ 18 i ii classjs Documentation, Release 1.0 These plugins are aimed for professionals with extensive JavaScript knowledge. Each plugin follows a simplistic and a modular approach. All plugins have demos, tests and documentation regarding their options, methods, events and callbacks. The plugins are compatible with Firefox, Chrome, Safari and IE7+. We also support iOS, Android and Windows Phone to insure correct responsive behaviour with full accessible support according to the WCAG 2.0 standards. Each plugin requires at least class.js 1.0+ and jQuery 1.7+. The latest stable versions are available on github - https://github.com/finalangel/classjs-plugins Contents 1 classjs Documentation, Release 1.0 2 Contents CHAPTER 1 Requirements For additional information on how to run documentation or the examples locally, consult the docs/README.rst or the demo page’s FAQ section: http://finalangel.github.io/classjs-plugins/ 3 classjs Documentation, Release 1.0 4 Chapter 1. Requirements CHAPTER 2 Plugins 2.1 Cl.Accordion This is a list of all relevant options, methods, events and callbacks. 2.1.1 Options Options are set on initializing the accordion: new Cl.Accordion({ // your options ’index’:0, ’event’: ’mouseenter’ }); Option De- Description fault index null shows selected element[index] starting form zero.
    [Show full text]
  • 2008 Packt Publishing
    Swing Extreme Testing The Extreme Approach to Complete Java Application Testing Tim Lavers Lindsay Peters BIRMINGHAM - MUMBAI Swing Extreme Testing Copyright © 2008 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s), Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: May 2008 Production Reference: 1260508 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-847194-82-4 www.packtpub.com Cover Image by Vinayak Chittar ([email protected]) Credits Authors Project Manager Tim Lavers Abhijeet Deobhakta Lindsay Peters Project Coordinator Reviewers Lata Basantani Prabhakar Chaganti Valentin Crettaz Indexer Hemangini Bari Senior Acquisition Editor David Barnes Proofreader Angie Butcher Development Editor Ved Prakash Jha Production Coordinator Aparna Bhagat Technical Editor Himanshu Panchal Cover Work Aparna Bhagat Editorial Team Leader Mithil Kulkarni About the Authors Tim Lavers is a Senior Software Engineer at Pacific Knowledge Systems, which produces LabWizard, the gold-standard for rules-based knowledge acquisition software.
    [Show full text]
  • Introduction to Swing (PDF)
    1.00 Lecture 17 Introduction to Swing Reading for next time: Big Java: sections 9.7-9.11 Online hyperlinked Swing tutorial: http://download.oracle.com/javase/tutorial/uiswing/ Swing • Java package of user interface classes for windows, menus, scroll bars, buttons, drawing... • Independent of hardware and operating system (as long as they can paint a window) – Swing gains independence but loses performance by not relying on native drawing calls – Has Windows, Mac, other look and feel options • Supersedes Java Abstract Window Toolkit (AWT) though it still uses many non-drawing classes from that package. You will usually: import java.awt.*; import javax.swing.*; 1 The 3 Flavors of GUI Objects • Top Level Windows: – Containers that are not contained by any other containers – They can be iconified or dragged, and interact with the native windowing system – Example: JFrame, JDialog • JComponents: present information or interact with the user – Examples: labels (JLabel), buttons (JButton), text fields (JTextField) – JFrame and JDialog are not JComponents • Containers: – Some JComponents are designed to hold other components, not to present info or interact with the user – Examples: JPanel , JScrollPane, Container Anatomy of a JFrame Look and Feel, platform dependent Interacts with the window system JFrame has a contentPane, which is the Container that will hold your content © Oracle. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/fairuse. 2 Coordinates 0,0 y Screen
    [Show full text]
  • Learning Core Audio: a Hands-On Guide to Audio Programming For
    Learning Core Audio "EEJTPO8FTMFZ -FBSOJOH 4FSJFT 7JTJU LQIRUPLWFRPOHDUQLQJVHULHV GPS B DPNQMFUF MJTU PG BWBJMBCMF QVCMJDBUJPOT 5IF $GGLVRQ:HVOH\ /HDUQLQJ 6HULHV JTBDPMMFDUJPOPGIBOETPOQSPHSBNNJOH HVJEFT UIBU IFMQ ZPV RVJDLMZ MFBSO B OFX UFDIOPMPHZ PS MBOHVBHF TP ZPV DBO BQQMZXIBUZPVWFMFBSOFESJHIUBXBZ &BDI UJUMF DPNFT XJUI TBNQMF DPEF GPS UIF BQQMJDBUJPO PS BQQMJDBUJPOT CVJMUJO UIF UFYU 5IJT DPEF JT GVMMZ BOOPUBUFE BOE DBO CF SFVTFE JO ZPVS PXO QSPKFDUT XJUIOPTUSJOHTBUUBDIFE.BOZDIBQUFSTFOEXJUIBTFSJFTPGFYFSDJTFTUP FODPVSBHFZPVUPSFFYBNJOFXIBUZPVIBWFKVTUMFBSOFE BOEUPUXFBLPS BEKVTUUIFDPEFBTBXBZPGMFBSOJOH 5JUMFTJOUIJTTFSJFTUBLFBTJNQMFBQQSPBDIUIFZHFUZPVHPJOHSJHIUBXBZBOE MFBWF ZPV XJUI UIF BCJMJUZ UP XBML PGG BOE CVJME ZPVS PXO BQQMJDBUJPO BOE BQQMZ UIFMBOHVBHFPSUFDIOPMPHZUPXIBUFWFSZPVBSFXPSLJOHPO Learning Core Audio A Hands-On Guide to Audio Programming for Mac and iOS Chris Adamson Kevin Avila Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Cape Town • Sydney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products Editor-in-Chief are claimed as trademarks. Where those designations appear in this book, and the publish- Mark Taub er was aware of a trademark claim, the designations have been printed with initial capital Senior Acquisitions letters or in all capitals. Editor The authors and publisher have taken care in the preparation of this book, but make no Trina MacDonald expressed or implied warranty
    [Show full text]