Java Doc for Widget.java in  » Ajax » GWT » org » eclipse » swt » widgets » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » GWT » org.eclipse.swt.widgets 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.swt.widgets.Widget

Widget
abstract public class Widget (Code)
This class is the abstract superclass of all user interface objects. Widgets are created, disposed and issue notification to listeners when events occur which affect them.
Styles:
(none)
Events:
Dispose

IMPORTANT: This class is intended to be subclassed only within the SWT implementation. However, it has not been marked final to allow those outside of the SWT development team to implement patched versions of the class in order to get around specific limitations in advance of when those limitations can be addressed by the team. Any class built using subclassing to access the internals of this class will likely fail to compile or run between releases and may be strongly platform specific. Subclassing should not be attempted without an intimate and detailed understanding of the workings of the hierarchy. No support is provided for user-written classes which are implemented as subclasses of this class.


See Also:   Widget.checkSubclass


Field Summary
final static  intCANVAS
    
final static  StringCLEAR_GRAB_BIT
    
final static  intDEFAULT_HEIGHT
    
final static  intDEFAULT_WIDTH
    
final static  intDISABLED
    
final static  intDISPOSED
    
final static  intDISPOSE_SENT
    
final static  RectEMPTY_RECT
    
final static  intEXPANDING
    
final static  intGRAB
    
final static  intHIDDEN
    
final static  intIGNORE_WHEEL
    
final static  intKEYED_DATA
    
final static  intLAYOUT_CHANGED
    
final static  intLAYOUT_CHILD
    
final static  intLAYOUT_NEEDED
    
final static  intMOVED
    
final static  intPARENT_BACKGROUND
    
final static  intRELEASED
    
final static  intRESIZED
    
final static  intTHEME_BACKGROUND
    
 Objectdata
    
 Displaydisplay
    
 EventTableeventTable
    
 intstylestate
    

Constructor Summary
 Widget()
    
public  Widget(Widget parent, int style)
     Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants.


Method Summary
 void_addListener(int eventType, Listener listener)
    
 intaccessibilityProc(int nextHandler, int theEvent, int userData)
    
 intactionProc(int theControl, int partCode)
    
public  voidaddDisposeListener(DisposeListener listener)
     Adds the listener to the collection of listeners who will be notified when the widget is disposed.
public  voidaddListener(int eventType, Listener listener)
     Adds the listener to the collection of listeners who will be notified when an event of the given type occurs.
 voidcalculateVisibleRegion(int control, int visibleRgn, boolean clipChildren)
    
 intcallPaintEventHandler(int control, int damageRgn, int visibleRgn, int theEvent, int nextHandler)
    
static  intcheckBits(int style, int int0, int int1, int int2, int int3, int int4, int int5)
    
 voidcheckOpen()
    
 voidcheckOrientation(Widget parent)
    
 voidcheckParent(Widget parent)
    
protected  voidcheckSubclass()
     Checks that this class can be subclassed.

The SWT class library is intended to be subclassed only at specific, controlled points (most notably, Composite and Canvas when implementing new widgets).

protected  voidcheckWidget()
     Throws an SWTException if the receiver can not be accessed by the caller.
 intcolorProc(int inControl, int inMessage, int inDrawDepth, int inDrawInColor)
    
 intcommandProc(int nextHandler, int theEvent, int userData)
    
 booleancontains(int shellX, int shellY)
    
 intcontrolProc(int nextHandler, int theEvent, int userData)
    
 intcreateCIcon(Image image)
    
 voidcreateHandle()
    
 intcreateIconRef(Image image)
    
 voidcreateWidget()
    
 voidderegister()
    
 voiddestroyCIcon(int iconHandle)
    
 voiddestroyWidget()
    
public  voiddispose()
     Disposes of the operating system resources associated with the receiver and all its descendents.
 voiddrawBackground(int control, int context)
    
 intdrawItemProc(int browser, int item, int property, int itemState, int theRect, int gdDepth, int colorDevice)
    
 voiddrawWidget(int control, int context, int damageRgn, int visibleRgn, int theEvent)
    
 voiderror(int code)
    
 booleanfilters(int eventType)
    
 intfixMnemonic(char[] buffer)
    
 RectanglegetControlBounds(int control)
    
 PointgetControlSize(int control)
    
public  ObjectgetData()
     Returns the application defined widget data associated with the receiver, or null if it has not been set.
public  ObjectgetData(String key)
     Returns the application defined property of the receiver with the specified name, or null if it has not been set.

Applications may have associated arbitrary objects with the receiver in this fashion.

public  DisplaygetDisplay()
     Returns the Display that is associated with the receiver.
 intgetDrawCount(int control)
    
 RectgetInset()
    
 StringgetName()
    
 StringgetNameText()
    
public  intgetStyle()
     Returns the receiver's style information.

Note that the value which is returned by this method may not match the value which was provided to the constructor when the receiver was created.

 intgetVisibleRegion(int control, boolean clipChildren)
    
 inthelpProc(int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent)
    
 inthitTestProc(int browser, int item, int property, int theRect, int mouseRect)
    
 voidhookEvents()
    
 booleanhooks(int eventType)
    
 voidinvalWindowRgn(int window, int rgn)
    
 voidinvalidateVisibleRegion(int control)
    
public  booleanisDisposed()
     Returns true if the widget has been disposed, and false otherwise.
 booleanisDrawing(int control)
    
 booleanisEnabled()
    
public  booleanisListening(int eventType)
     Returns true if there are any listeners for the specified event type associated with the receiver, and false otherwise.
 booleanisTrimHandle(int trimHandle)
    
 booleanisValidSubclass()
    
 booleanisValidThread()
    
 intitemCompareProc(int browser, int itemOne, int itemTwo, int sortProperty)
    
 intitemDataProc(int browser, int item, int property, int itemData, int setValue)
    
 intitemNotificationProc(int browser, int item, int message)
    
 intkEventAccessibleGetAllAttributeNames(int nextHandler, int theEvent, int userData)
    
 intkEventAccessibleGetChildAtPoint(int nextHandler, int theEvent, int userData)
    
 intkEventAccessibleGetNamedAttribute(int nextHandler, int theEvent, int userData)
    
 intkEventControlActivate(int nextHandler, int theEvent, int userData)
    
 intkEventControlApplyBackground(int nextHandler, int theEvent, int userData)
    
 intkEventControlBoundsChanged(int nextHandler, int theEvent, int userData)
    
 intkEventControlClick(int nextHandler, int theEvent, int userData)
    
 intkEventControlContextualMenuClick(int nextHandler, int theEvent, int userData)
    
 intkEventControlDeactivate(int nextHandler, int theEvent, int userData)
    
 intkEventControlDraw(int nextHandler, int theEvent, int userData)
    
 intkEventControlGetClickActivation(int nextHandler, int theEvent, int userData)
    
 intkEventControlGetFocusPart(int nextHandler, int theEvent, int userData)
    
 intkEventControlHit(int nextHandler, int theEvent, int userData)
    
 intkEventControlHitTest(int nextHandler, int theEvent, int userData)
    
 intkEventControlSetCursor(int nextHandler, int theEvent, int userData)
    
 intkEventControlSetFocusPart(int nextHandler, int theEvent, int userData)
    
 intkEventControlTrack(int nextHandler, int theEvent, int userData)
    
 intkEventMenuCalculateSize(int nextHandler, int theEvent, int userData)
    
 intkEventMenuClosed(int nextHandler, int theEvent, int userData)
    
 intkEventMenuCreateFrameView(int nextHandler, int theEvent, int userData)
    
 intkEventMenuDrawItem(int nextHandler, int theEvent, int userData)
    
 intkEventMenuDrawItemContent(int nextHandler, int theEvent, int userData)
    
 intkEventMenuGetFrameBounds(int nextHandler, int theEvent, int userData)
    
 intkEventMenuMeasureItemWidth(int nextHandler, int theEvent, int userData)
    
 intkEventMenuOpening(int nextHandler, int theEvent, int userData)
    
 intkEventMenuTargetItem(int nextHandler, int theEvent, int userData)
    
 intkEventMouseDown(int nextHandler, int theEvent, int userData)
    
 intkEventMouseDragged(int nextHandler, int theEvent, int userData)
    
 intkEventMouseMoved(int nextHandler, int theEvent, int userData)
    
 intkEventMouseUp(int nextHandler, int theEvent, int userData)
    
 intkEventMouseWheelMoved(int nextHandler, int theEvent, int userData)
    
 intkEventProcessCommand(int nextHandler, int theEvent, int userData)
    
 intkEventRawKeyDown(int nextHandler, int theEvent, int userData)
    
 intkEventRawKeyModifiersChanged(int nextHandler, int theEvent, int userData)
    
 intkEventRawKeyPressed(int nextHandler, int theEvent, int userData)
    
 intkEventRawKeyRepeat(int nextHandler, int theEvent, int userData)
    
 intkEventRawKeyUp(int nextHandler, int theEvent, int userData)
    
 intkEventTextInputUnicodeForKeyEvent(int nextHandler, int theEvent, int userData)
    
 intkEventWindowActivated(int nextHandler, int theEvent, int userData)
    
 intkEventWindowBoundsChanged(int nextHandler, int theEvent, int userData)
    
 intkEventWindowClose(int nextHandler, int theEvent, int userData)
    
 intkEventWindowCollapsed(int nextHandler, int theEvent, int userData)
    
 intkEventWindowDeactivated(int nextHandler, int theEvent, int userData)
    
 intkEventWindowDrawContent(int nextHandler, int theEvent, int userData)
    
 intkEventWindowExpanded(int nextHandler, int theEvent, int userData)
    
 intkEventWindowGetClickModality(int nextHandler, int theEvent, int userData)
    
 intkEventWindowGetRegion(int nextHandler, int theEvent, int userData)
    
 intkEventWindowHidden(int nextHandler, int theEvent, int userData)
    
 intkEventWindowHitTest(int nextHandler, int theEvent, int userData)
    
 intkEventWindowShown(int nextHandler, int theEvent, int userData)
    
 intkEventWindowUpdate(int nextHandler, int theEvent, int userData)
    
 intkeyboardProc(int nextHandler, int theEvent, int userData)
    
 intmenuProc(int nextHandler, int theEvent, int userData)
    
 intmouseProc(int nextHandler, int theEvent, int userData)
    
