Common Controls user's guide Copyright © 2000-2014 | Version 1.7.4 (June 26 2014) |
Legal Notice
Permission is granted to copy, distribute and/or
modify this document under the terms of the GNU Free
Documentation License, Version 1.1 or any later version
published by the Free Software Foundation; with no
"Invariant Sections", "Front-Cover Texts"
or "Back-Cover Texts", each as defined in the license.
A copy of the license can be found in the file
COPYING.DOC.txt
included with jEdit.
Table of Contents
Introduction
The plugin provides a set of common controls which can be useful for development of various jEdit plugins. Some of them are old and deprecated because they have been replaced by newer/better classes in jEdit or the Java API.
These are the classes are documented here. To see a complete list of all classes in CommonControls, refer to the source or the javadoc documentation.
Author:
An extension of the default Swing JTable, that passes action key events, displays tooltips and autoresizes columns.
In detail, the following features are provided:
Fires an ActionEvent, if Enter, Tab or Shift-Tab is pressed.
Therefore, addActionListener(ActionListener) and removeActionListener(ActionListener) methods are provided.
Displays tooltips for partially visible text entries.
To use this feature, you must use a TableCellRenderer that implements the methods getToolTipText() and/or getToolTipText(MouseEvent), otherwise you won't see any tooltips.
utoresizes all columns to the length of its longest content string.
As a drawback, this HelpfulJTable can only be used to with a String cell renderer, nothing complicated as a JList. (Complex components may be used a CellEditor, however).
Only the default constructor of JTable is provided. Please use setModel(TableModel) to set another model.
Author:
This is a combo-box that allows listeners to be informed of mouse entered and mouse exited events.
Note that other mouse events besides MOUSE_ENTERED and MOUSE_EXITED still do not get delivered. This is because sending a MOUSE_PRESSED, MOUSE_CLICKED or MOUSE_RELEASED event would cause the combo box popup to be hidden immediately after it has been shown, resulting in that it would not be shown at all.
This class was created as a fix/workaround for Swing bug #4144505.
Author:
Nice panel for composing some path ($PATH or $CLASSPATH). Improved version of PathBuilder.
Author:
The control is a generic popup component that displays a list of items.
Here's a list of potential uses for it:
Pop up a list of Templates to apply;
Pop up a list of dockables to switch between, much like the fast views concept in Eclipse;
Pop up a list of open buffers (yet another buffer switching mechanism);
Pop up list of auto-completions.
Author:
A panel with two buttons that tie to an instance of jEdit's EnhancedDialog and provide a GUI for the ok() and cancel() methods (aside from the regular enter/esc key bindings). The button label are configurable (defaults to OK and Cancel).
Author:
An implementation of jEdit's AbstractOptionPane that is easily configurable by using strings to define the component. Loading and saving of configuration data is handled automatically for the user of the class.
Author:
A text field with an "attached" button that opens up a File Chooser so the user can pick up a file or directory.
Author:
This component shows the "blame" panel on the right side of the text area. This is used by the SVN Plugin and the Git Plugin.
Author:
An output stream that uses a temporary file to write the data, and only overwrites the target file at close time.
Author:
A thread pool for executing non-GUI related tasks in a separate thread, avoiding blocking the GUI.
The pool working by adding "requests", which are instances of java.lang.Runnable, which are then picked up by the running worker threads and executed asynchronously. By adding a collection of requests instead of a single request the user forces the pool to create enough threads to handle all the requests simultaneouslty, so that tasks that need this functionality (such as reading from forked processes) can be easily run using this mechanism.
Normally plugins use the "single request" add method, which means that only one worker thread will be created. The caller can force new threads to be created by first calling the class's "ensureCapacity(int)" method, which will guarantee that at least the number of requested worker threads are running.
This is a simplified version of Java 5's ThreadPoolExecutor, and also provides a simplified version of the "Future" class (called "WorkRequest"). Callers can use the WorkRequest instances returned by the pool to control when the requests are finished.
Version 1.7.3.
German Language Update
Enhanced FileTextField with setEnabled() and setToolTip()
Version 1.7.
Fix #3615050 SmartOpen only lets me type one letter on MacOS L&F.
Added the Blame component.
Version 1.1.
Added CloseableTabbedPane, a Java 5 version of a Java 6 feature added to JTabbedPane.
Version 1.0.
Added a Java 5 version of SwingWorker.
Version 0.9.4.
Add a few new classes: EasyOptionPane, FileTextField, ModalJFileChooser and AtomicOutputStream.
Version 0.9.2.
Small change to pathbuilder so it uses File.getPath()
instead of getCanonicalPath()
filenames returned from the file browser.
Version 0.9.0.
Adds a worker thread pool, fixes jEdit 4.3 compatibility for PopupList.
Version 0.8.1.
Uses deferred loading with jEdit 4.2.
Version 0.8.
Some fixes and improvements inHelpfulJTable. Now it can use the width of the headers in autoresize mode. Also, autoresizing does not exclude manual resizing any more.
Version 0.7.
The version of Kappa and Lambda layout managers is updated.
Version 0.6.
More stuff in PopupList.
Version 0.5.
Some additions to PopupList.
Version 0.4.
PopupList added
Version 0.3.
Version 0.2.
PathBuilder package added
Version 0.1.
First release.
All jEdit users are encouraged to join the
<jedit-users@lists.sourceforge.net>
mailing list to give
feedback or ask questions to other users and developers.
The preferred way to send bug reports against most jEdit plugins is to use the jEdit Plugin Bugs Tracker.
Feature requests can be found on the jEdit Plugin feature requests tracker.
Development questions should be posted to the jEdit development
mailing-list <jedit-devel@lists.sourceforge.net>
.