|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Widget
A multipurpose GUI control for a datatype.
The Swing framework requires a variety of types of controls for various contexts. For example, for a simple text string, you may use a JLabel to view it, a JTextField to edit it, and variations on those two to view and edit them within a JTable. Our previous approach was to create separate classes for each case, but in fact a lot of the logic involved (e.g. updating or reading the underlying model, event management, etc.) is the same and some efficiency can be gained in the code. Also, and more importantly, forcing the implementor to support all contexts at once means that you don't end up with piecemeal library and know that if you have a viewer for something you'll also be able to show it in a JTable.
The name widget is yet another abuse of a generic term. It is a nod to the X Window Sysstem, but is otherwise unrelated.
Copyright 2007 Partner Software, Inc.
| Method Summary | |
|---|---|
javax.swing.CellEditor |
createCellEditor()
|
javax.swing.table.TableCellRenderer |
createCellRenderer()
|
javax.swing.JComponent |
createEditor()
|
javax.swing.JComponent |
createSmallViewer()
|
javax.swing.JComponent |
createViewer()
|
| Method Detail |
|---|
javax.swing.JComponent createSmallViewer()
javax.swing.JComponent createViewer()
javax.swing.JComponent createEditor()
javax.swing.CellEditor createCellEditor()
javax.swing.table.TableCellRenderer createCellRenderer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||