public class FormView extends ComponentView implements ActionListener
HTMLDocument.HTMLReader.FormAction
设置的HTMLDocument.HTMLReader.FormAction
。
如果在文档上映射了多个视图,它们将共享嵌入式组件模型。
下表显示了此视图构建的组件。
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 JTextFieldModifier and Type | Class and Description |
---|---|
protected class |
FormView.MouseEventListener
当类型等于图像的输入点击时,MouseEventListener类可以处理表单提交。
|
Modifier and Type | Field and Description |
---|---|
static String |
RESET
已弃用
从1.3开始,值来自UIManager UIManager属性FormView.resetButtonText
|
static String |
SUBMIT
已弃用
从1.3起,现在的值来自UIManager属性FormView.submitButtonText
|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent evt)
负责处理ActionEvent。
|
protected Component |
createComponent()
创建组件。
|
float |
getMaximumSpan(int axis)
确定沿着轴的该视图的最大跨度。
|
protected void |
imageSubmit(String imageData)
调用此方法以响应点击图像 - “image”类型的<INPUT>表单元素提交表单。
|
protected void |
submitData(String data)
此方法负责提交表单数据。
|
getAlignment, getComponent, getMinimumSpan, getPreferredSpan, modelToView, paint, setParent, viewToModel
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, removeUpdate, replace, setSize, updateChildren, updateLayout, viewToModel
@Deprecated public static final String SUBMIT
@Deprecated public static final String RESET
public FormView(Element elem)
elem
- 要装饰的元素
protected Component createComponent()
public float getMaximumSpan(int axis)
getMaximumSpan
在
ComponentView
类
axis
- 可以是View.X_AXIS或View.Y_AXIS
IllegalArgumentException
- 对于无效轴
View.getPreferredSpan(int)
public void actionPerformed(ActionEvent evt)
actionPerformed
在界面
ActionListener
evt
- ActionEvent。
protected void submitData(String data)
protected void imageSubmit(String imageData)
imageData
- 鼠标点击坐标。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.