swarm.gui
Interface Widget

All Known Subinterfaces:
ArchivedGeometryWidget, Canvas, Graph, Histogram, Raster, ZoomRaster

public interface Widget
extends Create, CreateS, Drop, DropS

Widget base class.. 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.


Method Summary
 void disableDestroyNotification()
          Prevent calling the destroy notification method.
 void enableDestroyNotification$notificationMethod(java.lang.Object notificationTarget, Selector destroyNotificationMethod)
          Call a method if we are destroyed.
 boolean getDestroyedFlag()
           
 int getHeight()
          Get the height of the widget.
 java.lang.Object getParent()
          Get the containing window of the widget.
 java.lang.Object getTopLevel()
          Get top level frame
 java.lang.String getWidgetName()
          Get the widget name.
 int getWidth()
          Get the widget the widget.
 java.lang.String getWindowGeometry()
           
 int getX()
          Get the X position of the widget.
 int getY()
          Get the Y position of the widget.
 void pack()
          Roughly, packing a widget makes it draw on the screen.
 void packBeforeAndFillLeft$expand(java.lang.Object widget, boolean expandFlag)
           
 void packFill()
           
 void packFillLeft(boolean expandFlag)
           
 void packForgetAndExpand()
           
 void packToRight(java.lang.Object widget)
           
 void setActiveFlag(boolean activeFlag)
          Enable or disable the widget.
 java.lang.Object setHeight(int height)
          Set the height of the widget.
 java.lang.Object setWidth(int width)
          Set the width of the widget.
 java.lang.Object setWidth$Height(int width, int height)
          Set the width and height of the widget.
 void setWindowGeometry(java.lang.String s)
           
 void setWindowTitle(java.lang.String title)
          Set the title on the widget.
 java.lang.Object setX$Y(int x, int y)
          Set the position of the widget.
 
Methods inherited from interface swarm.defobj.Drop
drop
 
Methods inherited from interface swarm.defobj.DefinedObject
compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 
Methods inherited from interface swarm.defobj.GetName
getName
 

Method Detail

pack

public void pack()
Roughly, packing a widget makes it draw on the screen. The Tk packer allows complicated options to control widget layout. See documentation on Tk to learn more about packing details.

packFill

public void packFill()

packBeforeAndFillLeft$expand

public void packBeforeAndFillLeft$expand(java.lang.Object widget,
                                         boolean expandFlag)

packFillLeft

public void packFillLeft(boolean expandFlag)

packToRight

public void packToRight(java.lang.Object widget)

packForgetAndExpand

public void packForgetAndExpand()

setActiveFlag

public void setActiveFlag(boolean activeFlag)
Enable or disable the widget.

setWidth

public java.lang.Object setWidth(int width)
Set the width of the widget.

setHeight

public java.lang.Object setHeight(int height)
Set the height of the widget.

setWidth$Height

public java.lang.Object setWidth$Height(int width,
                                        int height)
Set the width and height of the widget.

setX$Y

public java.lang.Object setX$Y(int x,
                               int y)
Set the position of the widget.

setWindowTitle

public void setWindowTitle(java.lang.String title)
Set the title on the widget.

getParent

public java.lang.Object getParent()
Get the containing window of the widget.

getTopLevel

public java.lang.Object getTopLevel()
Get top level frame

getWidgetName

public java.lang.String getWidgetName()
Get the widget name.

getHeight

public int getHeight()
Get the height of the widget.

getWidth

public int getWidth()
Get the widget the widget.

getX

public int getX()
Get the X position of the widget.

getY

public int getY()
Get the Y position of the widget.

getWindowGeometry

public java.lang.String getWindowGeometry()

setWindowGeometry

public void setWindowGeometry(java.lang.String s)

enableDestroyNotification$notificationMethod

public void enableDestroyNotification$notificationMethod(java.lang.Object notificationTarget,
                                                         Selector destroyNotificationMethod)
Call a method if we are destroyed.

disableDestroyNotification

public void disableDestroyNotification()
Prevent calling the destroy notification method.

getDestroyedFlag

public boolean getDestroyedFlag()