public  voidnotifyListeners(int eventType, Event event)
     Notifies all of the receiver's listeners for events of the given type that one such event has occurred by invoking their handleEvent() method.
 voidpostEvent(int eventType)
    
 voidpostEvent(int eventType, Event event)
    
 voidredrawChildren(int control)
    
 voidredrawChildren(int control, int rgn)
    
 voidredrawWidget(int control, boolean children)
    
 voidredrawWidget(int control, int x, int y, int width, int height, boolean children)
    
 voidregister()
    
 voidrelease(boolean destroy)
    
 voidreleaseChildren(boolean destroy)
    
 voidreleaseHandle()
    
 voidreleaseParent()
    
 voidreleaseWidget()
    
public  voidremoveDisposeListener(DisposeListener listener)
     Removes the listener from the collection of listeners who will be notified when the widget is disposed.
public  voidremoveListener(int eventType, Listener handler)
     Removes the listener from the collection of listeners who will be notified when an event of the given type occurs.
protected  voidremoveListener(int eventType, SWTEventListener handler)
     Removes the listener from the collection of listeners who will be notified when an event of the given type occurs.

IMPORTANT: This method is not part of the SWT public API.

 voidsendEvent(Event event)
    
 voidsendEvent(int eventType)
    
 voidsendEvent(int eventType, Event event)
    
 voidsendEvent(int eventType, Event event, boolean send)
    
 booleansendKeyEvent(int type, int theEvent)
    
 booleansendKeyEvent(int type, Event event)
    
 intsetBounds(int control, int x, int y, int width, int height, boolean move, boolean resize, boolean events)
    
public  voidsetData(Object data)
     Sets the application defined widget data associated with the receiver to be the argument.
public  voidsetData(String key, Object value)
     Sets the application defined property of the receiver with the specified name to the given value.

Applications may associate arbitrary objects with the receiver in this fashion.

 booleansetInputState(Event event, int type, int chord, int modifiers)
    
 booleansetKeyState(Event event, int type, int theEvent)
    
 voidsetVisible(int control, boolean visible)
    
 voidsetZOrder(int control, int otheControl, boolean above)
    
 inttextInputProc(int nextHandler, int theEvent, int userData)
    
 RGBColortoRGBColor(float[] color)
    
public  StringtoString()
     Returns a string containing a concise, human-readable description of the receiver.
 inttrackingProc(int browser, int itemID, int property, int theRect, int startPt, int modifiers)
    
 intwindowProc(int nextHandler, int theEvent, int userData)
    

Field Detail
CANVAS
final static int CANVAS(Code)



CLEAR_GRAB_BIT
final static String CLEAR_GRAB_BIT(Code)



DEFAULT_HEIGHT
final static int DEFAULT_HEIGHT(Code)



DEFAULT_WIDTH
final static int DEFAULT_WIDTH(Code)



DISABLED
final static int DISABLED(Code)



DISPOSED
final static int DISPOSED(Code)



DISPOSE_SENT
final static int DISPOSE_SENT(Code)



EMPTY_RECT
final static Rect EMPTY_RECT(Code)



EXPANDING
final static int EXPANDING(Code)



GRAB
final static int GRAB(Code)



HIDDEN
final static int HIDDEN(Code)



IGNORE_WHEEL
final static int IGNORE_WHEEL(Code)



KEYED_DATA
final static int KEYED_DATA(Code)



LAYOUT_CHANGED
final static int LAYOUT_CHANGED(Code)



LAYOUT_CHILD
final static int LAYOUT_CHILD(Code)



LAYOUT_NEEDED
final static int LAYOUT_NEEDED(Code)



MOVED
final static int MOVED(Code)



PARENT_BACKGROUND
final static int PARENT_BACKGROUND(Code)



RELEASED
final static int RELEASED(Code)



RESIZED
final static int RESIZED(Code)



THEME_BACKGROUND
final static int THEME_BACKGROUND(Code)



data
Object data(Code)



display
Display display(Code)



eventTable
EventTable eventTable(Code)



stylestate
int stylestate(Code)




Constructor Detail
Widget
Widget()(Code)



Widget
public Widget(Widget parent, int style)(Code)
Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.


Parameters:
  parent - a widget which will be the parent of the new instance (cannot be null)
Parameters:
  style - the style of widget to construct
exception:
  IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the parent is null
  • ERROR_INVALID_ARGUMENT - if the parent is disposed

exception:
  SWTException -
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
  • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass

See Also:   SWT
See Also:   Widget.checkSubclass
See Also:   Widget.getStyle




Method Detail
_addListener
void _addListener(int eventType, Listener listener)(Code)



accessibilityProc
int accessibilityProc(int nextHandler, int theEvent, int userData)(Code)



actionProc
int actionProc(int theControl, int partCode)(Code)



addDisposeListener
public void addDisposeListener(DisposeListener listener)(Code)
Adds the listener to the collection of listeners who will be notified when the widget is disposed. When the widget is disposed, the listener is notified by sending it the widgetDisposed() message.
Parameters:
  listener - the listener which should be notified when the receiver is disposed
exception:
  IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null

exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   DisposeListener
See Also:   Widget.removeDisposeListener



addListener
public void addListener(int eventType, Listener listener)(Code)
Adds the listener to the collection of listeners who will be notified when an event of the given type occurs. When the event does occur in the widget, the listener is notified by sending it the handleEvent() message. The event type is one of the event constants defined in class SWT.
Parameters:
  eventType - the type of event to listen for
Parameters:
  listener - the listener which should be notified when the event occurs
exception:
  IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null

exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   Listener
See Also:   SWT
See Also:   Widget.removeListener
See Also:   Widget.notifyListeners



calculateVisibleRegion
void calculateVisibleRegion(int control, int visibleRgn, boolean clipChildren)(Code)



callPaintEventHandler
int callPaintEventHandler(int control, int damageRgn, int visibleRgn, int theEvent, int nextHandler)(Code)



checkBits
static int checkBits(int style, int int0, int int1, int int2, int int3, int int4, int int5)(Code)



checkOpen
void checkOpen()(Code)



checkOrientation
void checkOrientation(Widget parent)(Code)



checkParent
void checkParent(Widget parent)(Code)



checkSubclass
protected void checkSubclass()(Code)
Checks that this class can be subclassed.

The SWT class library is intended to be subclassed only at specific, controlled points (most notably, Composite and Canvas when implementing new widgets). This method enforces this rule unless it is overridden.

IMPORTANT: By providing an implementation of this method that allows a subclass of a class which does not normally allow subclassing to be created, the implementer agrees to be fully responsible for the fact that any such subclass will likely fail between SWT releases and will be strongly platform specific. No support is provided for user-written classes which are implemented in this fashion.

The ability to subclass outside of the allowed SWT classes is intended purely to enable those not on the SWT development team to implement patches in order to get around specific limitations in advance of when those limitations can be addressed by the team. Subclassing should not be attempted without an intimate and detailed understanding of the hierarchy.


exception:
  SWTException -
  • ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass



checkWidget
protected void checkWidget()(Code)
Throws an SWTException if the receiver can not be accessed by the caller. This may include both checks on the state of the receiver and more generally on the entire execution context. This method should be called by widget implementors to enforce the standard SWT invariants.

Currently, it is an error to invoke any method (other than isDisposed()) on a widget that has had its dispose() method called. It is also an error to call widget methods from any thread that is different from the thread that created the widget.

In future releases of SWT, there may be more or fewer error checks and exceptions may be thrown for different reasons.


exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver



colorProc
int colorProc(int inControl, int inMessage, int inDrawDepth, int inDrawInColor)(Code)



commandProc
int commandProc(int nextHandler, int theEvent, int userData)(Code)



contains
boolean contains(int shellX, int shellY)(Code)



controlProc
int controlProc(int nextHandler, int theEvent, int userData)(Code)



createCIcon
int createCIcon(Image image)(Code)



createHandle
void createHandle()(Code)



createIconRef
int createIconRef(Image image)(Code)



createWidget
void createWidget()(Code)



deregister
void deregister()(Code)



destroyCIcon
void destroyCIcon(int iconHandle)(Code)



destroyWidget
void destroyWidget()(Code)



dispose
public void dispose()(Code)
Disposes of the operating system resources associated with the receiver and all its descendents. After this method has been invoked, the receiver and all descendents will answer true when sent the message isDisposed(). Any internal connections between the widgets in the tree will have been removed to facilitate garbage collection.

NOTE: This method is not called recursively on the descendents of the receiver. This means that, widget implementers can not detect when a widget is being disposed of by re-implementing this method, but should instead listen for the Dispose event.


exception:
  SWTException -
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   Widget.addDisposeListener
See Also:   Widget.removeDisposeListener
See Also:   Widget.checkWidget



drawBackground
void drawBackground(int control, int context)(Code)



drawItemProc
int drawItemProc(int browser, int item, int property, int itemState, int theRect, int gdDepth, int colorDevice)(Code)



drawWidget
void drawWidget(int control, int context, int damageRgn, int visibleRgn, int theEvent)(Code)



error
void error(int code)(Code)



filters
boolean filters(int eventType)(Code)



fixMnemonic
int fixMnemonic(char[] buffer)(Code)



getControlBounds
Rectangle getControlBounds(int control)(Code)



getControlSize
Point getControlSize(int control)(Code)



getData
public Object getData()(Code)
Returns the application defined widget data associated with the receiver, or null if it has not been set. The widget data is a single, unnamed field that is stored with every widget.

Applications may put arbitrary objects in this field. If the object stored in the widget data needs to be notified when the widget is disposed of, it is the application's responsibility to hook the Dispose event on the widget and do so.

the widget data
exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - when the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - when called from the wrong thread

See Also:   Widget.setData(Object)



getData
public Object getData(String key)(Code)
Returns the application defined property of the receiver with the specified name, or null if it has not been set.

Applications may have associated arbitrary objects with the receiver in this fashion. If the objects stored in the properties need to be notified when the widget is disposed of, it is the application's responsibility to hook the Dispose event on the widget and do so.


Parameters:
  key - the name of the property the value of the property or null if it has not been set
exception:
  IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the key is null

exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   Widget.setData(String,Object)



getDisplay
public Display getDisplay()(Code)
Returns the Display that is associated with the receiver.

A widget's display is either provided when it is created (for example, top level Shells) or is the same as its parent's display.

the receiver's display
exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed



getDrawCount
int getDrawCount(int control)(Code)



getInset
Rect getInset()(Code)



getName
String getName()(Code)



getNameText
String getNameText()(Code)



getStyle
public int getStyle()(Code)
Returns the receiver's style information.

Note that the value which is returned by this method may not match the value which was provided to the constructor when the receiver was created. This can occur when the underlying operating system does not support a particular combination of requested styles. For example, if the platform widget used to implement a particular SWT widget always has scroll bars, the result of calling this method would always have the SWT.H_SCROLL and SWT.V_SCROLL bits set.

the style bits
exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver



getVisibleRegion
int getVisibleRegion(int control, boolean clipChildren)(Code)



helpProc
int helpProc(int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent)(Code)



hitTestProc
int hitTestProc(int browser, int item, int property, int theRect, int mouseRect)(Code)



hookEvents
void hookEvents()(Code)



hooks
boolean hooks(int eventType)(Code)



invalWindowRgn
void invalWindowRgn(int window, int rgn)(Code)



invalidateVisibleRegion
void invalidateVisibleRegion(int control)(Code)



isDisposed
public boolean isDisposed()(Code)
Returns true if the widget has been disposed, and false otherwise.

This method gets the dispose state for the widget. When a widget has been disposed, it is an error to invoke any other method using the widget.

true when the widget is disposed and false otherwise



isDrawing
boolean isDrawing(int control)(Code)



isEnabled
boolean isEnabled()(Code)



isListening
public boolean isListening(int eventType)(Code)
Returns true if there are any listeners for the specified event type associated with the receiver, and false otherwise. The event type is one of the event constants defined in class SWT.
Parameters:
  eventType - the type of event true if the event is hooked
exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   SWT



isTrimHandle
boolean isTrimHandle(int trimHandle)(Code)



isValidSubclass
boolean isValidSubclass()(Code)



isValidThread
boolean isValidThread()(Code)



itemCompareProc
int itemCompareProc(int browser, int itemOne, int itemTwo, int sortProperty)(Code)



itemDataProc
int itemDataProc(int browser, int item, int property, int itemData, int setValue)(Code)



itemNotificationProc
int itemNotificationProc(int browser, int item, int message)(Code)



kEventAccessibleGetAllAttributeNames
int kEventAccessibleGetAllAttributeNames(int nextHandler, int theEvent, int userData)(Code)



kEventAccessibleGetChildAtPoint
int kEventAccessibleGetChildAtPoint(int nextHandler, int theEvent, int userData)(Code)



kEventAccessibleGetNamedAttribute
int kEventAccessibleGetNamedAttribute(int nextHandler, int theEvent, int userData)(Code)



kEventControlActivate
int kEventControlActivate(int nextHandler, int theEvent, int userData)(Code)



kEventControlApplyBackground
int kEventControlApplyBackground(int nextHandler, int theEvent, int userData)(Code)



kEventControlBoundsChanged
int kEventControlBoundsChanged(int nextHandler, int theEvent, int userData)(Code)



kEventControlClick
int kEventControlClick(int nextHandler, int theEvent, int userData)(Code)



kEventControlContextualMenuClick
int kEventControlContextualMenuClick(int nextHandler, int theEvent, int userData)(Code)



kEventControlDeactivate
int kEventControlDeactivate(int nextHandler, int theEvent, int userData)(Code)



kEventControlDraw
int kEventControlDraw(int nextHandler, int theEvent, int userData)(Code)



kEventControlGetClickActivation
int kEventControlGetClickActivation(int nextHandler, int theEvent, int userData)(Code)



kEventControlGetFocusPart
int kEventControlGetFocusPart(int nextHandler, int theEvent, int userData)(Code)



kEventControlHit
int kEventControlHit(int nextHandler, int theEvent, int userData)(Code)



kEventControlHitTest
int kEventControlHitTest(int nextHandler, int theEvent, int userData)(Code)



kEventControlSetCursor
int kEventControlSetCursor(int nextHandler, int theEvent, int userData)(Code)



kEventControlSetFocusPart
int kEventControlSetFocusPart(int nextHandler, int theEvent, int userData)(Code)



kEventControlTrack
int kEventControlTrack(int nextHandler, int theEvent, int userData)(Code)



kEventMenuCalculateSize
int kEventMenuCalculateSize(int nextHandler, int theEvent, int userData)(Code)



kEventMenuClosed
int kEventMenuClosed(int nextHandler, int theEvent, int userData)(Code)



kEventMenuCreateFrameView
int kEventMenuCreateFrameView(int nextHandler, int theEvent, int userData)(Code)



kEventMenuDrawItem
int kEventMenuDrawItem(int nextHandler, int theEvent, int userData)(Code)



kEventMenuDrawItemContent
int kEventMenuDrawItemContent(int nextHandler, int theEvent, int userData)(Code)



kEventMenuGetFrameBounds
int kEventMenuGetFrameBounds(int nextHandler, int theEvent, int userData)(Code)



kEventMenuMeasureItemWidth
int kEventMenuMeasureItemWidth(int nextHandler, int theEvent, int userData)(Code)



kEventMenuOpening
int kEventMenuOpening(int nextHandler, int theEvent, int userData)(Code)



kEventMenuTargetItem
int kEventMenuTargetItem(int nextHandler, int theEvent, int userData)(Code)



kEventMouseDown
int kEventMouseDown(int nextHandler, int theEvent, int userData)(Code)



kEventMouseDragged
int kEventMouseDragged(int nextHandler, int theEvent, int userData)(Code)



kEventMouseMoved
int kEventMouseMoved(int nextHandler, int theEvent, int userData)(Code)



kEventMouseUp
int kEventMouseUp(int nextHandler, int theEvent, int userData)(Code)



kEventMouseWheelMoved
int kEventMouseWheelMoved(int nextHandler, int theEvent, int userData)(Code)



kEventProcessCommand
int kEventProcessCommand(int nextHandler, int theEvent, int userData)(Code)



kEventRawKeyDown
int kEventRawKeyDown(int nextHandler, int theEvent, int userData)(Code)



kEventRawKeyModifiersChanged
int kEventRawKeyModifiersChanged(int nextHandler, int theEvent, int userData)(Code)



kEventRawKeyPressed
int kEventRawKeyPressed(int nextHandler, int theEvent, int userData)(Code)



kEventRawKeyRepeat
int kEventRawKeyRepeat(int nextHandler, int theEvent, int userData)(Code)



kEventRawKeyUp
int kEventRawKeyUp(int nextHandler, int theEvent, int userData)(Code)



kEventTextInputUnicodeForKeyEvent
int kEventTextInputUnicodeForKeyEvent(int nextHandler, int theEvent, int userData)(Code)



kEventWindowActivated
int kEventWindowActivated(int nextHandler, int theEvent, int userData)(Code)



kEventWindowBoundsChanged
int kEventWindowBoundsChanged(int nextHandler, int theEvent, int userData)(Code)



kEventWindowClose
int kEventWindowClose(int nextHandler, int theEvent, int userData)(Code)



kEventWindowCollapsed
int kEventWindowCollapsed(int nextHandler, int theEvent, int userData)(Code)



kEventWindowDeactivated
int kEventWindowDeactivated(int nextHandler, int theEvent, int userData)(Code)



kEventWindowDrawContent
int kEventWindowDrawContent(int nextHandler, int theEvent, int userData)(Code)



kEventWindowExpanded
int kEventWindowExpanded(int nextHandler, int theEvent, int userData)(Code)



kEventWindowGetClickModality
int kEventWindowGetClickModality(int nextHandler, int theEvent, int userData)(Code)



kEventWindowGetRegion
int kEventWindowGetRegion(int nextHandler, int theEvent, int userData)(Code)



kEventWindowHidden
int kEventWindowHidden(int nextHandler, int theEvent, int userData)(Code)



kEventWindowHitTest
int kEventWindowHitTest(int nextHandler, int theEvent, int userData)(Code)



kEventWindowShown
int kEventWindowShown(int nextHandler, int theEvent, int userData)(Code)



kEventWindowUpdate
int kEventWindowUpdate(int nextHandler, int theEvent, int userData)(Code)



keyboardProc
int keyboardProc(int nextHandler, int theEvent, int userData)(Code)



menuProc
int menuProc(int nextHandler, int theEvent, int userData)(Code)



mouseProc
int mouseProc(int nextHandler, int theEvent, int userData)(Code)



notifyListeners
public void notifyListeners(int eventType, Event event)(Code)
Notifies all of the receiver's listeners for events of the given type that one such event has occurred by invoking their handleEvent() method. The event type is one of the event constants defined in class SWT.
Parameters:
  eventType - the type of event which has occurred
Parameters:
  event - the event data
exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   SWT
See Also:   Widget.addListener
See Also:   Widget.removeListener



postEvent
void postEvent(int eventType)(Code)



postEvent
void postEvent(int eventType, Event event)(Code)



redrawChildren
void redrawChildren(int control)(Code)



redrawChildren
void redrawChildren(int control, int rgn)(Code)



redrawWidget
void redrawWidget(int control, boolean children)(Code)



redrawWidget
void redrawWidget(int control, int x, int y, int width, int height, boolean children)(Code)



register
void register()(Code)



release
void release(boolean destroy)(Code)



releaseChildren
void releaseChildren(boolean destroy)(Code)



releaseHandle
void releaseHandle()(Code)



releaseParent
void releaseParent()(Code)



releaseWidget
void releaseWidget()(Code)



removeDisposeListener
public void removeDisposeListener(DisposeListener listener)(Code)
Removes the listener from the collection of listeners who will be notified when the widget is disposed.
Parameters:
  listener - the listener which should no longer be notified when the receiver is disposed
exception:
  IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null

exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   DisposeListener
See Also:   Widget.addDisposeListener



removeListener
public void removeListener(int eventType, Listener handler)(Code)
Removes the listener from the collection of listeners who will be notified when an event of the given type occurs. The event type is one of the event constants defined in class SWT.
Parameters:
  eventType - the type of event to listen for
Parameters:
  listener - the listener which should no longer be notified when the event occurs
exception:
  IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null

exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   Listener
See Also:   SWT
See Also:   Widget.addListener
See Also:   Widget.notifyListeners



removeListener
protected void removeListener(int eventType, SWTEventListener handler)(Code)
Removes the listener from the collection of listeners who will be notified when an event of the given type occurs.

IMPORTANT: This method is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It should never be referenced from application code.


Parameters:
  eventType - the type of event to listen for
Parameters:
  listener - the listener which should no longer be notified when the event occurs
exception:
  IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the listener is null

exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   Listener
See Also:   Widget.addListener



sendEvent
void sendEvent(Event event)(Code)



sendEvent
void sendEvent(int eventType)(Code)



sendEvent
void sendEvent(int eventType, Event event)(Code)



sendEvent
void sendEvent(int eventType, Event event, boolean send)(Code)



sendKeyEvent
boolean sendKeyEvent(int type, int theEvent)(Code)



sendKeyEvent
boolean sendKeyEvent(int type, Event event)(Code)



setBounds
int setBounds(int control, int x, int y, int width, int height, boolean move, boolean resize, boolean events)(Code)



setData
public void setData(Object data)(Code)
Sets the application defined widget data associated with the receiver to be the argument. The widget data is a single, unnamed field that is stored with every widget.

Applications may put arbitrary objects in this field. If the object stored in the widget data needs to be notified when the widget is disposed of, it is the application's responsibility to hook the Dispose event on the widget and do so.


Parameters:
  data - the widget data
exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - when the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - when called from the wrong thread

See Also:   Widget.getData()



setData
public void setData(String key, Object value)(Code)
Sets the application defined property of the receiver with the specified name to the given value.

Applications may associate arbitrary objects with the receiver in this fashion. If the objects stored in the properties need to be notified when the widget is disposed of, it is the application's responsibility to hook the Dispose event on the widget and do so.


Parameters:
  key - the name of the property
Parameters:
  value - the new value for the property
exception:
  IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the key is null

exception:
  SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

See Also:   Widget.getData(String)



setInputState
boolean setInputState(Event event, int type, int chord, int modifiers)(Code)



setKeyState
boolean setKeyState(Event event, int type, int theEvent)(Code)



setVisible
void setVisible(int control, boolean visible)(Code)



setZOrder
void setZOrder(int control, int otheControl, boolean above)(Code)



textInputProc
int textInputProc(int nextHandler, int theEvent, int userData)(Code)



toRGBColor
RGBColor toRGBColor(float[] color)(Code)



toString
public String toString()(Code)
Returns a string containing a concise, human-readable description of the receiver. a string representation of the receiver



trackingProc
int trackingProc(int browser, int itemID, int property, int theRect, int startPt, int modifiers)(Code)



windowProc
int windowProc(int nextHandler, int theEvent, int userData)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.