hierarchyevent.html

来自「API資料大全」· HTML 代码 · 共 606 行 · 第 1/2 页

HTML
606
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:33:25 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  HierarchyEvent</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HierarchyEvent.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../java/awt/event/HierarchyBoundsAdapter.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../java/awt/event/InputEvent.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="HierarchyEvent.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.event</FONT><BR>Class  HierarchyEvent</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A>  |  +--<A HREF="../../../java/util/EventObject.html">java.util.EventObject</A>        |        +--<A HREF="../../../java/awt/AWTEvent.html">java.awt.AWTEvent</A>              |              +--<B>java.awt.event.HierarchyEvent</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/io/Serializable.html">Serializable</A></DD></DL><HR><DL><DT>public class <B>HierarchyEvent</B><DT>extends <A HREF="../../../java/awt/AWTEvent.html">AWTEvent</A></DL><P>An event which indicates a change to the Component hierarchy to which a Component belongs. <ul> <li>Hierarchy Change Events (HierarchyListener)     <ul>     <li> addition of an ancestor     <li> removal of an ancestor     <li> hierarchy made displayable     <li> hierarchy made undisplayable     <li> hierarchy shown on the screen (both visible and displayable)     <li> hierarchy hidden on the screen (either invisible or undisplayable)     </ul> <li>Ancestor Reshape Events (HierarchyBoundsListener)     <ul>     <li> an ancestor was resized     <li> an ancestor was moved     </ul> </ul> <p> Hierarchy events are provided for notification purposes ONLY; The AWT will automatically handle changes to the hierarchy internally so that GUI layout and displayability works properly regardless of whether a program is receiving these events or not. <p> This event is generated by a Container object (such as a Panel) when the Container is added, removed, moved, or resized, and passed down the hierarchy. It is also generated by a Component object when that object's <code>addNotify</code>, <code>removeNotify</code>, <code>show</code>, or <code>hide</code> method is called. ANCESTOR_MOVED and ANCESTOR_RESIZED events are dispatched to every <code>HierarchyBoundsListener</code> or <code>HierarchyBoundsAdapter</code> object which registered to receive such events using the Component's <code>addHierarchyBoundsListener</code> method. (<code>HierarchyBoundsAdapter</code> objects implement the <code> HierarchyBoundsListener</code> interface.) HIERARCHY_CHANGED events are dispatched to every <code>HierarchyListener</code> object which registered to receive such events using the Component's <code>addHierarchyListener </code> method. Each such listener object gets this <code>HierarchyEvent </code> when the event occurs.<P><DL><DT><B>Since: </B><DD>1.3</DD><DT><B>See Also: </B><DD><A HREF="../../../java/awt/event/HierarchyListener.html"><CODE>HierarchyListener</CODE></A>, <A HREF="../../../java/awt/event/HierarchyBoundsAdapter.html"><CODE>HierarchyBoundsAdapter</CODE></A>, <A HREF="../../../java/awt/event/HierarchyBoundsListener.html"><CODE>HierarchyBoundsListener</CODE></A>, <A HREF="../../../serialized-form.html#java.awt.event.HierarchyEvent">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#ANCESTOR_MOVED">ANCESTOR_MOVED</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An ancestor-Container was moved.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#ANCESTOR_RESIZED">ANCESTOR_RESIZED</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;An ancestor-Container was resized.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#DISPLAYABILITY_CHANGED">DISPLAYABILITY_CHANGED</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The displayability of the hierarchy changed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#HIERARCHY_CHANGED">HIERARCHY_CHANGED</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A modification was made to the entire hierarchy tree.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#HIERARCHY_FIRST">HIERARCHY_FIRST</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Marks the first integer id for the range of hierarchy event ids.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#HIERARCHY_LAST">HIERARCHY_LAST</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Marks the last integer id for the range of ancestor event ids.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#PARENT_CHANGED">PARENT_CHANGED</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The hierarchy changed through a reparent operation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#SHOWING_CHANGED">SHOWING_CHANGED</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The showing state of the hierarchy changed.</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_java.awt.AWTEvent"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.<A HREF="../../../java/awt/AWTEvent.html">AWTEvent</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/AWTEvent.html#ACTION_EVENT_MASK">ACTION_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#ADJUSTMENT_EVENT_MASK">ADJUSTMENT_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#COMPONENT_EVENT_MASK">COMPONENT_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#consumed">consumed</A>, <A HREF="../../../java/awt/AWTEvent.html#CONTAINER_EVENT_MASK">CONTAINER_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#FOCUS_EVENT_MASK">FOCUS_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#HIERARCHY_BOUNDS_EVENT_MASK">HIERARCHY_BOUNDS_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#HIERARCHY_EVENT_MASK">HIERARCHY_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#id">id</A>, <A HREF="../../../java/awt/AWTEvent.html#INPUT_METHOD_EVENT_MASK">INPUT_METHOD_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#INVOCATION_EVENT_MASK">INVOCATION_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#ITEM_EVENT_MASK">ITEM_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#KEY_EVENT_MASK">KEY_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#MOUSE_EVENT_MASK">MOUSE_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#MOUSE_MOTION_EVENT_MASK">MOUSE_MOTION_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#PAINT_EVENT_MASK">PAINT_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#RESERVED_ID_MAX">RESERVED_ID_MAX</A>, <A HREF="../../../java/awt/AWTEvent.html#TEXT_EVENT_MASK">TEXT_EVENT_MASK</A>, <A HREF="../../../java/awt/AWTEvent.html#WINDOW_EVENT_MASK">WINDOW_EVENT_MASK</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_java.util.EventObject"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.util.<A HREF="../../../java/util/EventObject.html">EventObject</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/util/EventObject.html#source">source</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#HierarchyEvent(java.awt.Component, int, java.awt.Component, java.awt.Container)">HierarchyEvent</A></B>(<A HREF="../../../java/awt/Component.html">Component</A>&nbsp;source,               int&nbsp;id,               <A HREF="../../../java/awt/Component.html">Component</A>&nbsp;changed,               <A HREF="../../../java/awt/Container.html">Container</A>&nbsp;changedParent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an HierarchyEvent object to identify a change in the Component hierarchy.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#HierarchyEvent(java.awt.Component, int, java.awt.Component, java.awt.Container, long)">HierarchyEvent</A></B>(<A HREF="../../../java/awt/Component.html">Component</A>&nbsp;source,               int&nbsp;id,               <A HREF="../../../java/awt/Component.html">Component</A>&nbsp;changed,               <A HREF="../../../java/awt/Container.html">Container</A>&nbsp;changedParent,               long&nbsp;changeFlags)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an HierarchyEvent object to identify a change in the Component hierarchy.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Component.html">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#getChanged()">getChanged</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the Component at the top of the hierarchy which was changed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Container.html">Container</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#getChangedParent()">getChangedParent</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the parent of the Component returned by <code> getChanged()</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#getChangeFlags()">getChangeFlags</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a bitmask which indicates the type(s) of HIERARCHY_CHANGED events represented in this event object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/awt/Component.html">Component</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#getComponent()">getComponent</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the originator of the event.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/event/HierarchyEvent.html#paramString()">paramString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a parameter string identifying this event.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.awt.AWTEvent"><!-- --></A>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?