Module java.desktop

Class FormView

All Implemented Interfaces:
ActionListener, EventListener, SwingConstants

public class FormView extends ComponentView implements ActionListener
Component decorator that implements the view interface for form elements, <input>, <textarea>, and <select>. The model for the component is stored as an attribute of the element (using StyleConstants.ModelAttribute), and is used to build the component of the view. The type of the model is assumed to of the type that would be set by HTMLDocument.HTMLReader.FormAction. If there are multiple views mapped over the document, they will share the embedded component models.

The following table shows what components get built by this view.

Shows what components get built by this view
Element Type Component built
input, type button JButton
input, type checkbox JCheckBox
input, type image JButton
input, type password JPasswordField
input, type radio JRadioButton
input, type reset JButton
input, type submit JButton
input, type text JTextField
select, size > 1 or multiple attribute defined JList in a JScrollPane
select, size unspecified or 1 JComboBox
textarea JTextArea in a JScrollPane
input, type file JTextField