站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JavaTM 2 Platform Standard Edition 6.0 API 规范中文版

序列化表格 (Java Platform SE 6) - JavaTM 2 Platform Standard Edition 6.0 API 规范中文版


JavaTM Platform
Standard Ed. 6

序列化表格


软件包 java.applet

java.applet.Applet 继承 Panel 实现 Serializable

serialVersionUID: -5836846270535785031L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException,
                        HeadlessException
从对象输入流读取 applet。

抛出:
HeadlessException - 如果 GraphicsEnvironment.isHeadless() 返回 true
ClassNotFoundException
IOException
从以下版本开始:
1.4
另请参见:
GraphicsEnvironment.isHeadless()
序列化字段

accessibleContext

AccessibleContext accessibleContext

java.applet.Applet.AccessibleApplet 继承 Panel.AccessibleAWTPanel 实现 Serializable

serialVersionUID: 8127374778187708896L


软件包 java.awt

java.awt.AWTError 继承 Error 实现 Serializable

serialVersionUID: -1819846354050686206L

java.awt.AWTEvent 继承 EventObject 实现 Serializable

serialVersionUID: -1825314779160409405L

序列化字段

bdata

byte[] bdata

id

int id
事件的 id。

 
另请参见:
AWTEvent.getID(), AWTEvent.AWTEvent(java.lang.Object, int)

consumed

boolean consumed
在源处理了事件之后,控制是否将事件发送回同位体,false 表示将事件发送给同位体;true 则不发送。语义事件始终具有 'true' 值,因为它们由响应低级别事件的同位体生成。

 
另请参见:
AWTEvent.consume(), AWTEvent.isConsumed()

java.awt.AWTException 继承 Exception 实现 Serializable

serialVersionUID: -1900414231151323879L

java.awt.AWTKeyStroke 继承 Object 实现 Serializable

serialVersionUID: -6430539691155161871L

序列化方法

readResolve

protected Object readResolve()
                      throws ObjectStreamException
返回 AWTKeyStroke 的一个缓存实例(或 AWTKeyStroke 的子类),它与此实例相等。

抛出:
ObjectStreamException
序列化字段

keyChar

char keyChar

keyCode

int keyCode

modifiers

int modifiers

onKeyRelease

boolean onKeyRelease

java.awt.AWTPermission 继承 BasicPermission 实现 Serializable

serialVersionUID: 8890392402588814465L

java.awt.BorderLayout 继承 Object 实现 Serializable

serialVersionUID: -8658291919501921765L

序列化字段

hgap

int hgap
Constructs a border layout with the horizontal gaps between components. The horizontal gap is specified by hgap.

 
另请参见:
BorderLayout.getHgap(), BorderLayout.setHgap(int)

vgap

int vgap
Constructs a border layout with the vertical gaps between components. The vertical gap is specified by vgap.

 
另请参见:
BorderLayout.getVgap(), BorderLayout.setVgap(int)

north

Component north
Constant to specify components location to be the north portion of the border layout.

 
另请参见:
BorderLayout.getChild(String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), BorderLayout.getLayoutAlignmentX(java.awt.Container), BorderLayout.getLayoutAlignmentY(java.awt.Container), BorderLayout.removeLayoutComponent(java.awt.Component)

west

Component west
Constant to specify components location to be the west portion of the border layout.

 
另请参见:
BorderLayout.getChild(String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), BorderLayout.getLayoutAlignmentX(java.awt.Container), BorderLayout.getLayoutAlignmentY(java.awt.Container), BorderLayout.removeLayoutComponent(java.awt.Component)

east

Component east
Constant to specify components location to be the east portion of the border layout.

 
另请参见:
BorderLayout.getChild(String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), BorderLayout.getLayoutAlignmentX(java.awt.Container), BorderLayout.getLayoutAlignmentY(java.awt.Container), BorderLayout.removeLayoutComponent(java.awt.Component)

south

Component south
Constant to specify components location to be the south portion of the border layout.

 
另请参见:
BorderLayout.getChild(String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), BorderLayout.getLayoutAlignmentX(java.awt.Container), BorderLayout.getLayoutAlignmentY(java.awt.Container), BorderLayout.removeLayoutComponent(java.awt.Component)

center

Component center
Constant to specify components location to be the center portion of the border layout.

 
另请参见:
BorderLayout.getChild(String, boolean), BorderLayout.addLayoutComponent(java.awt.Component, java.lang.Object), BorderLayout.getLayoutAlignmentX(java.awt.Container), BorderLayout.getLayoutAlignmentY(java.awt.Container), BorderLayout.removeLayoutComponent(java.awt.Component)

firstLine

Component firstLine
A relative positioning constant, that can be used instead of north, south, east, west or center. mixing the two types of constants can lead to unpredicable results. If you use both types, the relative constants will take precedence. For example, if you add components using both the NORTH and BEFORE_FIRST_LINE constants in a container whose orientation is LEFT_TO_RIGHT, only the BEFORE_FIRST_LINE will be layed out. This will be the same for lastLine, firstItem, lastItem.

 

lastLine

Component lastLine
A relative positioning constant, that can be used instead of north, south, east, west or center. Please read Description for firstLine.

 

firstItem

Component firstItem
A relative positioning constant, that can be used instead of north, south, east, west or center. Please read Description for firstLine.

 

lastItem

Component lastItem
A relative positioning constant, that can be used instead of north, south, east, west or center. Please read Description for firstLine.

 

java.awt.Button 继承 Component 实现 Serializable

serialVersionUID: -8774683716313001058L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException,
                        HeadlessException
读取 ObjectInputStream,如果它不为 null,则添加一个侦听器,以接收按钮激发的动作事件。未识别的键或值将被忽略。

抛出:
HeadlessException - 如果 GraphicsEnvironment.isHeadless 返回 true
ClassNotFoundException
IOException
另请参见:
Button.removeActionListener(ActionListener), Button.addActionListener(ActionListener), GraphicsEnvironment.isHeadless(), Button.writeObject(ObjectOutputStream)

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
将默认的可序列化字段写入流。写入可序列化 ActionListeners 的一个列表作为可选数据。检测不可序列化的 ActionListeners,不会试图对它们进行序列化。

序列数据:
null 终止的 0 或多对序列:该对由一个 String 和一个 Object 组成;String 指示对象的类型,它是以下类型之一:指示 ActionListener 对象的 actionListenerK
抛出:
IOException
另请参见:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), Component.actionListenerK, Button.readObject(ObjectInputStream)
序列化字段

label

String label
The button's label. This value may be null.

 
另请参见:
Button.getLabel(), Button.setLabel(String)

actionCommand

String actionCommand
The action to be performed once a button has been pressed. This value may be null.

 
另请参见:
Button.getActionCommand(), Button.setActionCommand(String)

buttonSerializedDataVersion

int buttonSerializedDataVersion

java.awt.Button.AccessibleAWTButton 继承 Component.AccessibleAWTComponent 实现 Serializable

serialVersionUID: -5932203980244017102L

java.awt.Canvas 继承 Component 实现 Serializable

serialVersionUID: -2284879212465893870L

java.awt.Canvas.AccessibleAWTCanvas 继承 Component.AccessibleAWTComponent 实现 Serializable

serialVersionUID: -6325592262103146699L

java.awt.CardLayout 继承 Object 实现 Serializable

serialVersionUID: -4328196481005934313L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
从流中读取可序列化的字段。

抛出:
ClassNotFoundException
IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
向流中写入可序列化的字段。

抛出:
IOException
序列化字段

currentCard

int currentCard

hgap

int hgap

tab

Hashtable<K,V> tab
已过时,仅用于向前兼容

vector

Vector<E> vector

vgap

int vgap

java.awt.Checkbox 继承 Component 实现 Serializable

serialVersionUID: 7270714317450821763L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException,
                        HeadlessException
读取 ObjectInputStream,如果它不为 null,则添加一个侦听器,以接收 Checkbox 触发的项事件。忽略未被识别的键或值。

抛出:
HeadlessException - 如果 GraphicsEnvironment.isHeadless 返回 true
ClassNotFoundException
IOException
另请参见:
Checkbox.removeItemListener(ItemListener), Checkbox.addItemListener(ItemListener), GraphicsEnvironment.isHeadless(), Checkbox.writeObject(ObjectOutputStream)

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
将默认可序列化字段写入流中。写入可序列化 ItemListeners 的一个列表作为可选数据。检测不可序列化的 ItemListeners,不要尝试对它们进行序列化。

序列数据:
null 表示终止 0 或多个对的序列;这种对是由 StringObject 组成的;String 指示对象类型,它为以下类型之一:itemListenerK 指示一个 ItemListener 对象
抛出:
IOException
另请参见:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), Component.itemListenerK, Checkbox.readObject(ObjectInputStream)
序列化字段

label

String label
The label of the Checkbox. This field can be null.

 
另请参见:
Checkbox.getLabel(), Checkbox.setLabel(String)

state

boolean state
The state of the Checkbox.

 
另请参见:
Checkbox.getState(), Checkbox.setState(boolean)

group

CheckboxGroup group
The check box group. This field can be null indicating that the checkbox is not a group checkbox.

 
另请参见:
Checkbox.getCheckboxGroup(), Checkbox.setCheckboxGroup(CheckboxGroup)

checkboxSerializedDataVersion

int checkboxSerializedDataVersion

java.awt.Checkbox.AccessibleAWTCheckbox 继承 Component.AccessibleAWTComponent 实现 Serializable

serialVersionUID: 7881579233144754107L

java.awt.CheckboxGroup 继承 Object 实现 Serializable

serialVersionUID: 3729780091441768983L

序列化字段

selectedCheckbox

Checkbox selectedCheckbox
The current choice.

 
另请参见:
CheckboxGroup.getCurrent(), CheckboxGroup.setCurrent(Checkbox)

java.awt.CheckboxMenuItem 继承 MenuItem 实现 Serializable

serialVersionUID: 6190621106981774043L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
抛出:
ClassNotFoundException
IOException

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
将默认的可序列化字段写入流。写入可序列化 ItemListeners 的一个列表作为可选数据。检测不可序列化的 ItemListeners,不要尝试对它们进行序列化。

序列数据:
null 终止的 0 或多对序列;该对由一个 String 和一个 Object 组成;String 指示对象的类型,它是以下类型之一:指示 ItemListener 对象的 itemListenerK
抛出:
IOException
另请参见:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), Component.itemListenerK, CheckboxMenuItem.readObject(ObjectInputStream)
序列化字段

state

boolean state
The state of a checkbox menu item

 
另请参见:
CheckboxMenuItem.getState(), CheckboxMenuItem.setState(boolean)

checkboxMenuItemSerializedDataVersion

int checkboxMenuItemSerializedDataVersion

java.awt.CheckboxMenuItem.AccessibleAWTCheckboxMenuItem 继承 MenuItem.AccessibleAWTMenuItem 实现 Serializable

serialVersionUID: -1122642964303476L

java.awt.Choice 继承 Component 实现 Serializable

serialVersionUID: -4075310674757313071L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException,
                        HeadlessException
读取 ObjectInputStream,如果它不为 null,则添加一个侦听器,以接收 Choice 项触发的项事件。忽略未被识别的键或值。

抛出:
HeadlessException - 如果 GraphicsEnvironment.isHeadless 返回 true
ClassNotFoundException
IOException
另请参见:
Choice.removeItemListener(ItemListener), Choice.addItemListener(ItemListener), GraphicsEnvironment.isHeadless(), Choice.writeObject(ObjectOutputStream)

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
将默认可序列化字段写入流中。写入可序列化 ItemListeners 的一个列表作为可选数据。检测不可序列化的 ItemListeners,不要尝试对它们进行序列化。

序列数据:
null 表示终止 0 或多个对的序列;这种对是由 StringObject 组成的;String 指示对象类型,它为以下类型之一:itemListenerK 指示一个 ItemListener 对象
抛出:
IOException
另请参见:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), Component.itemListenerK, Choice.readObject(ObjectInputStream)
序列化字段

pItems

Vector<E> pItems
The items for the Choice. This can be a null value.

 
另请参见:
Choice.add(String), Choice.addItem(String), Choice.getItem(int), Choice.getItemCount(), Choice.insert(String, int), Choice.remove(String)

selectedIndex

int selectedIndex
The index of the current choice for this Choice or -1 if nothing is selected.

 
另请参见:
Choice.getSelectedItem(), Choice.select(int)

choiceSerializedDataVersion

int choiceSerializedDataVersion

java.awt.Choice.AccessibleAWTChoice 继承 Component.AccessibleAWTComponent 实现 Serializable

serialVersionUID: 7175603582428509322L

java.awt.Color 继承 Object 实现 Serializable

serialVersionUID: 118526816881161077L

序列化字段

value

int value
The color value.

 
另请参见:
Color.getRGB()

frgbvalue

float[] frgbvalue
默认 sRGB ColorSpace 中的颜色值可看作是 float 分量(不带 alpha 值)。如果在构造对象之后颜色值为 null,则此颜色必须是用 8 位精度构造的一种 sRGB 颜色,因此要从 int 颜色值开始计算。

 
另请参见:
Color.getRGBColorComponents(float[]), Color.getRGBComponents(float[])

fvalue

float[] fvalue
本机 sRGB ColorSpace 中的颜色值可看作是 float 分量(不带 alpha 值)。如果在构造对象之后颜色值为 null,则此颜色必须是用 8 位精度构造的一种 sRGB 颜色,因此要从 int 颜色值开始计算。

 
另请参见:
Color.getRGBColorComponents(float[]), Color.getRGBComponents(float[])

falpha

float falpha
alpha 值可看作是一个 float 分量。如果 frgbvaluenull,那么这是一个无效数据,因此要从 int 颜色值开始计算。

 
另请参见:
Color.getRGBComponents(float[]), Color.getComponents(float[])

cs

ColorSpace cs
ColorSpace。如果 ColorSpace 为 null,那么其默认值为 sRGB。

 
另请参见:
Color.getColor(java.lang.String), Color.getColorSpace(), Color.getColorComponents(float[])

java.awt.Component 继承 Object 实现 Serializable

serialVersionUID: -7644114512714619750L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
读取 ObjectInputStream 并且如果它不为 null,则添加一个侦听器,以便接收由组件所激发的各种事件。忽略未识别的键或值。

抛出:
ClassNotFoundException
IOException
另请参见:
Component.writeObject(ObjectOutputStream)

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
将默认的可序列化字段写入流中。将各种可序列化侦听器作为可选数据写入。检测不可序列化的侦听器并且不尝试对其进行序列化。

序列数据:
null 终止的 0 或多对序列;该对由一个 String 和一个 Object 组成;String 表示对象的类型并为下列类型之一(1.4 中):componentListenerK 表示 ComponentListener 对象;focusListenerK 表示 FocusListener 对象;keyListenerK 表示 KeyListener 对象;mouseListenerK 表示 MouseListener 对象;mouseMotionListenerK 表示 MouseMotionListener 对象;InputMethodListener 表示 InputMethodListener 对象;hierarchyListenerK 表示 HierarchyListener 对象;hierarchyBoundsListenerK 表示 HierarchyBoundsListener 对象;mouseWheelListenerK 表示 MouseWheelListener 对象, 一个可选的 ComponentOrientation(在 1.2 中位于 inputMethodListener 之后)
抛出:
IOException
另请参见:
AWTEventMulticaster.save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener), Component.componentListenerK, Component.focusListenerK, Component.keyListenerK, Component.mouseListenerK, Component.mouseMotionListenerK, Component.inputMethodListenerK, Component.hierarchyListenerK, Component.hierarchyBoundsListenerK, Component.mouseWheelListenerK, Component.readObject(ObjectInputStream)
序列化字段

x

int x
The x position of the component in the parent's coordinate system.

 
另请参见:
Component.getLocation()

y

int y
The y position of the component in the parent's coordinate system.

 
另请参见:
Component.getLocation()

width

int width
The width of the component.

 
另请参见:
Component.getSize()

height

int height
The height of the component.

 
另请参见:
Component.getSize()

foreground

Color foreground
The foreground color for this component. foreground can be null.

 
另请参见:
Component.getForeground(), Component.setForeground(java.awt.Color)

background

Color background
The background color for this component. background can be null.

 
另请参见:
Component.getBackground(), Component.setBackground(java.awt.Color)

font

Font font
The font used by this component. The font can be null.

 
另请参见:
Component.getFont(), Component.setFont(java.awt.Font)

peerFont

Font peerFont
The font which the peer is currently using. (null if no peer exists.)


cursor

Cursor cursor
The cursor displayed when pointer is over this component. This value can be null.

 
另请参见:
Component.getCursor(), Component.setCursor(java.awt.Cursor)

