Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Rich Ajax Platform
Release 1.2

Class Canvas

  extended by

      extended by

          extended by

              extended by

                  extended by
All Implemented Interfaces:
Direct Known Subclasses:
CLabel, Decorations

public class Canvas
extends Composite

This class serves as a base class for custom widgets. It does not yet provides any drawing capabilities.


This class may be subclassed by custom control implementors who are building controls that are not constructed from aggregates of other controls.

See Also:

Constructor Summary
Canvas ( Composite parent, int style)
          Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
Methods inherited from class org.eclipse.swt.widgets. Composite
changed, computeSize, getAdapter, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setTabList
Methods inherited from class org.eclipse.swt.widgets. Scrollable
computeTrim, getClientArea
Methods inherited from class org.eclipse.swt.widgets. Control
addControlListener, addFocusListener, addKeyListener, addMouseListener, addTraverseListener, computeSize, forceFocus, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, isEnabled, isFocusControl, isVisible, moveAbove, moveBelow, pack, pack, redraw, removeControlListener, removeFocusListener, removeKeyListener, removeMouseListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay
Methods inherited from class org.eclipse.swt.widgets. Widget
addDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, notifyListeners, removeDisposeListener, removeListener, setData, setData, toString
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public Canvas(
Composite 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. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.

parent - a composite control which will be the parent of the new instance (cannot be null)
style - the style of control to construct
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the parent is null
SWTException -
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
See Also:
SWT, Widget.checkSubclass(), Widget.getStyle()

Eclipse Rich Ajax Platform
Release 1.2

Copyright (c) Innoopract Informationssysteme GmbH and others 2002, 2008. All rights reserved.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire