?? widget.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Tue Nov 30 14:11:21 MST 2004 --><TITLE>Swarm 2.2 Reference Guide: Interface Widget</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 ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../swarm/gui/RectangleNodeItemS.html"><B>PREV CLASS</B></A> <A HREF="../../swarm/gui/WidgetC.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> <A HREF="Widget.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">swarm.gui</FONT><BR>Interface Widget</H2><DL><DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../swarm/gui/ArchivedGeometryWidget.html">ArchivedGeometryWidget</A>, <A HREF="../../swarm/gui/Canvas.html">Canvas</A>, <A HREF="../../swarm/gui/Graph.html">Graph</A>, <A HREF="../../swarm/gui/Histogram.html">Histogram</A>, <A HREF="../../swarm/gui/Raster.html">Raster</A>, <A HREF="../../swarm/gui/ZoomRaster.html">ZoomRaster</A></DD></DL><HR><DL><DT>public interface <B>Widget</B><DT>extends <A HREF="../../swarm/defobj/Create.html">Create</A>, <A HREF="../../swarm/defobj/CreateS.html">CreateS</A>, <A HREF="../../swarm/defobj/Drop.html">Drop</A>, <A HREF="../../swarm/defobj/DropS.html">DropS</A></DL><P><strong> Widget base class.</strong>.All graphical widgets inherit from the Widget base class. Widget defines most of the behaviour needed: Widgets are created by the user with a particular parent, and then "pack"ed in order to draw them on the screen. All widgets have three essential things: a widget name used when running Tcl code, an Objective C name when sending messages from Tcl to those objects, and a parent.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#disableDestroyNotification()">disableDestroyNotification</A></B>()</CODE><BR> Prevent calling the destroy notification method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#enableDestroyNotification$notificationMethod(java.lang.Object, swarm.Selector)">enableDestroyNotification$notificationMethod</A></B>(java.lang.Object notificationTarget, <A HREF="../../swarm/Selector.html">Selector</A> destroyNotificationMethod)</CODE><BR> Call a method if we are destroyed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getDestroyedFlag()">getDestroyedFlag</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getHeight()">getHeight</A></B>()</CODE><BR> Get the height of the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getParent()">getParent</A></B>()</CODE><BR> Get the containing window of the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getTopLevel()">getTopLevel</A></B>()</CODE><BR> Get top level frame</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getWidgetName()">getWidgetName</A></B>()</CODE><BR> Get the widget name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getWidth()">getWidth</A></B>()</CODE><BR> Get the widget the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getWindowGeometry()">getWindowGeometry</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getX()">getX</A></B>()</CODE><BR> Get the X position of the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#getY()">getY</A></B>()</CODE><BR> Get the Y position of the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#pack()">pack</A></B>()</CODE><BR> Roughly, packing a widget makes it draw on the screen.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#packBeforeAndFillLeft$expand(java.lang.Object, boolean)">packBeforeAndFillLeft$expand</A></B>(java.lang.Object widget, boolean expandFlag)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#packFill()">packFill</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#packFillLeft(boolean)">packFillLeft</A></B>(boolean expandFlag)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#packForgetAndExpand()">packForgetAndExpand</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#packToRight(java.lang.Object)">packToRight</A></B>(java.lang.Object widget)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#setActiveFlag(boolean)">setActiveFlag</A></B>(boolean activeFlag)</CODE><BR> Enable or disable the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#setHeight(int)">setHeight</A></B>(int height)</CODE><BR> Set the height of the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#setWidth(int)">setWidth</A></B>(int width)</CODE><BR> Set the width of the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#setWidth$Height(int, int)">setWidth$Height</A></B>(int width, int height)</CODE><BR> Set the width and height of the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#setWindowGeometry(java.lang.String)">setWindowGeometry</A></B>(java.lang.String s)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#setWindowTitle(java.lang.String)">setWindowTitle</A></B>(java.lang.String title)</CODE><BR> Set the title on the widget.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../swarm/gui/Widget.html#setX$Y(int, int)">setX$Y</A></B>(int x, int y)</CODE><BR> Set the position of the widget.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_swarm.defobj.Drop"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface swarm.defobj.<A HREF="../../swarm/defobj/Drop.html">Drop</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../swarm/defobj/Drop.html#drop()">drop</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_swarm.defobj.DefinedObject"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface swarm.defobj.<A HREF="../../swarm/defobj/DefinedObject.html">DefinedObject</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../swarm/defobj/DefinedObject.html#compare(java.lang.Object)">compare</A>, <A HREF="../../swarm/defobj/DefinedObject.html#describe(java.lang.Object)">describe</A>, <A HREF="../../swarm/defobj/DefinedObject.html#describeID(java.lang.Object)">describeID</A>, <A HREF="../../swarm/defobj/DefinedObject.html#getDisplayName()">getDisplayName</A>, <A HREF="../../swarm/defobj/DefinedObject.html#getTypeName()">getTypeName</A>, <A HREF="../../swarm/defobj/DefinedObject.html#getZone()">getZone</A>, <A HREF="../../swarm/defobj/DefinedObject.html#perform(swarm.Selector)">perform</A>, <A HREF="../../swarm/defobj/DefinedObject.html#perform$with(swarm.Selector, java.lang.Object)">perform$with</A>, <A HREF="../../swarm/defobj/DefinedObject.html#perform$with$with(swarm.Selector, java.lang.Object, java.lang.Object)">perform$with$with</A>, <A HREF="../../swarm/defobj/DefinedObject.html#perform$with$with$with(swarm.Selector, java.lang.Object, java.lang.Object, java.lang.Object)">perform$with$with$with</A>, <A HREF="../../swarm/defobj/DefinedObject.html#respondsTo(swarm.Selector)">respondsTo</A>, <A HREF="../../swarm/defobj/DefinedObject.html#setDisplayName(java.lang.String)">setDisplayName</A>, <A HREF="../../swarm/defobj/DefinedObject.html#xfprint()">xfprint</A>, <A HREF="../../swarm/defobj/DefinedObject.html#xfprintid()">xfprintid</A>, <A HREF="../../swarm/defobj/DefinedObject.html#xprint()">xprint</A>, <A HREF="../../swarm/defobj/DefinedObject.html#xprintid()">xprintid</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_swarm.defobj.GetName"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface swarm.defobj.<A HREF="../../swarm/defobj/GetName.html">GetName</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../swarm/defobj/GetName.html#getName()">getName</A></CODE></TD></TR></TABLE> <P>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -