JTcl and Swank. Bruce A. Johnson, Tom Poindexter, & Dan Bodoh. What s new with Tcl and Tk on the JVM. Wednesday, October 26, 11

Similar documents
Swing UI. Powered by Pentalog. by Vlad Costel Ungureanu for Learn Stuff

Swing. By Iqtidar Ali

Introduction p. 1 JFC Architecture p. 5 Introduction to JFC p. 7 The JFC 1.2 Extension p. 8 Swing p. 9 Drag and Drop p. 16 Accessibility p.

Chapter 12 GUI Basics

Java IDE Programming-I

Rizvi College of Arts, Science & Commerce Bandra (W), Mumbai Teaching Plan Academic Year

Handout 14 Graphical User Interface (GUI) with Swing, Event Handling

CSE 143. Event-driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT

Certified Eclipse Bundle

Chapter 13 GUI Basics. Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved.

Part 3: Graphical User Interface (GUI) & Java Applets

Chapter 12 GUI Basics. Motivations. The design of the API for Java GUI programming

Graphical User Interface (GUI) components in Java Applets. With Abstract Window Toolkit (AWT) we can build an applet that has the basic GUI

Certified Eclipse Bundle

Contents Introduction 1

Lecture 18 Java Graphics and GUIs

Is image everything?

Supporting Materials

CSE 331 Software Design & Implementation

Event Driven Programming

Tool Kits, Swing. Overview. SMD158 Interactive Systems Spring Tool Kits in the Abstract. An overview of Swing/AWT

2110: GUIS: Graphical User Interfaces

Java 11 Swing with Eclipse Index

Java 11 Swing Index. Section Title Page

CSE 331. Event- driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT

Learn Java Programming, Dr.Hashamdar. Getting Started with GUI Programming

CSE 331. Event-driven Programming and Graphical User Interfaces (GUIs) with Swing/AWT

Announcements. Introduction. Lecture 18 Java Graphics and GUIs. Announcements. CSE 331 Software Design and Implementation

John Zukowski's Definitive Guide to Swing for Java 2

Java 1.9 Swing Index

JBuilder 8.0 JFC and Swing Programming

Java: Graphical User Interfaces (GUI)

Java 1.8 Swing with Eclipse Oxygen Index

Java 1.8 Swing with Eclipse Mars Index

Java 1.8 Swing with Eclipse Neon Index

CSE 1325 Project Description

CSE 331 Software Design & Implementation

Introduction to Graphical Interface Programming in Java. Introduction to AWT and Swing

Summary Chapter 25 GUI Components: Part 2

Widgets. Overview. Widget. Widgets Widget toolkits Lightweight vs. heavyweight widgets Swing Widget Demo

2010 가을학기부산대학교정보컴퓨터공학부 OVERVIEW OF GUI PROGRAMMING

Java Graphical User Interfaces

Chapter 6: Graphical User Interfaces

Visit for more.

Graphical User Interface (GUI)

Programming Training. This Week: Tkinter for GUI Interfaces. Some examples

CONTENTS. Chapter 1 Getting Started with Java SE 6 1. Chapter 2 Exploring Variables, Data Types, Operators and Arrays 13

Packages: Putting Classes Together

SilkTest Classic. Migrating from the SilkTest Classic Agent to the Open Agent

Index SELF-STUDY. Symbols

Graphical User Interfaces. Swing. Jose Jesus García Rueda

Introduction to Graphical User Interfaces (GUIs) Lecture 10 CS2110 Fall 2008

user-friendly and easy to use.

Java Swing. based on slides by: Walter Milner. Java Swing Walter Milner 2005: Slide 1

Core Java Syllabus. Pre-requisite / Target Audience: C language skills (Good to Have)

Swing. Component overview. Java UI, summer semester 2017/2018 1

Publisher : O'Reilly Pub Date : November 2002 ISBN : Pages : 1278

Widgets. Widgets Widget Toolkits. User Interface Widget

The Abstract Windowing Toolkit. Java Foundation Classes. Swing. In April 1997, JavaSoft announced the Java Foundation Classes (JFC).

Getting Started p. 1 Obtaining Tcl/Tk p. 1 Interactive Execution p. 1 Direct Execution p. 4 Reading this Book p. 6 Requirements for Networking

GUI Programming. Chapter. A Fresh Graduate s Guide to Software Development Tools and Technologies

JavaFX. JavaFX Overview Release E

China Jiliang University Java. Programming in Java. Java Swing Programming. Java Web Applications, Helmut Dispert

Top-Level Containers

Silk Test Migrating from the Classic Agent to the Open Agent

CS111: PROGRAMMING LANGUAGE II

Course Status Networking GUI Wrap-up. CS Java. Introduction to Java. Andy Mroczkowski

PROGRAMMING DESIGN USING JAVA (ITT 303) Unit 7

<Insert Picture Here> JavaFX 2.0

Visual Ada Developer

Object-Oriented Programming Design. Topic : User Interface Components with Swing GUI Part III

This course is designed for anyone who needs to learn how to write programs in Python.

Graphics. Lecture 18 COP 3252 Summer June 6, 2017

Introduction to the JAVA UI classes Advanced HCI IAT351

Week Chapter Assignment SD Technology Standards. 1,2, Review Knowledge Check JP3.1. Program 5.1. Program 5.1. Program 5.2. Program 5.2. Program 5.

Graphical User Interfaces. Comp 152

Programming graphics

Interactive Python Widget for Correcting WRF-Hydro Input Grids

Layout. Dynamic layout, Swing and general layout strategies

Table of Contents. Chapter 1 Getting Started with Java SE 7 1. Chapter 2 Exploring Class Members in Java 15. iii. Introduction of Java SE 7...

INTRODUCTION TO (GUIS)

SELF-STUDY. Glossary

Chapter 6: Swing and Multimedia

Advanced Java Programming. Swing. Introduction to Swing. Swing libraries. Eran Werner, Tel-Aviv University Summer, 2005

Chapter 17 Creating User Interfaces

Object-Oriented Programming: Revision. Revision / Graphics / Subversion. Ewan Klein. Inf1 :: 2008/09

Graphical User Interface (GUI)

GUI Design. Overview of Part 1 of the Course. Overview of Java GUI Programming

Contents. 1 Introduction to Computers, the Internet and the Web 1

Introduction to GUIs. Principles of Software Construction: Objects, Design, and Concurrency. Jonathan Aldrich and Charlie Garrod Fall 2014

Java & Graphical User Interface II. Wang Yang wyang AT njnet.edu.cn

JAVA. A. Zakiuddin Ahmed. M.Sc.,M.Phil M.S.(Edn), PGDCSM, Professor in Computer Science, P. Rizwan Ahmed. MCA., M.Sc.,M.A., M.Phil.

Java FX 2.0. Dr. Stefan Schneider Oracle Deutschland Walldorf-Baden

Unit 6: Graphical User Interface

GUI Components Continued EECS 448

DM550 / DM857 Introduction to Programming. Peter Schneider-Kamp

Java APIs, Extensions and Libraries

Copyright 2013, Oracle and/or its affiliates. All rights reserved.

CS410G: GUI Programming. The Model/View/Controller Pattern. Model. Controller. View. MVC is a popular architecture for building GUIs

A Tool for Automated GUI Program Grading

Transcription:

JTcl and Swank What s new with Tcl and Tk on the JVM Bruce A. Johnson, Tom Poindexter, & Dan Bodoh

JTcl and Swank Bruce s Motivation Cross-platform, scriptable, desktop applications for analyzing and visualizing large (multi-gbyte) data sets Complex applications for small market requires high productivity

Why Java Extensive library Threading Write Once, Run on Mac, Windows, Linux... Stupid mistakes hard(er) to make More productivity, for the same reasons Tcl more productive tool than C.

Why Java configure!!!!! Tcl 8.5.8 configure is 20162 lines long Not a problem for pure Tcl, but as soon as you start using C coded extensions... 32 bit/64 bit, Linux (which Linux), Mac, Windows (oops, not configure on Windows)

Why Java % set ds [java::new org.apache.commons.math.stat.descriptive.descriptivestatistics] java0x259 % $ds addvalue 9 % $ds addvalue 10 % $ds addvalue 11 % $ds addvalue 8 % set mean [$ds getmean] 9.5 % set variance [$ds getvariance] 1.6666666666667

Jacl Java Command Language Implementation of Tcl that runs on the Java Virtual Machine Project started by Ioi Lam and Brian Smith at Cornell (Tcl/Tk Conference 1997) Continued at Sun, then Scriptics, then largely maintained by Mo DeJong

Jacl Part of the Tcl/Java Project http://tcljava.sourceforge.net Includes TclBlend which allows one to load the JVM into the C version of Tcl Most recent release is 1.4.1 in April 2008 Includes TJC - Tcl to Java Compiler & ITcl Essentially Tcl 8.0 w/o Tcl Byte Code Compiler

Jacl JTcl Started with the Google Summer of Code-2009 After GSC we decided to fork Jacl to JTcl to Goal to bring Jacl to Tcl 8.4 (Radoslaw Szulgo) accelerate the incorporation of the changes and do further modernization

JTcl Drop TclBlend No interest to team, makes build environment more complex

JTcl Modernization Testing Drive from JUnit Drop platform specific tests Fix erroneous test results

JTcl Code Modernization Rearrange packages Reformat code to standard Java style Switch from make to Maven IDE/mvn friendly layout Move from 4 jars (jacl,tcljava,itcl, tjc) to 1 jar file (and it includes much of tcllib). java -jar jtcl.jar jtcl and jtcl.bat

JTcl Code Modernization Regular Expressions java.lang.regex.pattern java.lang.regex.matcher plus translations from Tcl to Java syntax

JTcl Pipelines Pipelines for exec and open commands now supported Pure Java solution using java.lang.process and java.lang.processbuilder Redirection handled by JTcl, some limitations that may go away with Java 7

JTcl Channels Java Class SeekableChannel FileChannel Description Abstract class that adds seek() and tell() Extends SeekableChannel to implement file I/O ResourceChannel ReadInputStreamChannel Implements reading of a Java resource using a resource: prefix on the file name Bridges a Tcl channel to a Java InputStream AbstractSocketChannel Abstract class that has common code for socket channels ServerSocketChannel Implements Tcl server sockets SocketChannel TclByteArrayChannel Implements Tcl sockets Used internally to bridge Tcl channels to Tcl byte arrays

JTcl fcopy & File Events fcopy Copies bytes from one channel to another Copy occurs in second Java thread filevents Depends on new non-blocking IO in channel system

JTcl File Events Hallmark of Tcl is the event system that allows writing servers with a minimum of code Simple test of File Events and Channels Dustmote ( http://wiki.tcl.tk/4333 ) Web server in ~40 lines of code It works, and spawns threads proportional to the number of simultaneous client requests.

JTcl Summary ~Tcl 8.4 + dict and apply from Tcl 8.5 (thanks to Neil Madden)

Swank Success of Tcl, has a lot to do with Tk Swank written to provide Tk companion to Jacl (now JTcl) and necessary for my applications. Swank generated as a combination of Java code that is hand written and generated with JTcl scripts.

Swank Swing - Tk Correspondence - Standard Widgets Swing Tk Swing Tk JButton button JRadioButtonMenuItem radiobutton (on menus) JCheckBox checkbutton JScrollBar scrollbar JFrame toplevel JSlider scale JLabel label JSpinner spinbox JList listbox JTextArea message JMenu menu JTextField entry JMenuBar menubar JTextPane text JPanel frame JFrame (composite) labelframe JRadioButton radiobutton JPanel (customized) canvas

Swank Swing - Tk Correspondence - Other Widgets Swing Tk Swing Tk JDesktopPane jdesktoppane JProgressBar jprogressbar JComboBox jcombobox JScrollPane jscrollpane JDialog jdialog JSplitPane panedwindow JEditorPane html JTabbedPane jtabbedpane JInternalFrame JInternalframe JTable jtable JOptionPane joptionpane JToolBar jtoolbar JPasswordField jpasswordfield JTree jtree JPopupMenu jpopupmenu JWindow jwindow

Swank Canvas Additional Canvas Items htext: Displays basic HTML connector: Line between two other objects annotation:arrow with text at other end charts:implemented with JFreeChart Affine Transforms Transform configuration for each item Custom items can generate their own Canvas wide allows zooming whole canvas

Swank Canvas Item Handles Intrinsic aspect of each item handle subcommand Scene graph Each item has a -node option New canvas node item Traditional canvas is scene graph with one root raise/lower operate on nodes

Swank Canvas3D Rendering with Java 3D Create items like as on traditional canvas, but with x,y,z coordinates Sphere, Cylinders, Cones, Text I use custom 3D molecule item

Swank What s Next - TkFX Swank depends on Java Swing Swing is unlikely to see further development by Oracle JavaFX is the new focus of Oracle for Java GUI New hardware accelerated graphics engine (Prism) New windowing toolkit (Glass) Media Engine for streaming content Web component based on WebKit 3D graphics

TkFX toplevel button entry grid raise lower wm bind webview htmleditor

JTcl & Swank JTcl http://jtcl.kenai.com Swank http://swank.kenai.com Veery http://veery.kenai.com (Vector data inspired by Vlerq/Metakit in Java 0.0) Hyde http://aejaks.sourceforge.net Critcl for Java (generate and compile Java code from JTcl)