Catálogo de publicaciones - libros
The Definitive Guide to Java Swing
John Zukowski
Third Edition.
Resumen/Descripción – provisto por la editorial
No disponible.
Palabras clave – provistas por la editorial
Software Engineering/Programming and Operating Systems
Disponibilidad
Institución detectada | Año de publicación | Navegá | Descargá | Solicitá |
---|---|---|---|---|
No detectada | 2005 | SpringerLink |
Información
Tipo de recurso:
libros
ISBN impreso
978-1-59059-447-6
ISBN electrónico
978-1-4302-0033-8
Editor responsable
Springer Nature
País de edición
Reino Unido
Fecha de publicación
2005
Información sobre derechos de publicación
© Apress 2005
Cobertura temática
Tabla de contenidos
Advanced Swing Containers
John Zukowski
In this chapter, you explored several high-level Swing containers. With the Box class, you can more easily utilize the BoxLayout manager to create a single row or column of components, honoring the minimum, preferred, and maximum size of the components the best way possible.
With the JSplitPane component, you can create a row or column consisting of two components with a divider in between them to allow an end user to alter the components’ sizes manually by moving the divider.
The JTabbedPane container displays only one component from a set of contained components at a time. The displayed component is picked by the user selecting a tab, which can contain a title with or without mnemonic, an icon, and a tooltip. This is the popular property sheet metaphor commonly seen within applications.
The JScrollPane and JViewport containers allow you to display a large component within a small area. The JScrollPane adds scrollbars to enable an end user to move the visible part around, whereas the JViewport doesn’t add these scrollbars.
In Chapter 12, we’ll once again examine the individual components within the Swing library, including the JProgressBar, JScrollBar, and JSlider that share the BoundedRangeModel as their data model.
Pp. 377-418
Bounded Range Components
John Zukowski
In this chapter, you’ve learned how to use Swing’s JScrollBar, JSlider, and JProgressBar components. You saw how each uses the BoundedRangeModel interface to control the internal data necessary to operate the component, and how the DefaultBoundedRangeModel class offers a default implementation of this data model.
Now that you know how to use the various bounded range components, you can move on to Chapter 13, which looks at the controls that offer data selection: JList and JComboBox.
Pp. 419-449
List Model Controls
John Zukowski
This chapter has demonstrated how to use Swing’s JList and JComboBox components. You’ve seen how both components support their own data model, renderer, selection capabilities, and even a custom editor for the JComboBox component. Although all these capabilities are customizable, each of the components is readily usable with its default configuration.
In Chapter 14, you will start to explore the Swing text components, including JTextField and JTextArea.
Pp. 451-508
Spinner Model Controls
John Zukowski
In this chapter, you learned about Swing’s JSpinner component. When your set of choices is limited to a fixed set or a range of values, a JSpinner allows you to select a value by spinning through the different choices. You learned how that set of choices could be provided: from a set of dates with the SpinnerDateModel and DateEditor, with the SpinnerListModel and ListEditor, or via the SpinnerNumberModel and NumberEditor.
Chapter 15 moves beyond selection from a range of values and on to where a user actually types in the whole content in the different text components.
Pp. 509-520
Basic Text Components
John Zukowski
Chaotic neural networks have been proved to be strong tools to solve the optimization problems. In order to escape the local minima, a new chaotic neural network model called Shannon wavelet chaotic neural network was presented. The activation function of the new model is non-monotonous, which is composed of sigmoid and Shannon wavelet. First, the figures of the reversed bifurcation and the maximal Lyapunov exponents of single neural unit were given. Second, the new model is applied to solve several function optimizations. Finally, 10-city traveling salesman problem is given and the effects of the non-monotonous degree in the model on solving 10-city traveling salesman problem are discussed. The new model can solve the optimization problems more effectively because of the Shannon wavelet being a kind of basic function. Seen from the simulation results, the new model is powerful.
Pp. 521-584
Advanced Text Capabilities
John Zukowski
In this chapter, you saw several of the more advanced aspects of working with the JFC/Project Swing text components. You looked into how to use the predefined TextAction objects to create working user interfaces without defining any of your own event-handling capabilities. In addition, you explored the JTextPane and how to create multiple-attributed text within a JTextPane through the AttributeSet, MutableAttributeSet, SimpleAttributeSet, and StyleConstants. You also saw how to create tab stops within a Document and glanced at the EditorKit facilities of Swing, exploring the details of the HTMLEditorKit specifically. Finally, you learned more about accepting formatted input with the JFormattedTextField.
For additional information about the Swing text package, be sure to stop by The Swing Connection at http://java.sun.com/products/jfc/tsc/articles/text/overview/.
In Chapter 17, you’ll explore the Swing component for displaying hierarchical data: the JTree.
Pp. 585-621
Trees
John Zukowski
In this chapter, you learned about the many classes related to the use of the JTree component. You looked at tree node rendering with the TreeCellRenderer interface and the DefaultTreeCellRenderer implementation. You delved into tree node editing with the TreeCellEditor interface, and the DefaultCellEditor and DefaultTreeCellEditor implementations.
After reviewing how to display and edit a tree, you dealt with the TreeNode interface, MutableTreeNode interface, and DefaultMutableTreeNode class for manually creating tree objects. You explored the TreeModel interface and DefaultTreeModel implementation for storing the data model of a tree, and the TreeSelectionModel interface and DefaultTreeSelectionModel implementation for storing the selection model for a tree.
In addition, you looked at the many event-related classes for the various tree classes, and the TreePath for describing node connection paths.
In Chapter 18, you’ll explore the javax.swing.table package and its many classes that can be used with the JTable component.
Pp. 623-674
Tables
John Zukowski
In this chapter, you explored the inner depths of the JTable component. You looked at customizing the TableModel, TableColumnModel, and ListSelectionModel for the JTable. You delved into both the abstract and concrete implementations of the different table models. In addition, you examined the inner elements of the various table models, such as the TableColumn and JTableHeader classes. You also looked into how to customize the display and editing of the JTable cells by providing a custom TableCellRenderer and TableCellEditor. Finally, you learned about printing tables via the new print() method.
In Chapter 19, you’ll explore the drag-and-drop architecture of the JFC/Swing component set.
Pp. 675-728
Drag-and-Drop Support
John Zukowski
Drag-and-drop support in Swing is rich and varied. You get quite a bit of behavior for free for several of the standard components. If you need more, you can dig down a layer at a time until you expose the features you need.
Typically, you don’t need to dig all the way into java.awt.dnd classes like DragSourceDragEvent, DragSourceDropEvent, or DropTargetDragEvent (to name a few). They are there and doing their work under the covers, but you don’t need to worry about them. Instead, drag-and-drop support is typically delegated to the TransferHandler associated with a property of the component to drag. Just setDragEnabled(true) on that component, and you’re ready to go. You can also set up drag-and-drop support for other items, such as images, by creating an implementation of the Transferable interface.
In the next chapter, you’ll explore Swing’s pluggable look and feel architecture. You’ll learn how to customize your user interfaces without changing the code for the program.
Pp. 729-740
The Pluggable Look and Feel Architecture
John Zukowski
Chaotic neural networks have been proved to be strong tools to solve the optimization problems. In order to escape the local minima, a new chaotic neural network model called Shannon wavelet chaotic neural network was presented. The activation function of the new model is non-monotonous, which is composed of sigmoid and Shannon wavelet. First, the figures of the reversed bifurcation and the maximal Lyapunov exponents of single neural unit were given. Second, the new model is applied to solve several function optimizations. Finally, 10-city traveling salesman problem is given and the effects of the non-monotonous degree in the model on solving 10-city traveling salesman problem are discussed. The new model can solve the optimization problems more effectively because of the Shannon wavelet being a kind of basic function. Seen from the simulation results, the new model is powerful.
Pp. 741-782