Modifier and Type | Method and Description |
---|---|
<T> T |
getAdapter(java.lang.Class<T> adapter)
Implementation of the
Adaptable interface. |
Button |
getDefaultButton()
Returns the receiver's default button if one had
previously been set, otherwise returns null.
|
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.
|
java.lang.String |
getText()
Returns the receiver's text, which is the string that the
window manager will typically display as the receiver's
title.
|
boolean |
isReparentable()
Returns
true if the underlying operating
system supports this reparenting, otherwise false |
void |
setDefaultButton(Button button)
If the argument is not null, sets the receiver's default
button to the argument, and if the argument is null, sets
the receiver's default button to the first button which
was set as the receiver's default button (called the
saved default button).
|
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.
|
void |
setText(java.lang.String text)
Sets the receiver's text, which is the string that the
window manager will typically display as the receiver's
title, to the argument, which must not be null.
|
addPaintListener, removePaintListener
changed, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addTouchListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, isEnabled, isFocusControl, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCursor, setData, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, update
addDisposeListener, addListener, checkSubclass, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, toString
public <T> T getAdapter(java.lang.Class<T> adapter)
Widget
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.
getAdapter
in interface Adaptable
getAdapter
in class Canvas
adapter
- the lookup classnull
if
there is no adapter associated with the given class.public void setImages(Image[] images)
images
- the new image arrayjava.lang.IllegalArgumentException
- SWTException
- public Image[] getImages()
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.
SWTException
- public void setImage(Image image)
image
- the new image (or null)java.lang.IllegalArgumentException
- SWTException
- public Image getImage()
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.
SWTException
- public void setText(java.lang.String text)
text
- the new textjava.lang.IllegalArgumentException
- SWTException
- public java.lang.String getText()
SWTException
- public void setMenuBar(Menu menuBar)
menuBar
- the new menu barjava.lang.IllegalArgumentException
- SWTException
- public Menu getMenuBar()
SWTException
- public boolean isReparentable()
Control
true
if the underlying operating
system supports this reparenting, otherwise false
isReparentable
in class Control
true
if the widget can be reparented, otherwise false
public void setDefaultButton(Button button)
The default button is the button that is selected when the receiver is active and the user presses ENTER.
button
- the new default buttonjava.lang.IllegalArgumentException
- SWTException
- public Button getDefaultButton()
SWTException
- setDefaultButton(Button)
Copyright (c) EclipseSource and others 2002, 2016.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0