JFace

Last updated
JFace
EclipseScreenshot.png
The Eclipse IDE, a JFace-based application
Developer(s) Eclipse Foundation
Stable release
3.9.1 / July 25, 2013 (2013-07-25)
Operating system Cross-platform
Available inMultilingual
Type widget toolkit for the Java platform
License Eclipse Public License
Website wiki.eclipse.org/index.php/JFace

JFace is defined by the Eclipse project as "a UI toolkit that provides helper classes for developing UI features that can be tedious to implement." [1] The Standard Widget Toolkit (SWT) is an open source widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented.

Contents

Structure

It is a layer that sits on top of the raw widget system, and provides classes for handling common UI programming tasks. It brings model view controller programming to the Standard Widget Toolkit.

  1. Provides Viewer classes that handle the tedious tasks of populating, sorting, filtering, and updating widgets
  2. Provides Actions to allow users to define their own behavior and to assign that behavior to specific components, e.g. menu items, tool items, push buttons, etc.
  3. Provides registries that hold Images and Fonts
  4. Defines standard dialogs and wizards, and defines a framework for building complex interactions with the user
  5. Its primary goal is to free the developer up, letting the developer focus on the implementation of his or her specific application without having to be concerned with the underlying widget system or solving problems that are common in almost all UI applications.
  6. A primary concern of the Eclipse group when developing JFace was that under no circumstances did they want to hide the SWT component implementation from the programmer. JFace is completely dependent on SWT, but SWT is not dependent on JFace. Furthermore, the Eclipse Workbench is built on both JFace and SWT; in some instances, it bypasses JFace and accesses SWT directly.

Example

The following is a basic Hello World program using JFace.

importorg.eclipse.jface.window.ApplicationWindow;importorg.eclipse.swt.SWT;importorg.eclipse.swt.widgets.*;publicclassHelloWorldextendsApplicationWindow{publicstaticvoidmain(String[]args){newHelloWorld().run();}publicHelloWorld(){super(null);}publicvoidrun(){setBlockOnOpen(true);open();Display.getCurrent().dispose();}protectedControlcreateContents(Compositeparent){Labellabel=newLabel(parent,SWT.CENTER);label.setText("Hello, World");returnlabel;}}

See also

Related Research Articles

Eclipse (software) Java software development environment

Eclipse is an integrated development environment (IDE) used in computer programming. It contains a base workspace and an extensible plug-in system for customizing the environment. Eclipse is written mostly in Java and its primary use is for developing Java applications, but it may also be used to develop applications in other programming languages via plug-ins, including Ada, ABAP, C, C++, C#, Clojure, COBOL, D, Erlang, Fortran, Groovy, Haskell, JavaScript, Julia, Lasso, Lua, NATURAL, Perl, PHP, Prolog, Python, R, Ruby, Rust, Scala, and Scheme. It can also be used to develop documents with LaTeX and packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java and Scala, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others.

In computer programming, an application framework consists of a software framework used by software developers to implement the standard structure of application software.

Swing (Java) Java GUI widget toolkit

Swing is a GUI widget toolkit for Java. It is part of Oracle's Java Foundation Classes (JFC) – an API for providing a graphical user interface (GUI) for Java programs.

Standard Widget Toolkit graphical widget toolkit for use with the Java platform

The Standard Widget Toolkit (SWT) is a graphical widget toolkit for use with the Java platform. It was originally developed by Stephen Northover at IBM and is now maintained by the Eclipse Foundation in tandem with the Eclipse IDE. It is an alternative to the Abstract Window Toolkit (AWT) and Swing Java graphical user interface (GUI) toolkits provided by Sun Microsystems as part of the Java Platform, Standard Edition (J2SE).

Graphical widget Element of interaction in a graphical user interface

A graphical widget in a graphical user interface is an element of interaction, such as a button or a scroll bar. Controls are software components that a computer user interacts with through direct manipulation to read or edit information about an application. User interface libraries such as Windows Presentation Foundation, GTK, and Cocoa, contain a collection of controls and the logic to render these.

PyQt GUI Library for Python

PyQt is a Python binding of the cross-platform GUI toolkit Qt, implemented as a Python plug-in. PyQt is free software developed by the British firm Riverbank Computing. It is available under similar terms to Qt versions older than 4.5; this means a variety of licenses including GNU General Public License (GPL) and commercial license, but not the GNU Lesser General Public License (LGPL). PyQt supports Microsoft Windows as well as various flavours of UNIX, including Linux and MacOS.

The FOX toolkit is an open-source, cross-platform widget toolkit, i.e. a library of basic elements for building a graphical user interface (GUI). FOX stands for Free Objects for X.

wxPython Python binding for the wxWidgets

wxPython is a wrapper for the cross-platform GUI API wxWidgets for the Python programming language. It is one of the alternatives to Tkinter. It is implemented as a Python extension module.

Magic User Interface

The Magic User Interface is an object-oriented system by Stefan Stuntz to generate and maintain graphical user interfaces. With the aid of a preferences program, the user of an application has the ability to customize the system according to personal taste.

The event dispatching thread (EDT) is a background thread used in Java to process events from the Abstract Window Toolkit (AWT) graphical user interface event queue. It is an example of the generic concept of event-driven programming, that is popular in many other contexts than Java, for example, web browsers, or web servers.

gtkmm is the official C++ interface for the popular GUI library GTK. gtkmm is free software distributed under the GNU Lesser General Public License (LGPL).

Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's de facto standard GUI. Tkinter is included with standard Linux, Microsoft Windows and Mac OS X installs of Python.

BD-J, or Blu-ray Disc Java, is a specification supporting Java ME Xlets for advanced content on Blu-ray Disc and the Packaged Media profile of Globally Executable MHP (GEM).

qooxdoo

qooxdoo is an open-source Ajax web application framework. It is an LGPL- and/or EPL-licensed client-side and server-agnostic solution, and includes support for professional JavaScript development, a graphical user interface (GUI) toolkit and high-level client-server communication.

Intuition (Amiga) user interface engine of AmigaOS

Intuition is the native windowing system and user interface (UI) engine of AmigaOS. It was developed almost entirely by RJ Mical. Intuition should not be confused with Workbench, the AmigaOS spatial file manager, which relies on Intuition for handling windows and input events.

ReAction GUI is the widget toolkit engine that is used in AmigaOS 3.5-4.1.

A software widget is a relatively simple and easy-to-use software application or component made for one or more different software platforms.

Abstract Window Toolkit standard Java library for graphical user interfaces, succeeded by Swing

The Abstract Window Toolkit (AWT) is Java's original platform-dependent windowing, graphics, and user-interface widget toolkit, preceding Swing. The AWT is part of the Java Foundation Classes (JFC) — the standard API for providing a graphical user interface (GUI) for a Java program. AWT is also the GUI toolkit for a number of Java ME profiles. For example, Connected Device Configuration profiles require Java runtimes on mobile telephones to support the Abstract Window Toolkit.

Fyne (software) Graphical toolkit for building cross platform GUIs

Fyne is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs) across desktop and mobile platforms. It is inspired by the principles of Material Design to create applications that look and behave consistently across all platforms. It is licensed under the terms of the 3-clause BSD License, supporting the creation of free and proprietary applications. In December 2019 Fyne became the most popular GUI toolkit for Go, by GitHub star count and in early February 2020 it was trending as #1 project in GitHub trending ranks.

References

Bibliography