JoiMint Graphical objects and their XML configuration files Piotr K. Bartkiewicz, DESY, MST-1.

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming
Advertisements

Unit 3 Graphical User Interface (GUI) Dr. Magdi AMER.
Graphic User Interfaces Layout Managers Event Handling.
 2007 Dr. Natheer Khasawneh. Chapter 13. Graphical User Interface Concepts: Part 1.
Introduction to Java Classes, events, GUI’s. Understand: How to use TextPad How to define a class or object How to create a GUI interface How event-driven.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Creating Custom Forms. 2 Design and create a custom form You can create a custom form by modifying an existing form or creating a new form. Either way,
Chapter 6: Graphical User Interface (GUI) and Object-Oriented Design (OOD) J ava P rogramming: Program Design Including Data Structures Program Design.
PROGRAMMING REVIEW Lab 2 EECS 448 Dr Fengjun Li and Meenakshi Mishra.
1 ADVANCED MICROSOFT WORD Lesson 15 – Creating Forms and Working with Web Documents Microsoft Office 2003: Advanced.
AMI GUI Design V1.1 by Kilian Pohl - Reflects changes in AMI MRML Structure - Includes feedback from AMI Workshop in Dec 09.
Databases and LINQ Visual Basic 2010 How to Program 1.
ACM/JETT Workshop - August 4-5, ExceptionHandling and User Interfaces (Event Delegation, Inner classes) using Swing.
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
Java Programming: From Problem Analysis to Program Design, Second Edition1  Learn about basic GUI components.  Explore how the GUI components JFrame,
Chapter 3: Using GUI Objects and the Visual Studio IDE.
Marcel Casado NCAR/RAP WEATHER WARNING TOOL NCAR.
MIT AITI 2003 Lecture 17. Swing - Part II. The Java Event Model Up until now, we have focused on GUI's to present information (with one exception) Up.
Java GUI CSCE 190 – Java Instructor: Joel Gompert Mon, July 26, 2004.
Introduction to Swing Components Chapter 14.  Part of the Java Foundation Classes (JFC)  Provides a rich set of GUI components  Used to create a Java.
Copyright © 2010 Wolters Kluwer Health | Lippincott Williams & Wilkins Introduction to Windows Chapter 2.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 8 Objects and Classes.
Graphical User Interface Components Chapter What You Will Learn Text Areas Text Areas Sliders Sliders Menus Menus –With frames –Pop up menus Look.
University of Sunderland COM 220 Lecture Six Slide 1 Building Interactive Forms Applications using Oracle.
Key Applications Module Lesson 21 — Access Essentials
Chapter 9: Visual Programming Basics Object-Oriented Program Development Using Java: A Class-Centered Approach.
GUIs in Java Swing, Events CS2110, SW Development Methods Readings: MSD, Chapter 12 Lab Exercise.
– Advanced Programming P ROGRAMMING IN Lecture 21 Introduction to Swing.
Graphic User Interface. Graphic User Interface (GUI) Most of us interact with computers using GUIs. GUIs are visual representations of the actions you.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
Even-Driven Programming and basic Graphical User Interface.
MSc Workshop - © S. Kamin, U. ReddyLect 3 - GUI -1 Lecture 3 - Graphical User Interfaces r GUI toolkits in Java API r JFrame r GUI components.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 1 1 Integrating Microsoft Office XP Tutorial 1 – Integrating Word and Excel.
1 CSC 222: Object-Oriented Programming Spring 2012 netBeans & GUIBuilder  netBeans IDE create/edit/run a project  GUIBuilder JFrame, JButton, JTextField,
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
Creating a GUI with JFC/Swing. What are the JFC and Swing? JFC –Java Foundation Classes –a group of features to help people build graphical user interfaces.
PLACING AND LINKING GRAPHICS
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Java GUI. Graphical User Interface (GUI) a list a button a text field a label combo box checkbox.
Object Oriented Programming.  Interface  Event Handling.
Intro to Applets. Applet Applets run within the Web browser environment Applets bring dynamic interaction and live animation to an otherwise static HTML.
Java Programming: From Problem Analysis to Program Design, 3e Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
Class Builder Tutorial Presented By- Amit Singh & Sylendra Prasad.
Java Programming: From Problem Analysis to Program Design, Second Edition1 Lecture 5 Objectives  Learn about basic GUI components.  Explore how the GUI.
XP Tutorial 8 New Perspectives on Microsoft Windows XP 1 Microsoft Windows XP Object Linking and Embedding Tutorial 8.
CIS Intro to JAVA Lecture Notes Set 8 9-June-05.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
Lecture # 6 Graphical User Interface(GUI). Introduction A graphical user interface (GUI) presents a user- friendly mechanism for interacting with an application.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
View  view  presents the user with a sensory (visual, audio, haptic) representation of the model state  a user interface element (the user interface.
5-1 GUIs and Events Rick Mercer. 5-2 Event-Driven Programming with Graphical user Interfaces  Most applications have graphical user interfaces to respond.
Microsoft Visual C# 2010 Fourth Edition Chapter 3 Using GUI Objects and the Visual Studio IDE.
Event Driven (Asynchronous) Programming. Event handling in Unity Subclass a class that contains event handling methods, and then override those methods.
CPCS 391 Computer Graphics Lab One. Computer Graphics Using Java What is Computer Graphics: Computer graphics are graphics created using computers and,
Java Programming Fifth Edition Chapter 13 Introduction to Swing Components.
CSC 205 Programming II Lecture 5 AWT - I.
Welcome To java
CSC 222: Object-Oriented Programming
Java FX: Scene Builder.
Working in the Forms Developer Environment
A First Look at GUI Applications
Java Swing.
Java Programming: From Problem Analysis to Program Design,
Ellen Walker Hiram College
CS 190 Lecture Notes: My Editor Design
Microsoft Office Access 2003
Microsoft Office Access 2003
Presentation transcript:

JoiMint Graphical objects and their XML configuration files Piotr K. Bartkiewicz, DESY, MST-1

Agenda Only graphical aspects of the JoiMint project! JoiMint graphical objects: a short overview Graphical Objects – implementation VisibleObject: a base class functionality JoiButton – an example of JoiMint Graphical Object LoadableObject interface An example of XML configuration file Final remarks

JoiMint Graphical Objects By design: two base types of objects: –Object container: a frame, which contains other graphical objects (including object containers) –Visible objects: plots, buttons, text fields etc. User can create his synoptic table by adding graphical objects to object container, and afterwards, by locating, resizing, and setting object properties The synoptic table project is stored as an XML file Configuration of object container knows the list of contained objects Each graphical object is capable to generate the XML section, which describes his properties Each graphical object is capable to parse his XML description

Graphical Objects - implementation Object container: public class ObjContainerFrame extends JFrame implements LoadableObject Visible Object: public abstract class VisibleObj extends JPanel implements LoadableObject questionable approach

VisibleObject: a base class functionality Connection to the JoiMint registry Handling “own” XML section –Content Handler for SAX parser, automatic properties ( “joi” properties) recognition and execution (java.lang.reflect*) –AutoConfig: an XML section is generated automatically Important feature, which makes the JoiMint ‘open’, new objects can be added just by delivering a jar file Connection to the ObjectContainer Standard actions like: move, resize, copy, paste, delete “Right mouse click” menu Property list missing: property window, which might offer easier property manipulation than a ‘default’ property table

JoiButton – an example of JoiMint Graphical Object public class JoiButton extends VisibleObj implements LoadableObject { JButton b; JoiButton(ObjContainerFrame parentFrame) { super(parentFrame); Text.setDefault("JoiButton"); Value.setCanBeActive(); setDefaultSize(120, 50);//default joiSetText(getTypeName()); b = new JButton(); add(b); b.addMouseListener(new MouseAction()); MainFrame.propertyTableShow(this, false); } public void setSize(int width, int height) { super.setSize(width,height); b.setBounds(5,5,width-10,height-25); } VisibleObject base JButton JoiButton

import java.io.*; import java.util.Vector; interface LoadableObject { public void saveConfig(IndentOutputStreamWriter sw) throws IOException; public void saveConfig(File file) throws IOException; public int loadConfig(XmlProcessor xp, String closingTag) throws Exception; public String getTypeName(); public Vector getProperties(); public Property getProperty(String propName); public void addProperty(Property p); public void propertyChanged(Property p, int changeCode ); public void destroy(); // all below might be a part of another inetrface, eg. AutoConfiguarbleObject Interface public void joiSetText(String text); public void joiSetX(String x); public void joiSetY(String y); public void joiSetWidth(String w); public void joiSetHeight(String h); public void joiSetName( String name ); public void joiSetParentName( String pname ); public void joiSetValue( String value ); public String joiGetName(); public String joiGetParentName(); public String joiGetText(); public String joiGetX(); public String joiGetY(); public String joiGetWidth(); public String joiGetHeight(); public String joiGetValue(); }

Final remarks Probably correct: –concept of object containers and visible objects –concept of parsing the XML configuration file To be considered: –implementation of VisibleObjects. –implementation of ObjectContainers: run/edit mode? Wrong or missing: –not enough time/discussions about object relationships, inheritance, interfaces –a language for project description, object relationships, interactions etc. (UML?) –documentation generation tools