Release Notes
Release Date: 17 November 2005
This is the 0.8 development release
Project: swingx
Since the 0.7 release a tremendous amount of work has been done to add polish and completeness to the UI components offered in the SwingX project. The work of polishing still isn't complete, but the components are now in very good condition overall. Documentation is still improving. Listed below are some of the major new additions to the SwingX component set.
Autocompletion
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.
Enabling automatic completion for e.g. a JComboBox is only one line of code:
import org.jdesktop.swingx.autocomplete.Configurator; [...] JComboBox comboBox = [...]; Configurator.enableAutoCompletion(comboBox);
See the JavaDoc for the org.jdesktop.swingx.autocomplete package for more detailed information. Click here to run the demo
JXCollapsiblePane
JXCollapsiblePane
is a Swing component which can collapse or
expand its content area with animation and fade in/fade out effects.
It also acts as a standard container for other Swing components.
In this example, the JXCollapsiblePane
is used to build
a Search pane which can be shown and hidden on demand.
JXCollapsiblePane cp = new JXCollapsiblePane(); // JXCollapsiblePane can be used like any other container cp.setLayout(new BorderLayout()); // the Controls panel with a textfield to filter the tree JPanel controls = new JPanel(new FlowLayout(FlowLayout.LEFT, 4, 0)); controls.add(new JLabel("Search:")); controls.add(new JTextField(10)); controls.add(new JButton("Refresh")); controls.setBorder(new TitledBorder("Filters")); cp.add("Center", controls); JXFrame frame = new JXFrame(); frame.setLayout(new BorderLayout()); // Put the "Controls" first frame.add("North", cp); // Then the tree - we assume the Controls would somehow filter the tree JScrollPane scroll = new JScrollPane(new JTree()); frame.add("Center", scroll); // Show/hide the "Controls" JButton toggle = new JButton(cp.getActionMap().get("toggle")); frame.add("South", toggle); frame.pack(); frame.setVisible(true);
JXErrorDialog
A common Error Dialog, suitable for representing information about
errors and exceptions happened in application. The common usage of the
JXErrorDialog
is to show collected data about the incident and
probably ask customer for a feedback. The data about the incident consists
from the title which will be displayed in the dialog header, short
description of the problem that will be immediately seen after dialog is
became visible, full description of the problem which will be visible after
user clicks "Details" button and Throwable that contains stack trace and
another usable information that may be displayed in the dialog.
To ask user for feedback extend abstract class ErrorReporter
and
set your reporter using setReporter
method. Report button will
be added to the dialog automatically. See org.jdesktop.swingx.MailErrorReporter
documentation for the example of error reporting usage.
For example, to show simple JXErrorDialog
call
JXErrorDialog.showDialog(null, "Application Error",
"The application encountered the unexpected error,
please contact developers")
JXFindBar
A simple Mozilla Firefox-ish search bar for use with the SwingX search subsystem
JXHyperlink
A relatively trivial component at heart, yet incredibly useful for many UIs, the JXHyperlink component mimicks the behavior of an HTML anchor. The JXHyperlink is essentially a button that looks like your typical web hyper link, with rollover support and click-color support.
JXLoginPanel
The JXLoginPanel leverages the SwingLabs Authentication Framework to provide a pleasing, usable, standard login component. The JXLoginPanel may be embedded in any Swing container (such as a custom login dialog). Alternatively, JXLoginPanel contains several static methods to create either a login dialog, or a login frame.
The SwingLabs Authentication Framework provides a basic authentication abstraction useful when writing Java applications. It comprises of 3 main classes: LoginService, PasswordStore, and UserNameStore.
LoginService is the main abstraction, responsible for handling multithreaded authentication. A LoginService can be configured to perform either synchronous or asynchronous authentication. LoginListeners may be registered with the LoginService. These listeners will be notified during the various phases of the authentication process, such as when login is started, as well as if and when it is canceled, succeeds, or fails.
Various default implementations of LoginService may be used out of the box, such as JAASLoginService, JDBCLoginService, or SimpleLoginService. For more information, See the JXLoginPanel Tutorial.
JXPanel
A simple JPanel extension that adds translucency support. This component and all of its content will be displayed with the specified "alpha" transluscency property value. It also provides basic experimental support for gradients.
It is used extensively within SwingX (hopefully, all JPanels will be replaced by JXPanels before the 1.0 release!).
JXTaskPane
Typically, the JXTaskPane is a container for actions represented by hyperlinks. But more generally, any component can be added in the JXTaskPane. Components are directly added on the JXTaskPane in the normal manner:
taskPane.add(myComponent);
When the end-user clicks on the JXTaskPane header, the pane toggles its state and hides or shows its content. When collapsed, only the header is visible. The developer can programmatically expand or collapse the component. If the JXTaskPane is contained in a JScrollPane, there is an option (scrollOnExpand) to ensure the JScrollPane will automatically scroll if the JXTaskPane is not completely visible.
In addition to supporting any components, the JXTaskPane can use add Actions. When an Action (javax.swing) is added to the JXTaskPane, it will automatically create a JXHyperlink. The hyperlink icon, tooltip, text are taken from the Action as a JToolBar does.
Individual JXTaskPanes are typically placed within a JXTaskPaneGroup. The JXTaskPaneGroup provides both a decent LayoutManager for handling the JXTaskPanes animation, as well as sensible background colors for different look and feels.
JXTipOfTheDay
"Tip of the Day" dialogs are commonly seen in rich client applications. This page has screen shots of many different Tip of the Day dialogs. This general component has been implemented and is in the org.jdesktop.swingx package.
JXTitledPanel
A simple JPanel that has a title section. This style of component is especially common in binding frameworks that require some kind of "handle" for dragging a panel around. They are also an elegant alternative to title borders, at times. When used judiciously, they help present a pleasing UI
PLAF
Pluggable Look and Feel implementations for the current component have been written. Part of this involved some API to make it easier to add PLAF implementations onto the existing Swing PLAF framework. This additional API is called LookAndFeelAddon and can be read about in more detail here.
Resolved Issues
Thu Nov 17 21:57:53 +0000 2005 | |||||
---|---|---|---|---|---|
ID | Type | Priority | Votes | Component | Summary |
13 | DEFECT | P1 | 0 | swingx | JXTable: no way to configure column identifier vs. name |
37 | DEFECT | P1 | 0 | swingx | ColumnControlButton ignores TableColumnExt visibility |
38 | DEFECT | P1 | 0 | swingx | JXTable: ColumnControl doesn't contain initially invisible columns |
87 | TASK | P1 | 0 | swingx | Add More Components to the Issue Tracker |
186 | DEFECT | P1 | 0 | swingx | JXTable: problems with selection/lead and button type editors |
23 | DEFECT | P2 | 0 | swingx | JXMonthView not keyboard navigable - accessibility |
24 | DEFECT | P2 | 0 | swingx | DatePicker drop down not keyboard navigable - accessibility |
83 | DEFECT | P2 | 1 | swingx | JXLoginDialog & JXLoginPanel bugs |
84 | DEFECT | P2 | 0 | swingx | NPE if JXTitledPanel colors have not been set on UIManager |
100 | DEFECT | P2 | 0 | swingx | All Searchable implementations - missing support for incremental finds |
132 | DEFECT | P2 | 0 | swingx | JXEditorPane: backwards search not implemented |
145 | PATCH | P2 | 0 | swingx | JXTable cells don't change orientation according to the tables orientation |
146 | DEFECT | P2 | 0 | swingx | JXHyperlink is not BiDi compliant |
148 | DEFECT | P2 | 0 | swingx | Title and icon of the JXTaskPane don't change sides when componentOrientation is RIGHT_TO_LEFT |
150 | DEFECT | P2 | 0 | swingx | ColumnheaderRenderer: sort icons not bidi complient |
152 | PATCH | P2 | 0 | swingx | JXTable column control dissapears in RIGHT_TO_LEFT orientation |
155 | DEFECT | P2 | 0 | swingx | JXTable negates VERTICAL_SCROLLBAR_ALWAYS |
156 | DEFECT | P2 | 0 | swingx | ColumnControl: menuitems don't follow componentOrientation |
163 | TASK | P2 | 0 | swingx | SwingX: Consistently handle caught runtime exceptions |
173 | DEFECT | P2 | 0 | swingx | JXTable: setFilters() notifies selectionListeners while internal state not yet updated |
3 | DEFECT | P3 | 0 | swingx | Problems assigning plaf with JXTitledPanel |
5 | DEFECT | P3 | 0 | swingx | JXHyperLink: underline not below text |
8 | DEFECT | P3 | 0 | swingx | JXFindDialog relies on Searchable being a subclass of Component |
9 | DEFECT | P3 | 0 | swingx | JXTitledPanel: missing change notification after setTitle |
10 | DEFECT | P3 | 0 | swingx | JXTreeTable: setting tree properties does not update |
12 | TASK | P3 | 0 | swingx | JXTable: add column hide/show support |
14 | DEFECT | P3 | 0 | swingx | J*Table: not all renderers/editors are updated on LF change |
15 | DEFECT | P3 | 0 | swingx | project build-impl.xml file defines default source and target as 1.4 |
17 | PATCH | P3 | 0 | swingx | JXMonthView locale settings |
19 | DEFECT | P3 | 0 | swingx | JXTitledPanel: looses left/right decoration on LF change |
27 | DEFECT | P3 | 0 | swingx | ColumnControlButton should close the popup when clicked if it is already open |
29 | DEFECT | P3 | 0 | swingx | JXTreeTable: highlighters not highlighting tree cell completely |
31 | DEFECT | P3 | 0 | swingx | JXTableHeader: must not sort column if table disabled |
33 | DEFECT | P3 | 0 | swingx | JXTable/Sorter: doesn't keep selection after setting Comparator |
34 | DEFECT | P3 | 0 | swingx | Clicking on header in JXTable does not show arrow right away |
36 | DEFECT | P3 | 0 | swingx | Sorter: does not use Collator on String values |
40 | TASK | P3 | 0 | swingx | JXTable: improve column configuration |
41 | FEATURE | P3 | 0 | swingx | Should be able to specify link for JXDatePicker |
42 | TASK | P3 | 0 | swingx | JXTree: add methods setXXIcon |
43 | DEFECT | P3 | 0 | swingx | ColumnControl: menuitems not updated on column title change |
44 | FEATURE | P3 | 0 | swingx | ColumnControl: enabled should be synched to related JXTable |
45 | DEFECT | P3 | 0 | swingx | Sorter: interpose does not check for same adapter as new pipeline |
46 | DEFECT | P3 | 0 | swingx | FilterPipeline: empty behaviour undefined |
53 | DEFECT | P3 | 0 | swingx | JXTable: interactive sorter not removed if column removed |
54 | DEFECT | P3 | 0 | swingx | JXTable: hidden columns not removed on setModel |
58 | DEFECT | P3 | 0 | swingx | Fonts and BG for JXLoginDialog are not properly set |
59 | DEFECT | P3 | 0 | swingx | FilterPipeline: should auto-flush on assign |
60 | DEFECT | P3 | 0 | swingx | FilterPipeline: missing notification on setSorter(null) |
63 | ENHANCEMENT | P3 | 0 | swingx | JXTable/filtering: add support to include hidden columns |
64 | DEFECT | P3 | 0 | swingx | JXTable: setFilters(null) throws NPE if had row selection |
65 | ENHANCEMENT | P3 | 0 | swingx | Allow way to support changing link date on date picker popup. |
66 | DEFECT | P3 | 0 | swingx | JXRootPane setStatusBar(null) throws NPE |
68 | ENHANCEMENT | P3 | 0 | swingx | JXDatePicker: Weekend dates renderer |
76 | DEFECT | P3 | 0 | swingx | JTaskPane/Container: sizing problems |
81 | PATCH | P3 | 0 | swingx | Make JXTable cell formatters more useful |
82 | DEFECT | P3 | 0 | swingx | JXTreeTable: not updated after node inserted |
89 | DEFECT | P3 | 0 | swingx | JXTable: ColumnControl does not respect ComponentOrientation |
90 | DEFECT | P3 | 0 | swingx | JXDatePicker: dropdown not closed on clicking button again |
94 | TASK | P3 | 1 | swingx | Search/Find: general overhaul |
98 | ENHANCEMENT | P3 | 0 | swingx | Creation of datefield in JXDatePicker |
124 | DEFECT | P3 | 0 | swingx | cancelButton: size setting does not honor font settings/text |
125 | DEFECT | P3 | 0 | swingx | LoginService: startAuthentication needs to catch exceptions |
126 | DEFECT | P3 | 0 | swingx | JXLoginDialog#progressPanel not updated |
127 | ENHANCEMENT | P3 | 0 | swingx | JXLoginDialog#getState() |
128 | DEFECT | P3 | 0 | swingx | cancel login on WINDOW_CLOSE |
133 | ENHANCEMENT | P3 | 0 | swingx | JXErrorDialog#showDialog(owner, title, msg, throwable) |
135 | DEFECT | P3 | 0 | swingx | JXErrorDialog should allow a Component as parent |
139 | DEFECT | P3 | 0 | swingx | JXErrorDialog dispose() on OK |
141 | DEFECT | P3 | 0 | swingx | LoginService#authenticate should allow to throw any Exceptions |
142 | DEFECT | P3 | 0 | swingx | Exception when refreshing an applet using SwingX components having custom look and feel |
144 | DEFECT | P3 | 0 | swingx | LookAndFeelAddons override entries manually added to UIManager |
153 | DEFECT | P3 | 0 | swingx | ColumnControlButton fails with ClassCastException when adding keystrokes on JXTreeTable |
160 | DEFECT | P3 | 0 | swingx | JXTaskPane disappears when animation off |
164 | DEFECT | P3 | 0 | swingx | JXTable: unexpected (caught) accessControlException |
165 | PATCH | P3 | 0 | swingx | IndexOutOfBoundsException for moveToVisible() |
175 | DEFECT | P3 | 0 | swingx | JXTaskPane: what means "special" |
179 | DEFECT | P3 | 0 | swingx | JXDatePicker#setLinkDate() has no effect |
180 | DEFECT | P3 | 0 | swingx | ArrayIndexOutOfBoundsException in PatternHighlighter |
182 | DEFECT | P3 | 0 | swingx | JXTable: no focus rect around checkbox renderer |
183 | DEFECT | P3 | 0 | swingx | LinkRenderer: selection background lost on changing LF |
190 | DEFECT | P3 | 0 | swingx | TableSearchable: too much scrolling if no match found |
198 | DEFECT | P3 | 0 | swingx | JXDatePicker needs better time zone handling and doc |
110 | DEFECT | P4 | 0 | swingx | DefaultUserNameStore.saveUserNames: key too long |
147 | DEFECT | P4 | 0 | swingx | JXImagePanel(url) always fails dueto bad class cast |
1 | TASK | P5 | 0 | swingx | Rename JXScrollUp |
169 | DEFECT | P5 | 0 | swingx | JXTable: change packSelected action to work on lead |
Project: databinding
In the 0.8 release, the DataBinding project has focused mainly on the DataSet API (org.jdesktop.dataset package). This API concerns itself with modeling accurately relational data. The concepts of DataSet will be familiar to anybody who understand the ADO.NET DataSet, or more importantly, anybody who understands relational principles as they relate to Relation Database Management Systems (RDBMS) today.
DataSet contains DataTables, which in turn contain DataColumns and DataRows. DataTables can contain key columns and be related to other DataTables via DataRelations. Finally, DataValues can be created that, using a given expression, will calculate its value.
DataSets do not rely on SQL data sources, working equally well with particular web services (WebRowSetXML, or in the .9 release the DataSetWebService specification), or local tabular data such as that found in comma and tab delimted files.
Enhancements to SQLDataProvider
SQLDataProvider was significantly enhanced, while also simplifying the API. SQLDataProvider now contains the ability to map database columns to local DataTable columns. This means that the database column name could be "foo_bar" and the local column name could be "FooBar".
Also, the relationship between a TableCommand and SQLCommand has been simplified. SQLCommand is a simple DataCommand that allows you to specify the exact Update, Insert, Delete and Select SQL statements you want to use. TableCommand extends SQLCommand by focusing on interacting with a single table. As such, it can automatically generate the update, insert, and delete SQL statements for you, as well as a broad (though inefficient) select statement. The automatically generated select statement is "select * from tableName". Since TableCommand extends SQLCommand, you can override the default generated SQL statements with your own custom SQL statements.
SQLDataProvider takes a JDBCDataConnection as its data connection. A JDBCDataConnection is based on a java.sql.Connection object (the basic connection construct in JDBC). It can be configured to retrieve this Connection from JNDI via a javax.sql.DataSource. Alternativly, you can specify the DriverManager and JDBC URL (along with the user name and password) to create a Connection. Finally, you may also use the SwingX JXLoginPanel with a JDBCLoginService to create the Connection, and simply pass this Connection object to the JDBCDataConnection
Pluggable Schema Reader/Writer
The pluggable schema reader/writer API lets you create a DataSet based on a JDBC data source, or read/write a schema from XML. The easiest way to do this is to use the org.jdesktop.dataset.util.DataSetUtility static methods.
Reader r = new FileReader("dataset-invoicing.xsd"); DataSet ds = DataSetUtility.readDataSetFromXml(r);or
JDBCDataConnection jconn = ... DataSet ds = DataSetUtility.readDataSetFromJDBC(jconn);
You can also restrict to a subset of tables (and table columns) using the optional tablenames array parameter.
Some nice-to-haves would be import/export for DDL, possibly using an Antlr or JavaCC parser for the DDL, as well as different XML formats currently in use in the industry.
Resolved Issues
Thu Nov 17 21:57:53 +0000 2005 | |||||
---|---|---|---|---|---|
ID | Type | Priority | Votes | Component | Summary |
11 | ENHANCEMENT | P1 | 0 | DataSet | Pluggable Schema Reader/Writer |
17 | DEFECT | P2 | 0 | DataSet | Assert error when discarding first row in table |
3 | ENHANCEMENT | P3 | 0 | DataSet | Separate concerns in SQLCommand / TableCommand |
5 | DEFECT | P3 | 0 | Binding | DatePickerBinding does not work |
6 | DEFECT | P3 | 0 | DataSet | Slow dataSet creation from schema |
7 | ENHANCEMENT | P3 | 0 | DataSet | SQLDataProvider needs mapping |
15 | DEFECT | P3 | 0 | DataSet | ParseException in calculated field |
16 | DEFECT | P3 | 0 | Binding | don't NPE with IndexedPropertyType |
18 | DEFECT | P3 | 0 | DataSet | DataRow in inconsistent state during RowChanged event |
23 | DEFECT | P4 | 0 | DataSet | Error saving an inserted DataRow with calc DataColumns |