swingx

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Natural Language Processing
51.Net
52.Parser
53.PDF
54.Portal
55.Profiler
56.Project Management
57.Report
58.RSS RDF
59.Rule Engine
60.Science
61.Scripting
62.Search Engine
63.Security
64.Sevlet Container
65.Source Control
66.Swing Library
67.Template Engine
68.Test Coverage
69.Testing
70.UML
71.Web Crawler
72.Web Framework
73.Web Mail
74.Web Server
75.Web Services
76.Web Services apache cxf 2.2.6
77.Web Services AXIS2
78.Wiki Engine
79.Workflow Engines
80.XML
81.XML UI
Java Source Code / Java Documentation  » Swing Library » swingx 
Swing GUI toolkit
License:Lesser General Public License (LGPL)
URL:https://swingx.dev.java.net/
Description:Contains extensions to the Swing GUI toolkit, including new and enhanced components that provide functionality commonly required by rich client applications.
Package NameComment
org.jdesktop.beans
org.jdesktop.swingx Contains Unit tests for JDNC's Swing Extensions.

Package Specification

Related Documentation

org.jdesktop.swingx.action Contains classes related to the JDNC actions architecture. The Actions architecture maintains the set of user initiated commands (referred to as user actions) in an application. These commands are represented as an {@link javax.swing.Action} and have properties like name and icon. The user actions are represented in the user interface by controls like menu items and toolbar buttons.

The other type of actions used by the architecture are the internal swing Actions (refered to as behaviour actions) that are embedded within the {@link javax.swing.ActionMap} of a {@link javax.swing.JComponent}.

These two types of actions are distinct from each other: user actions have a lot of properties but very little semantics by default (unless explicity bound). Behavior actions have no properties but have semantics. These two types of actions are linked by the action id which is the value of the Action.ACTION_COMMAND_KEY

The {@link org.jdesktop.swingx.action.AbstractActionExt} class extends the Swing concept of the Action by adding support for toggle or two state actions. Toggle type actions may be grouped into a set of mutually exclusive actions. This binary actions are represented in the user interface as JToggleButtons, JCheckBoxMenuItems or JRadioButtonMenuItems.

There are two types of user actions: A {@link org.jdesktop.swingx.action.BoundAction} is an action that will invoke a specific method. It may be bound to an explict component, a callback method on an object instance or one or more listeners. A {@link org.jdesktop.swingx.action.TargetableAction} is an action that doesn't have an explicit binding and the invocation will be sent to an arbitrator (the {@link org.jdesktop.swingx.action.TargetManager}) which dispatches the Action to the "current component" - represented by a Targetable instance. The current component may be explictly set by some programmatic policy (for example, changes in state).

By defalt, the current component will be driven by the focus policy as dictated by the current FocusManager. If the current component cannot handle the action then the action will be dispatched up the containment hierarchy until the action is consumed. If the action is not consumed then it will be dispatched to the Application instance which manages an application global set of actions.

These are the key classes or the actions architecture:

{@link org.jdesktop.swingx.action.ActionManager}
A repository of all shared actions in the application. There will be one instance per application which can be accessed via the Application object (was ClientApp)
{@link org.jdesktop.swingx.action.ActionContainerFactory}
Constructs JMenuBars, JMenus, JPopupMenus and JToolBars using lists of action ids. This functionality may be migrated into ActionManager.
{@link org.jdesktop.swingx.action.TargetableAction}
Represents an unbound Action. The invocation of this action will be dispatched to the TargetManager.
{@link org.jdesktop.swingx.action.BoundAction}
Represents an action which has an exclicit binding.
{@link org.jdesktop.swingx.action.TargetManager}
Manages the targetable policy for actions which have no explicit binding. The policy can be set by changes in application state, event based criteria or whatever. If the policy has not been set then it will dispatch the action to the current focusable component.
{@link org.jdesktop.swingx.action.Targetable}
An interface that contains a few methods which expose actions to the TargetManager. Targetable objects don't have to be visual components they only have to be able to handle action invocations.

Richard Bair
Last modified: Tue Sep 7 11:10:01 PDT 2004
org.jdesktop.swingx.auth
org.jdesktop.swingx.autocomplete Contains classes to enable automatic completion for JComboBox and other components.

The automatic completion feature allows the user to enter a few characters using the keyboard - meanwhile, the computer "guesses" what the user intents to enter. Take a look at the example below to get an idea of the resulting user experience. Suppose the user types 'J','O','R' and 'G'...

The easiest way to get automatic completion for a component is to use the {@link org.jdesktop.swingx.autocomplete.AutoCompleteDecorator AutoCompleteDecorator}.

Enabling automatic completion for e.g. a JComboBox is only one line of code:

import org.jdesktop.swingx.autocomplete.AutoCompleteDecorator;
[...]
JComboBox comboBox = [...];
AutoCompleteDecorator.decorate(comboBox);

When the combo box is not editable when calling {@link org.jdesktop.swingx.autocomplete.AutoCompleteDecorator#decorate(JComboBox) decorate}, the automatic completion will be strict (only allowing items contained in the combo box). When the combo box is editable it will also be possible to enter items that are not contained in the combo box.

Take care when enabling automatic completion for a JComboBox that is used as the cell editor for a JTable. You need to use the special {@link org.jdesktop.swingx.autocomplete.ComboBoxCellEditor ComboBoxCellEditor} instead of the standard DefaultCellEditor:

JTable table = [...];
JComboBox comboBox = [...];
[...]
TableColumn column = table.getColumnModel().getColumn([...]);
column.setCellEditor(new ComboBoxCellEditor(comboBox));

If you want to enable automatic completion for a component that is not supported by the {@link org.jdesktop.swingx.autocomplete.AutoCompleteDecorator AutoCompleteDecorator}, you need to implement {@link org.jdesktop.swingx.autocomplete.AbstractAutoCompleteAdaptor AbstractAutoCompleteAdaptor}. For an example see {@link org.jdesktop.swingx.autocomplete.ComboBoxAdaptor ComboBoxAdaptor} and {@link org.jdesktop.swingx.autocomplete.ListAdaptor ListAdaptor}.

The automatic completion works only for subclasses of {@link javax.swing.text.JTextComponent JTextComponent}. So you either use a component that contains a JTextComponent (e.g. JComboBox) or you connect a JTextComponent with another component (e.g. a JTextField and a JList). Of course, it's also possible to enable automatic completion for a JTextComponent without another visual component.

Once you have a custom implementation of {@link org.jdesktop.swingx.autocomplete.AbstractAutoCompleteAdaptor AbstractAutoCompleteAdaptor}, you normally would only have to make three more calls:

AbstractAutoCompleteAdaptor adaptor = new YourAdaptor([...]);
AutoCompleteDocument document = new AutoCompleteDocument(adaptor, true); // or false if you need non-strict matching
AutoCompleteDecorator.decorate(yourTextComponent, document, adaptor);

org.jdesktop.swingx.autocomplete.workarounds
org.jdesktop.swingx.border Contains Swing Border classes used by the JDNC's Swing extensions.

Package Specification

Related Documentation

org.jdesktop.swingx.calendar
org.jdesktop.swingx.color
org.jdesktop.swingx.combobox
org.jdesktop.swingx.decorator Contains API used to implement coordinated sorting, filtering, and highlighting of the extended Swing cell-rendering component classes JXTable, JXTreeTable, JXTree, and JXList.

Package Specification

Related Documentation

org.jdesktop.swingx.editors
org.jdesktop.swingx.error
org.jdesktop.swingx.event Contains API for events added as part of JDNC's Swing extensions, such as message and progress events.

Package Specification

Related Documentation

org.jdesktop.swingx.geom
org.jdesktop.swingx.graphics
org.jdesktop.swingx.icon Contains Swing Icon classes used by JDNC's Swing Extensions.

Package Specification

Related Documentation

org.jdesktop.swingx.image
org.jdesktop.swingx.multislider
org.jdesktop.swingx.multisplitpane
org.jdesktop.swingx.painter
org.jdesktop.swingx.painter.gradient
org.jdesktop.swingx.plaf Provides pluggable look-and-feel for SwingX components together with a mechanism to support custom component look-and-feels.

Related Documentation

org.jdesktop.swingx.plaf.basic
org.jdesktop.swingx.plaf.macosx
org.jdesktop.swingx.plaf.metal
org.jdesktop.swingx.plaf.misc
org.jdesktop.swingx.plaf.motif
org.jdesktop.swingx.plaf.windows
org.jdesktop.swingx.renderer
org.jdesktop.swingx.table Contains API required by the extended JTable component, JXTable.

Package Specification

Related Documentation

org.jdesktop.swingx.test
org.jdesktop.swingx.tips Provides classes and interfaces for dealing with org.jdesktop.swingx.JXTipOfTheDay.

Related Documentation

org.jdesktop.swingx.tree
org.jdesktop.swingx.treetable Contains API required by the JXTreeTable component.

Package Specification

Related Documentation

org.jdesktop.swingx.util Contains utility API required by JDNC's Swing Extensions.

Package Specification

Related Documentation

org.jdesktop.test
w_w_w._j_a__v___a___2s__.__c__o__m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.