Widget Definition: (from ordinary-life )
n : a device that very useful for a particular job [syn: appliance, contraption, contrivance, convenience, gadget, gizmo]
1. A meta-thing. Used to stand for a real object in didactic examples (especially database tutorials). Legend has it that the original widgets were holders for buggy whips. “But suppose the parts list for a widget has 52 entries…”
2. [possibly evoking “window gadget”] In graphical user interfaces, a combination of a graphic symbol and some program code to perform a specific function. E.g. a scroll-bar or button. Windowing systems usually provide widget libraries containing commonly used widgets drawn in a certain style and with consistent behavior.
Widget definition from wiki.tcl.tk “A widget is a term used in graphical user interface (GUI) circles in connection to some component of a GUI application. While most widgets have the potential of visual representation, this need not be the case - for instance, container widgets like frames don't actually show up on the screen.”
Widget definition from widget-news 1) In general, widget (pronounced WIH-jit) is a term used to refer to any discrete object, usually of some mechanical nature and relatively small size, when it doesn't have a name, when you can't remember the name, or when you're talking about a class of certain unknown objects in general. (According to Eric Raymond, “legend has it that the original widgets were holders for buggy whips,” but this was possibly written tongue-in-cheek.) 2) In computers, a widget is an element of a graphical user interface (GUI) that displays information or provides a specific way for a user to interact with the operating system and application. Widgets include icons, pull-down menus, buttons, selection boxes, progress indicators, on-off checkmarks, scroll bars, windows, window edges (that let you resize the window), toggle buttons, forms, and many other devices for displaying information and for inviting, accepting, and responding to user actions.
In programming, a widget also means the small program that is written in order to describe what a particular widget looks like, how it behaves, and how it interacts in response to user actions. Most operating systems include a set of ready-to-tailor widgets that a programmer can incorporate in an application, specifying how it is to behave. New widgets can be created. The term was apparently applied first in Unix-based operating systems and the X Window System. In object-oriented programming (OOP), each type of widget is defined as a class (or a subclass under a broad generic widget class) and is always associated with a particular window. In the AIX Enhanced X-Window Toolkit, a widget is the fundamental data type.
Most if not all application development languages today, such as Java and Tool Command Language, come with a ready-made library of widgets that a programmer can incorporate and modify. Using Microsoft's Visual Basic, a widget can be implemented as or part of an ActiveX control.
|Source: OOP demystified by Jim Keogh and Mario Giannini. McGraw Hill. p. 182|
Components typically implement the following types of behavior, using inheritance and/or interfaces specific to the language:
|Source: OOP demystified by Jim Keogh and Mario Giannini. McGraw Hill. p. 183|
The actionListener interface is implemented by classes that want to be notified of actions. This is commonly seen implemented in classes such as forms to respond to user interface events such as button clicks. The actionPerformred method is the only member of this interface.
This interface is implemented by JavaBean classes that want to provide information about what they provide.
Classes that provide a valid clone method should implement this interface. It has no methods but is used to indicate whether it is save to call the clone method for an object.
Classes that maintain a collection implement this interface. It has methods that work with collections such as
size, and so on. Note that the predefined collection classes such as
HashSet, and so on, all implement this interface.
Classes that provide some sort of collection usually implement this interface. Methods in the
Iterator interface include
Classes that have their data saved to and loaded from a strem implement this interface.
|Source: OOP demystified by Jim Keogh and Mario Giannini. McGraw Hill. p. 184|
Implemented by classes that support the clone method
If a class is to be considered a component, it should implement this interface.
Classes that contain components implement this interface. For example, the
Form class is derived from a class that implements this interface.
Classes that maintain a collection of data implement ICollection. Many classes are precreated with this interface already implemented.
Classes that provide iteration or enumeration implement this interface.
Classes that have their data saved and loaded from a stream implements this interface.
|Source: OOP demystified by Jim Keogh and Mario Giannini. McGraw Hill. p. 185|
Default class that all new classes are derived from, unless you specifically indicate a different base. Typically desinged to permit to work with data in a generic manner.
|Object Constructor||Initializes an Object|
|clone||Creates and returns a copy of this object|
|equals||Indicates whether some other object is “equal to” this one|
|finalize||Called by the garbage collector on an object when it determines there are no more references to the object|
|getClass||Returns the runtime class of the object|
|hasCode||Returns a hash code value of the object|
|notify||Wakes up a single thread that is waiting on this object's monitor|
|notifyAll||Wakes all threads that are waiting on this object's monitor|
|toString||Returns a string representation of the object|
|Wait||Overloaded versions. Causes the current thread to wait for some event or operation for this object|
Additional found in C#
|GetType||Gets the type of the current instance|
|ReferenceEquals||Determines whether the specified Object instances are the same instance|
|MemberwiseClone||Creates a shallow copy of the current object|