Eclipse Rich Ajax Platform
Release 1.3

org.eclipse.swt.widgets
Class Decorations

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended byorg.eclipse.swt.widgets.Canvas
                      extended byorg.eclipse.swt.widgets.Decorations
All Implemented Interfaces:
Adaptable
Direct Known Subclasses:
Shell

public class Decorations
extends Canvas

This class was introduced to be API compatible with SWT and does only provide those methods that are absolutely necessary to serve this purpose.


Method Summary
 Object getAdapter(Class adapter)
          Implementation of the Adaptable interface.
 Image getImage()
          Returns the receiver's image if it had previously been set using setImage().
 Image[] getImages()
          Returns the receiver's images if they had previously been set using setImages().
 Menu getMenuBar()
          Returns the receiver's menu bar if one had previously been set, otherwise returns null.
 void setImage(Image image)
          Sets the receiver's image to the argument, which may be null.
 void setImages(Image[] images)
          Sets the receiver's images to the argument, which may be an empty array.
 void setMenuBar(Menu menuBar)
          Sets the receiver's menu bar to the argument, which may be null.
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addTraverseListener, computeSize, forceFocus, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getAdapter

public Object getAdapter(Class adapter)
Description copied from class: Widget
Implementation of the Adaptable interface.

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

Specified by:
getAdapter in interface Adaptable
Overrides:
getAdapter in class Composite

setImages

public void setImages(Image[] images)
Sets the receiver's images to the argument, which may be an empty array. Images are typically displayed by the window manager when the instance is marked as iconified, and may also be displayed somewhere in the trim when the instance is in normal or maximized states. Depending where the icon is displayed, the platform chooses the icon with the "best" attributes. It is expected that the array will contain the same icon rendered at different sizes, with different depth and transparency attributes.

Parameters:
images - the new image array
Throws:
IllegalArgumentException -
  • ERROR_NULL_ARGUMENT - if the array of images is null
  • ERROR_INVALID_ARGUMENT - if one of the images is null or has been disposed
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since:
1.3

getImages

public Image[] getImages()
Returns the receiver's images if they had previously been set using setImages(). Images are typically displayed by the window manager when the instance is marked as iconified, and may also be displayed somewhere in the trim when the instance is in normal or maximized states. Depending where the icon is displayed, the platform chooses the icon with the "best" attributes. It is expected that the array will contain the same icon rendered at different sizes, with different depth and transparency attributes.

Note: This method will return an empty array if called before setImages() is called. It does not provide access to a window manager provided, "default" image even if one exists.

Returns:
the images
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
Since:
1.3

setImage

public void setImage(Image image)
Sets the receiver's image to the argument, which may be null. The image is typically displayed by the window manager when the instance is marked as iconified, and may also be displayed somewhere in the trim when the instance is in normal or maximized states.

Parameters:
image - the new image (or null)
Throws:
IllegalArgumentException -
  • ERROR_INVALID_ARGUMENT - if the image has been disposed
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

getImage

public Image getImage()
Returns the receiver's image if it had previously been set using setImage(). The image is typically displayed by the window manager when the instance is marked as iconified, and may also be displayed somewhere in the trim when the instance is in normal or maximized states.

Note: This method will return null if called before setImage() is called. It does not provide access to a window manager provided, "default" image even if one exists.

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

setMenuBar

public void setMenuBar(Menu menuBar)
Sets the receiver's menu bar to the argument, which may be null.

Parameters:
menuBar - the new menu bar
Throws:
IllegalArgumentException -
  • ERROR_INVALID_ARGUMENT - if the menu has been disposed
  • ERROR_INVALID_PARENT - if the menu is not in the same widget tree
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

getMenuBar

public Menu getMenuBar()
Returns the receiver's menu bar if one had previously been set, otherwise returns null.

Returns:
the menu bar or null
Throws:
SWTException -
  • ERROR_WIDGET_DISPOSED - if the receiver has been disposed
  • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver

Eclipse Rich Ajax Platform
Release 1.3

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