public class FormView extends ComponentView implements ActionListener
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 | JTextField |
| Modifier and Type | Class and Description |
|---|---|
protected class |
FormView.MouseEventListener
mouseeventlistener类来处理表单提交时型等于图像的输入被点击。
|
| Modifier and Type | Field and Description |
|---|---|
static String |
RESET
过时的。
作为1.3的价值来自于formview.resetbuttontext”属性”
|
static String |
SUBMIT
过时的。
为1.3,现在的价值来自formview.submitbuttontext”属性
|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISBOTTOM, 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)
此方法被调用以响应于单击“图像”的形式提交一个“类型”“图像”的“输入”窗体元素“”。
|
protected void |
submitData(String data)
此方法负责提交表单数据。
|
getAlignment, getComponent, getMinimumSpan, getPreferredSpan, modelToView, paint, setParent, viewToModelappend, 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()
createComponent 方法重写,继承类
ComponentView
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.