java.lang.Object | +--javax.swing.text.View | +--javax.swing.text.ComponentView | +--javax.swing.text.html.FormView
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 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.
| 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 |
| Inner Class Summary | |
protected class |
FormView.MouseEventListener
FormView.MouseEventListener
|
| Field Summary | |
static String |
RESET
copy-> RESET
|
static String |
SUBMIT
copy-> SUBMIT
|
| Fields inherited from class javax.swing.text.View |
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
FormView
copy-> new FormView( )copy-> <FormView var> = new FormView(<Element elem>);
|
|
| Method Summary | |
void |
actionPerformed(ActionEvent evt)
copy-> .actionPerformed( )copy-> <FormView>.actionPerformed(<ActionEvent evt>);
|
protected Component |
createComponent()
copy-> .createComponent()copy-> <Component var>=<FormView>.createComponent();
|
protected void |
imageSubmit(String imageData)
copy-> .imageSubmit( )copy-> <FormView>.imageSubmit(<String imageData>);
|
protected void |
submitData(String data)
copy-> .submitData( )copy-> <FormView>.submitData(<String data>);
|
| Methods inherited from class javax.swing.text.ComponentView |
getAlignment, getComponent, getMaximumSpan, getMinimumSpan, getPreferredSpan, modelToView, paint, setParent, setSize, viewToModel |
| Methods inherited from class javax.swing.text.View |
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getView, getViewCount, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, updateChildren, updateLayout, viewToModel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |