|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
javax.swing.text.View
![]()
![]()
![]()
javax.swing.text.ComponentView
![]()
![]()
![]()
javax.swing.text.html.FormView
, EventListener
, SwingConstants

public class 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 |
| input, type file | JTextField |
| Nested Class Summary | |
|---|---|
protected class |
FormView.MouseEventListener
MouseEventListener class to handle form submissions when an input with type equal to image is clicked on. |
| Field Summary | |
|---|---|
static String |
RESET
Deprecated. As of 1.3, value comes from UIManager UIManager property FormView.resetButtonText |
static String |
SUBMIT
Deprecated. As of 1.3, value now comes from UIManager property FormView.submitButtonText |
Fields inherited from class javax.swing.text.View ![]() |
|---|
BadBreakWeight |
Fields inherited from interface javax.swing.SwingConstants ![]() |
|---|
BOTTOM |
| Constructor Summary | |
|---|---|
FormView
Creates a new FormView object. |
|
| Method Summary | |
|---|---|
void |
actionPerformed
Responsible for processeing the ActionEvent. |
protected Component |
createComponent
Create the component. |
float |
getMaximumSpan
Determines the maximum span for this view along an axis. |
protected void |
imageSubmit
This method is called to submit a form in response to a click on an image -- an <INPUT> form element of type "image". |
protected void |
submitData
This method is responsible for submitting the form data. |
Methods inherited from class javax.swing.text.ComponentView ![]() |
|---|
getAlignment |
Methods inherited from class javax.swing.text.View ![]() |
|---|
append |
Methods inherited from class java.lang.Object ![]() |
|---|
clone |
| Field Detail |
|---|

@Deprecated public static final String![]()
![]()
SUBMIT

@Deprecated public static final String![]()
![]()
RESET
| Constructor Detail |
|---|

public FormView(Element![]()
![]()
elem)
elem - the element to decorate| Method Detail |
|---|

protected Component![]()
![]()
createComponent()
createComponent

in class ComponentView


public float getMaximumSpan(int axis)
getMaximumSpan

in class ComponentView

axis - may be either View.X_AXIS or View.Y_AXIS
IllegalArgumentException

- for an invalid axisView.getPreferredSpan(int)


public void actionPerformed(ActionEvent![]()
![]()
evt)
actionPerformed

in interface ActionListener

evt - the ActionEvent.

protected void submitData(String![]()
![]()
data)

protected void imageSubmit(String![]()
![]()
imageData)
imageData - the mouse click coordinates.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||