locale

Locale locale
The locale for the component.

 
另请参见:
Component.getLocale(), Component.setLocale(java.util.Locale)

ignoreRepaint

boolean ignoreRepaint
True when the object should ignore all repaint events.

 
从以下版本开始:
1.4
另请参见:
Component.setIgnoreRepaint(boolean), Component.getIgnoreRepaint()

visible

boolean visible
True when the object is visible. An object that is not visible is not drawn on the screen.

 
另请参见:
Component.isVisible(), Component.setVisible(boolean)

enabled

boolean enabled
True when the object is enabled. An object that is not enabled does not interact with the user.

 
另请参见:
Component.isEnabled(), Component.setEnabled(boolean)

valid

boolean valid
True when the object is valid. An invalid object needs to be layed out. This flag is set to false when the object size is changed.

 
另请参见:
Component.isValid(), Component.validate(), Component.invalidate()

dropTarget

DropTarget dropTarget
The DropTarget associated with this component.

 
从以下版本开始:
1.2
另请参见:
Component.setDropTarget(java.awt.dnd.DropTarget), Component.getDropTarget()

popups

Vector<E> popups
 
另请参见:
Component.add(java.awt.PopupMenu)

name

String name
组件名称。该字段可以为 null

 
另请参见:
Component.getName(), Component.setName(String)

nameExplicitlySet

boolean nameExplicitlySet
确定是否已显示地设置了名称的布尔值。如果尚未设置名称,则 nameExplicitlySet 为 false;否则为 true。

 
另请参见:
Component.getName(), Component.setName(String)

focusable

boolean focusable
表示此 Component 是否可以获得焦点。

 
从以下版本开始:
1.4
另请参见:
Component.setFocusable(boolean), Component.isFocusable()

isFocusTraversableOverridden

int isFocusTraversableOverridden
跟踪此 Component 是否依赖于默认的焦点可遍历性。

 
从以下版本开始:
1.4

focusTraversalKeys

Set<E>[] focusTraversalKeys
The focus traversal keys. These keys will generate focus traversal behavior for Components for which focus traversal keys are enabled. If a value of null is specified for a traversal key, this Component inherits that traversal key from its parent. If all ancestors of this Component have null specified for that traversal key, then the current KeyboardFocusManager's default traversal key is used.

 
从以下版本开始:
1.4
另请参见:
Component.setFocusTraversalKeys(int, java.util.Set), Component.getFocusTraversalKeys(int)

focusTraversalKeysEnabled

boolean focusTraversalKeysEnabled
表示是否为此 Component 启用了焦点遍历键。其焦点遍历键已禁用的 Component 接收这些焦点遍历键的按键事件。其焦点遍历键已启用的 Component 不会看到这些事件;相反,会将该事件自动转换为遍历操作。

 
从以下版本开始:
1.4
另请参见:
Component.setFocusTraversalKeysEnabled(boolean), Component.getFocusTraversalKeysEnabled()

minSize

Dimension minSize
Minimum size. (This field perhaps should have been transient).

 

minSizeSet

boolean minSizeSet
Whether or not setMinimumSize has been invoked with a non-null value.


prefSize

Dimension prefSize
Preferred size. (This field perhaps should have been transient).

 

prefSizeSet

boolean prefSizeSet
Whether or not setPreferredSize has been invoked with a non-null value.


maxSize

Dimension maxSize
Maximum size

 

maxSizeSet

boolean maxSizeSet
Whether or not setMaximumSize has been invoked with a non-null value.


newEventsOnly

boolean newEventsOnly
newEventsOnly will be true if the event is one of the event types enabled for the component. It will then allow for normal processing to continue. If it is false the event is passed to the component's parent and up the ancestor tree until the event has been consumed.

 
另请参见:
Component.dispatchEvent(java.awt.AWTEvent)

eventMask

long eventMask
The eventMask is ONLY set by subclasses via enableEvents. The mask should NOT be set when listeners are registered so that we can distinguish the difference between when listeners request events and subclasses request them. One bit is used to indicate whether input methods are enabled; this bit is set by enableInputMethods and is on by default.

 
另请参见:
Component.enableInputMethods(boolean), AWTEvent

changeSupport

PropertyChangeSupport changeSupport
如果已注册了任意 PropertyChangeListener,则 changeSupport 字段负责描述它们。

 
从以下版本开始:
1.2
另请参见:
Component.addPropertyChangeListener(java.beans.PropertyChangeListener), Component.removePropertyChangeListener(java.beans.PropertyChangeListener), Component.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

isPacked

boolean isPacked

boundsOp

int boundsOp
直接用于几何学 API(setLocation、setBounds、setSize)的伪参数,通知 setBounds 发生了什么改变。应该在 TreeLock 下使用。需要它的唯一原因是无法改变公共和否决方法的交叉调用顺序。


componentSerializedDataVersion

int componentSerializedDataVersion
序列化的 Component 数据版本。

 

accessibleContext

AccessibleContext accessibleContext

java.awt.Component.AccessibleAWTComponent 继承 AccessibleContext 实现 Serializable

serialVersionUID: 642321655757800191L

序列化字段

accessibleAWTComponentHandler

ComponentListener accessibleAWTComponentHandler

accessibleAWTFocusHandler

FocusListener accessibleAWTFocusHandler

java.awt.ComponentOrientation 继承 Object 实现 Serializable

serialVersionUID: -4113291392143563828L

序列化字段

orientation

int orientation

java.awt.Container 继承 Component 实现 Serializable

serialVersionUID: 4613797578919906343L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
反序列化来自指定 ObjectInputStreamContainer
  • 从流中读取默认可序列化字段。
  • 读取可序列化 ContainerListener(s) 的一个列表作为可选数据。如果列表为 null,则不安装任何 Listener。
  • 读取此 Container 的 FocusTraversalPolicy 作为可选数据,它可以为 null。

抛出:
ClassNotFoundException
IOException
另请参见:
Container.addContainerListener(java.awt.event.ContainerListener), Container.writeObject(ObjectOutputStream)

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
将此 Container 序列化到指定的 ObjectOutputStream 中。
  • 将默认可序列化字段写入流中。
  • 写入可序列化 ContainerListener(s) 的一个列表作为可选数据。检测不可序列化的 ContainerListner(s),不要试图对它们进行序列化。
  • 当且仅当此 Container 的 FocusTraversalPolicy 是可序列化的时候,才写入它;否则写入 null

序列数据:
null 表示终止 0 或多个对的序列;这种对是由 StringObject 组成的;String 指示了对象类型,它为以下类型之一:指示 ContainerListener 对象的 containerListenerKContainerFocusTraversalPolicynull
抛出:
IOException
另请参见:
AWTEventMulticaster.save(java.io.ObjectOutputStream, java.lang.String, java.util.EventListener), Component.containerListenerK, Container.readObject(ObjectInputStream)
序列化字段

component

Component[] component
容器中的组件。

containerSerializedDataVersion

int containerSerializedDataVersion
Container Serial Data Version。

dispatcher

java.awt.LightweightDispatcher dispatcher
轻量级组件的事件路由器。如果容器是本机的,则此调度程序会小心转发这些事件,将它们的目标重新指向所包含的轻量级组件(如果有)。

focusCycleRoot

boolean focusCycleRoot
指示此 Component 是否是某个焦点遍历循环的根。一旦焦点进入某个遍历循环,它通常无法通过焦点遍历离开,除非按下向上键或向下键之一。普通遍历被限定于此 Container,该 Container 的所有子代并不是下级焦点循环根的子代。

focusTraversalPolicyProvider

boolean focusTraversalPolicyProvider
存储 focusTraversalPolicyProvider 属性的值。

layoutMgr

LayoutManager layoutMgr
此容器的布局管理器。

maxSize

Dimension maxSize
此 Container 的最大大小。

ncomponents

int ncomponents
容器中组件的数量。该值可以为 null。

java.awt.Container.AccessibleAWTContainer 继承 Component.AccessibleAWTComponent 实现 Serializable

serialVersionUID: 5081320404842566097L

序列化字段

accessibleContainerHandler

ContainerListener accessibleContainerHandler

java.awt.ContainerOrderFocusTraversalPolicy 继承 FocusTraversalPolicy 实现 Serializable

serialVersionUID: 486933713763926351L

序列化字段

implicitDownCycleTraversal

boolean implicitDownCycleTraversal

java.awt.Cursor 继承 Object 实现 Serializable

serialVersionUID: 8028237497568985504L

序列化字段

type

int type
The chosen cursor type initially set to the DEFAULT_CURSOR.

 
另请参见:
Cursor.getType()

name

String name
光标的用户可视名称。

 
另请参见:
Cursor.getName()

java.awt.DefaultFocusTraversalPolicy 继承 ContainerOrderFocusTraversalPolicy 实现 Serializable

serialVersionUID: 8876966522510157497L

java.awt.Dialog 继承 Window 实现 Serializable

serialVersionUID: 5920926903803293709L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException,
                        HeadlessException
抛出:
ClassNotFoundException
IOException
HeadlessException
序列化字段

resizable

boolean resizable
A dialog's resizable property. Will be true if the Dialog is to be resizable, otherwise it will be false.

 
另请参见:
Dialog.setResizable(boolean)

undecorated

boolean undecorated
This field indicates whether the dialog is undecorated. This property can only be changed while the dialog is not displayable. undecorated will be true if the dialog is undecorated, otherwise it will be false.

 
从以下版本开始:
1.4
另请参见:
Dialog.setUndecorated(boolean), Dialog.isUndecorated(), Component.isDisplayable()

modal

boolean modal
True if this dialog is modal, false is the dialog is modeless. A modal dialog blocks user input to some application top-level windows. This field is kept only for backwards compatibility. Use the ModalityType enum instead.

 
另请参见:
Dialog.isModal(), Dialog.setModal(boolean), Dialog.getModalityType(), Dialog.setModalityType(java.awt.Dialog.ModalityType), Dialog.ModalityType, Dialog.ModalityType.MODELESS, Dialog.DEFAULT_MODALITY_TYPE

modalityType

Dialog.ModalityType modalityType
Modality type of this dialog. If the dialog's modality type is not ModalityType.MODELESS, it blocks all user input to some application top-level windows.

 
从以下版本开始:
1.6
另请参见:
Dialog.ModalityType, Dialog.getModalityType(), Dialog.setModalityType(java.awt.Dialog.ModalityType)

title

String title
Specifies the title of the Dialog. This field can be null.

 
另请参见:
Dialog.getTitle(), Dialog.setTitle(String)

java.awt.Dialog.AccessibleAWTDialog 继承 Window.AccessibleAWTWindow 实现 Serializable

serialVersionUID: 4837230331833941201L

java.awt.Dimension 继承 Dimension2D 实现 Serializable

serialVersionUID: 4723952579491349524L

序列化字段

width

int width
dimension 的宽度,可以使用负值。

 
从以下版本开始:
1.0
另请参见:
Dimension.getSize(), Dimension.setSize(double, double)

height

int height
dimension 的高度,可以使用负值。

 
从以下版本开始:
1.0
另请参见:
Dimension.getSize(), Dimension.setSize(double, double)

java.awt.Event 继承 Object 实现 Serializable

serialVersionUID: 5488922509400504703L

序列化字段

target

Object target
目标组件。这指示事件针对该组件发生,或事件与该组件关联。此对象已经由 AWTEvent.getSource() 取代。

 
另请参见:
EventObject.getSource()

when

long when
时间戳。由 InputEvent.getWhen() 取代。

 
另请参见:
InputEvent.getWhen()

id

int id
指示事件是什么类型的事件,其他哪个 Event 变量与该事件有关。它已经由 AWTEvent.getID() 取代。

 
另请参见:
AWTEvent.getID()

x

int x
事件的 x 坐标。由 MouseEvent.getX() 取代。

 
另请参见:
MouseEvent.getX()

y

int y
事件的 y 坐标。由 MouseEvent.getY() 取代。

 
另请参见:
MouseEvent.getY()

key

int key
在键盘事件中被按下的键的键代码。这已经由 KeyEvent.getKeyCode() 取代。

 
另请参见:
KeyEvent.getKeyCode()

modifiers

int modifiers
修饰符键的状态。这已经由 InputEvent.getModifiers() 取代。在 java 1.1 中,MouseEvent 和 KeyEvent 是 InputEvent 的子类。

 
另请参见:
InputEvent.getModifiers()

clickCount

int clickCount
对于 MOUSE_DOWN 事件来说,此字段指示连续点击的次数。对于其他事件,其值为 0。此字段由 MouseEvent.getClickCount() 取代。

 
另请参见:
MouseEvent.getClickCount().

arg

Object arg
事件的任意参数。此字段的值取决于事件的类型。arg 已经由事件指定的属性取代。

 

evt

Event evt
下一事件。将事件放入到链接列表时设置此字段。这已经由 EventQueue 取代。

 
另请参见:
EventQueue

consumed

boolean consumed
此字段控制当目标处理完事件时,该事件是否发送回同位体——如果为 false,则发送回同位体,如果为 true,则不发送。

 
另请参见:
Event.isConsumed()

java.awt.FileDialog 继承 Dialog 实现 Serializable

serialVersionUID: 5035145889651310422L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
读取 ObjectInputStream,并执行向后兼容检查,将 dir 或等于空字符串的 file 转换为 null

抛出:
ClassNotFoundException
IOException
序列化字段

mode

int mode

dir

String dir

file

String file

filter

FilenameFilter filter

java.awt.FlowLayout 继承 Object 实现 Serializable

serialVersionUID: -7262534875583282631L

序列化方法

readObject

private void readObject(ObjectInputStream stream)
                 throws IOException,
                        ClassNotFoundException
从序列化流读取此对象,处理由类的较旧版本写入的对象,该版本不包含我们现在使用的所有字段。

抛出:
IOException
ClassNotFoundException
序列化字段

align

int align
align is the property that determines how each row distributes empty space. It can be one of the following values:
    LEFT RIGHT CENTER LEADING TRAILING

 
另请参见:
FlowLayout.getAlignment(), FlowLayout.setAlignment(int)

newAlign

int newAlign
newAlign is the property that determines how each row distributes empty space for the Java 2 platform, v1.2 and greater. It can be one of the following three values:
    LEFT RIGHT CENTER LEADING TRAILING

 
从以下版本开始:
1.2
另请参见:
FlowLayout.getAlignment(), FlowLayout.setAlignment(int)

hgap

int hgap
The flow layout manager allows a seperation of components with gaps. The horizontal gap will specify the space between components and between the components and the borders of the Container.

 
另请参见:
FlowLayout.getHgap(), FlowLayout.setHgap(int)

vgap

int vgap
The flow layout manager allows a seperation of components with gaps. The vertical gap will specify the space between rows and between the the rows and the borders of the Container.

 
另请参见:
FlowLayout.getHgap(), FlowLayout.setHgap(int)

alignOnBaseline

boolean alignOnBaseline
如果组件将沿着其基线对齐,则返回 true。


serialVersionOnStream

int serialVersionOnStream
表示正被使用的 currentSerialVersion。它将是以下两个值之一:0,Java 2 平台 v1.2 之前的版本1,Java 2 平台 v1.2 之后的版本

 
从以下版本开始:
1.2

java.awt.Font 继承 Object 实现 Serializable

serialVersionUID: -4206021311591459213L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException
读取 ObjectInputStream。未识别的密钥或值将被忽略。

抛出:
ClassNotFoundException
IOException
另请参见:
Font.writeObject(java.io.ObjectOutputStream)

writeObject

private void writeObject(ObjectOutputStream s)
                  throws ClassNotFoundException,
                         IOException
将默认的可序列化字段写入流中。

抛出:
ClassNotFoundException
IOException
另请参见:
AWTEventMulticaster.save(ObjectOutputStream, String, EventListener), Font.readObject(java.io.ObjectInputStream)
序列化字段

fRequestedAttributes

Hashtable<K,V> fRequestedAttributes
此方法现在只在序列化期间使用。它通常为 null。

 
另请参见:
Font.getAttributes()

name

String name
Font 的逻辑名称,它被传递到构造方法中。

 
从以下版本开始:
JDK1.0
另请参见:
Font.getName()

style

int style
Font 的样式,它被传递到构造方法中。此样式可以为 PLAIN、BOLD、ITALIC 或 BOLD+ITALIC。

 
从以下版本开始:
JDK1.0
另请参见:
Font.getStyle()

size

int size
Font 的磅值大小,舍入为整数。

 
从以下版本开始:
JDK1.0
另请参见:
Font.getSize()

pointSize

float pointSize
float 形式表示的 Font 的磅值大小。

 
另请参见:
Font.getSize(), Font.getSize2D()

fontSerializedDataVersion

int fontSerializedDataVersion
Font 的可序列化数据形式。

 

java.awt.FontFormatException 继承 Exception 实现 Serializable

serialVersionUID: -4481290147811361272L

java.awt.FontMetrics 继承 Object 实现 Serializable

serialVersionUID: 1681126225205050147L

序列化字段

font

Font font
实际的 Font,字体规格是由此创建的。它不能为 null。

 
另请参见:
FontMetrics.getFont()

java.awt.Frame 继承 Window 实现 Serializable

serialVersionUID: 2673458971256075116L

序列化方法

readObject

private void readObject(ObjectInputStream s)
                 throws ClassNotFoundException,
                        IOException,
                        HeadlessException
读取 ObjectInputStream。尝试读取一个 Image 图标,它是从 1.4 版本开始可用的可选数据。如果有一个 Image 图标不可用,但是已经检测了除 EOF 之外的所有数据,则抛出 OptionalDataException。未识别的键或值将被忽略。

抛出:
OptionalDataException - 如果某个 Image 图标不可用,但是已经检测了除 EOF 之外的所有数据
HeadlessException - 如果 GraphicsEnvironment.isHeadless 返回 true
ClassNotFoundException
IOException
另请参见:
GraphicsEnvironment.isHeadless(), Image, Frame.getIconImage(), Frame.setIconImage(Image), Frame.writeObject(ObjectOutputStream)

writeObject

private void writeObject(ObjectOutputStream s)
                  throws IOException
将默认的可序列化字段写入流中。写入可选的序列化 Image 图标,从 1.4 版本开始,该图标是可用的。

序列数据:
可选的 Image 图标
抛出:
IOException
另请参见:
Image, Frame.getIconImage(), Frame.setIconImage(Image), Frame.readObject(ObjectInputStream)
序列化字段

maximizedBounds

Rectangle maximizedBounds
Maximized bounds for this frame.

 
从以下版本开始:
1.4
另请参见:
Frame.setMaximizedBounds(Rectangle), Frame.getMaximizedBounds()

title

String title
This is the title of the frame. It can be changed at any time. title can be null and if this is the case the title = "".

 
另请参见:
Frame.getTitle(), Frame.setTitle(String)

menuBar

MenuBar menuBar
The frames menubar. If menuBar = null the frame will not have a menubar.

 
另请参见:
Frame.getMenuBar(), Frame.setMenuBar(MenuBar)

resizable

boolean resizable
This field indicates whether the frame is resizable. This property can be changed at any time. resizable will be true if the frame is resizable, otherwise it will be false.

 
另请参见:
Frame.isResizable()

undecorated

boolean undecorated
This field indicates whether the frame is undecorated. This property can only be changed while the frame is not displayable. undecorated will be true if the frame is undecorated, otherwise it will be false.

 
从以下版本开始:
1.4
另请参见:
Frame.setUndecorated(boolean), Frame.isUndecorated(), Component.isDisplayable()

mbManagement

boolean mbManagement
mbManagement is only used by the Motif implementation.

 

state

int state

ownedWindows

Vector<E> ownedWindows

frameSerializedDataVersion

int frameSerializedDataVersion
Frame 的序列化数据版本。

 

java.awt.Frame.AccessibleAWTFrame 继承 Window.AccessibleAWTWindow 实现 Serializable

serialVersionUID: -6172960752956030250L

java.awt.GraphicsConfigTemplate 继承 Object 实现 Serializable

serialVersionUID: -8061369279557787079L

java.awt.GridBagConstraints 继承 Object 实现 Serializable

serialVersionUID: -1000070633030801713L

序列化字段

gridx

int gridx
指定包含组件的显示区域开始边的单元格,其中行的第一个单元格为 gridx=0。组件显示区域的开始边指的是水平的、从左到右的容器的左边缘,以及水平的、从右到左的容器的右边缘。值 RELATIVE 指定将组件放置在添加此组件之前刚刚添加到容器中的组件的后面。

默认值为 RELATIVEgridx 应为非负值。

 
另请参见:
GridBagConstraints.clone(), GridBagConstraints.gridy, ComponentOrientation

gridy

int gridy
指定位于组件显示区域的顶部的单元格,其中最上边的单元格为 gridy=0。值 RELATIVE 指定将组件放置在添加此组件之前刚刚添加到容器中的组件的下面。

默认值为 RELATIVEgridy 应为非负值。

 
另请参见:
GridBagConstraints.clone(), GridBagConstraints.gridx

gridwidth

int gridwidth
指定组件显示区域的某一行中的单元格数。

使用 REMAINDER 指定组件的显示区域,该区域的范围是从 gridx 到该行的最后一个单元格。使用 RELATIVE 指定组件的显示区域,该区域的范围是从 gridx 到它所在行的倒数第二个单元格。

gridwidth 应为非负,默认值为 1。

 
另请参见:
GridBagConstraints.clone(), GridBagConstraints.gridheight

gridheight

int gridheight
指定在组件显示区域的一列中的单元格数。

使用 REMAINDER 指定组件的显示区域,该区域的范围是从 gridy 到该列的最后一个单元格。使用 RELATIVE 指定组件的显示区域,该区域的范围是从 gridy 到它所在列的倒数第二个单元格。

gridheight 应为非负,默认值为 1。

 
另请参见:
GridBagConstraints.clone(), GridBagConstraints.gridwidth

weightx

double weightx
指定如何分布额外的水平空间。

网格包布局管理器计算出列的权重将是列的所有组件中最大的 weightx。如果得到的布局在水平方向上比需要填充的区域小,那么系统会将额外的空间按照其权重比例分布到每一列。权重为零的列不会得到额外的空间。

如果所有的权重都为零,则所有的额外空间都将出现在单元格的网格之间和左右边缘之间。

此字段的默认值为 0weightx 应为非负值。

 
另请参见:
GridBagConstraints.clone(), GridBagConstraints.weighty

weighty

double weighty
指定如何分布额外的垂直空间。

网格包布局管理器计算出行的权重将是行的所有组件中最大的 weighty。如果得到的布局在垂直方向上比需要填充的区域小,则系统会将额外的空间按照其权重比例分布到每一行。权重为零的行不会得到额外的空间。

如果所有的权重都为零,则所有的额外空间都将出现在单元格的网格之间和上下边缘之间。

此字段的默认值为 0weighty 应为非负值。

 
另请参见:
GridBagConstraints.clone(), GridBagConstraints.weightx

anchor

int anchor
当组件小于其显示区域时使用此字段。它可以确定在显示区域中放置组件的位置。

可能的值有三种:相对于方向的值、相对于基线的值和绝对值。相对于方向的值是相对于容器的组件方向属性进行解释的,相对于基线值是相对于基线进行解释的,绝对值则不然。绝对值有:CENTERNORTHNORTHEASTEASTSOUTHEASTSOUTHSOUTHWESTWESTNORTHWEST。方向相对值有:PAGE_STARTPAGE_ENDLINE_STARTLINE_ENDFIRST_LINE_STARTFIRST_LINE_ENDLAST_LINE_STARTLAST_LINE_END。相对于基线的值有:BASELINEBASELINE_LEADINGBASELINE_TRAILINGABOVE_BASELINEABOVE_BASELINE_LEADINGABOVE_BASELINE_TRAILINGBELOW_BASELINEBELOW_BASELINE_LEADINGBELOW_BASELINE_TRAILING。默认值为 CENTER

 
另请参见:
GridBagConstraints.clone(), ComponentOrientation

fill

int fill
当组件的显示区域大于它所请求的显示区域的大小时使用此字段。它可以确定是否调整组件大小,以及在需要的时候如何进行调整。

以下值适用于 fill

  • NONE:不调整组件大小。
  • HORIZONTAL:加宽组件,使它在水平方向上填满其显示区域,但是不改变高度。
  • VERTICAL:加高组件,使它在垂直方向上填满其显示区域,但是不改变宽度。
  • BOTH:使组件完全填满其显示区域。

默认值为 NONE

 
另请参见:
GridBagConstraints.clone()

insets

Insets insets
此字段指定组件的外部填充,即组件与其显示区域边缘之间间距的最小量。

默认值为 new Insets(0, 0, 0, 0)

 
另请参见:
GridBagConstraints.clone()

ipadx

int ipadx
此字段指定组件的内部填充,即给组件的最小宽度添加多大的空间。组件的宽度至少为其最小宽度加上 ipadx 像素。

默认值为 0

 
另请参见:
GridBagConstraints.clone(), GridBagConstraints.ipady

ipady

int ipady
此字段指定内部填充,即给组件的最小高度添加多大的空间。组件的高度至少为其最小高度加上 ipady 像素。

默认值为 0。

 
另请参见:
GridBagConstraints.clone(), GridBagConstraints.ipadx

tempX

int tempX
Temporary place holder for the x coordinate.

 

tempY

int tempY
Temporary place holder for the y coordinate.

 

tempWidth

int tempWidth
Temporary place holder for the Width of the component.

 

tempHeight

int tempHeight
Temporary place holder for the Height of the component.

 

minWidth

int minWidth
The minimum width of the component. It is used to calculate ipady, where the default will be 0.

 
另请参见:
GridBagConstraints.ipady

minHeight

int minHeight
The minimum height of the component. It is used to calculate ipadx, where the default will be 0.

 
另请参见:
GridBagConstraints.ipadx

java.awt.GridBagLayout 继承 Object 实现 Serializable

serialVersionUID: 8838754796412211005L

序列化字段

comptable

Hashtable<K,V> comptable
此哈希表维持组件与其网格包约束之间的关联。comptable 中的键是组件,值是 GridBagConstraints 的实例。

 
另请参见:
GridBagConstraints

defaultConstraints

GridBagConstraints defaultConstraints
此字段保持包含默认值的网格包约束实例,因此如果某个组件没有与其相关联的网格包约束,则会分配给该组件一个 defaultConstraints 的副本。

 
另请参见:
GridBagLayout.getConstraints(Component), GridBagLayout.setConstraints(Component, GridBagConstraints), GridBagLayout.lookupConstraints(Component)

layoutInfo

GridBagLayoutInfo layoutInfo
此字段保持网格包的布局信息。此字段中的信息基于最近验证的网格包。如果 layoutInfonull,这指示网格包中不存在组件,或者即使存在,也是尚未经过验证的组件。

 
另请参见:
GridBagLayout.getLayoutInfo(Container, int)

columnWidths

int[] columnWidths
此字段保持对列最小宽度的重写。如果此字段为非 null,则在计算全部最小列宽度之后将这些值应用到网格包。如果 columnWidths 的元素数多于列数,则在网格包中添加列以匹配 columnWidth 中的元素数。

 
另请参见:
GridBagLayout.getLayoutDimensions()

rowHeights

int[] rowHeights
此字段保持对行最小高度的重写。如果此字段为非 null,则在计算全部最小行高度之后将这些值应用到网格包。如果 rowHeights 的元素数多于行数,则在网格包中添加行以匹配 rowHeights 中的元素数。

 
另请参见:
GridBagLayout.getLayoutDimensions()

columnWeights

double[] columnWeights
此字段保持对列权重的重写。如果此字段为非