Java org.eclipse.swt.widgets Canvas fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.swt.widgets Canvas fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.swt.widgets Canvas.

The text is from its open source code.

Subclass

org.eclipse.swt.widgets.Canvas has subclasses.
Click this link to see all its subclasses.

Constructor

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

Method

voidaddControlListener(ControlListener listener)
Adds the listener to the collection of listeners who will be notified when the control is moved or resized, by sending it one of the messages defined in the ControlListener interface.
voidaddDisposeListener(DisposeListener listener)
Adds the listener to the collection of listeners who will be notified when the widget is disposed.
voidaddFocusListener(FocusListener listener)
Adds the listener to the collection of listeners who will be notified when the control gains or loses focus, by sending it one of the messages defined in the FocusListener interface.
voidaddKeyListener(KeyListener listener)
Adds the listener to the collection of listeners who will be notified when keys are pressed and released on the system keyboard, by sending it one of the messages defined in the KeyListener interface.
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.
voidaddMouseListener(MouseListener listener)
Adds the listener to the collection of listeners who will be notified when mouse buttons are pressed and released, by sending it one of the messages defined in the MouseListener interface.
voidaddPaintListener(PaintListener listener)
Adds the listener to the collection of listeners who will be notified when the receiver needs to be painted, by sending it one of the messages defined in the PaintListener interface.
voidaddTraverseListener(TraverseListener listener)
Adds the listener to the collection of listeners who will be notified when traversal events occur, by sending it one of the messages defined in the TraverseListener interface.
AccessiblegetAccessible()
Returns the accessible object for the receiver.
RectanglegetBounds()
Returns a rectangle describing the receiver's size and location relative to its parent (or its display if its parent is null), unless the receiver is a shell.
RectanglegetClientArea()
Returns a rectangle which describes the area of the receiver which is capable of displaying data (that is, not covered by the "trimmings").
ObjectgetData(String key)
Returns the application defined property of the receiver with the specified name, or null if it has not been set.
DisplaygetDisplay()
Returns the Display that is associated with the receiver.
ScrollBargetHorizontalBar()
Returns the receiver's horizontal scroll bar if it has one, and null if it does not.
PointgetSize()
Returns a point describing the receiver's size.
ScrollBargetVerticalBar()
Returns the receiver's vertical scroll bar if it has one, and null if it does not.
booleanisDisposed()
Returns true if the widget has been disposed, and false otherwise.
booleanisFocusControl()
Returns true if the receiver has the user-interface focus, and false otherwise.
voidredraw()
Causes the entire bounds of the receiver to be marked as needing to be redrawn.
voidredraw(int x, int y, int width, int height, boolean all)
Causes the rectangular area of the receiver specified by the arguments to be marked as needing to be redrawn.
voidsetBackground(Color color)
Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.
voidsetBounds(int x, int y, int width, int height)
Sets the receiver's size and location to the rectangular area specified by the arguments.
voidsetBounds(Rectangle bounds)
Sets the receiver's size and location to the rectangular area specified by the argument.
voidsetCursor(Cursor cursor)
Sets the receiver's cursor to the cursor specified by the argument, or to the default cursor for that kind of control if the argument is null.
voidsetData(String key, Object value)
booleansetFocus()
voidsetLayoutData(Object layoutData)
Sets the layout data associated with the receiver to the argument.
voidsetLocation(int x, int y)
Sets the receiver's location to the point specified by the arguments which are relative to the receiver's parent (or its display if its parent is null), unless the receiver is a shell.
voidsetSize(int width, int height)
Sets the receiver's size to the point specified by the arguments.
voidupdate()
Forces all outstanding paint requests for the widget to be processed before this method returns.