Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

JFace

From Wikipedia, the free encyclopedia
JFace
The Eclipse IDE, a JFace-based application
Developer(s)Eclipse Foundation
Stable release
3.9.1 / July 25, 2013 (2013-07-25)
Repository
Operating systemCross-platform
Available inMultilingual
Typewidget toolkit for theJava platform
LicenseEclipse Public License
Websitewiki.eclipse.org/JFace
This articlerelies excessively onreferences toprimary sources. Please improve this article by addingsecondary or tertiary sources.
Find sources: "JFace" – news ·newspapers ·books ·scholar ·JSTOR
(April 2009) (Learn how and when to remove this message)

JFace is defined by theEclipse project as "aUItoolkit that provides helperclasses for developing UI features that can be tedious to implement."[1] TheStandard 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.

Structure

[edit]

It is a layer that sits on top of the rawwidget system, and provides classes for handling common UI programming tasks. It bringsmodel view controller programming to theStandard 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 standarddialogs andwizards, 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 onSWT, 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

[edit]

The following is a basicHello 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

[edit]

References

[edit]
  1. ^Eclipse programmer's guide entry on JFace

Bibliography

[edit]

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=JFace&oldid=1268122891"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp