|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.swt.widgets.Widget | +--org.eclipse.swt.widgets.Control | +--org.eclipse.swt.widgets.Scrollable | +--org.eclipse.swt.widgets.Composite | +--org.eclipse.swt.widgets.Canvas | +--org.eclipse.swt.widgets.Decorations
Safe:
Field Summary | |
(package private) Button |
defaultButton
|
(package private) int |
hAccel
|
(package private) int |
hIcon
|
(package private) static int |
ID_START
|
(package private) Image |
image
|
(package private) MenuItem[] |
items
|
(package private) Menu |
menuBar
|
(package private) Menu[] |
menus
|
(package private) int |
nAccel
|
(package private) Button |
saveDefault
|
(package private) Control |
savedFocus
|
(package private) int |
swFlags
|
Fields inherited from class org.eclipse.swt.widgets.Canvas |
caret |
Fields inherited from class org.eclipse.swt.widgets.Composite |
font, layout, lpwp, tabList |
Fields inherited from class org.eclipse.swt.widgets.Scrollable |
horizontalBar, verticalBar |
Fields inherited from class org.eclipse.swt.widgets.Control |
ACCENTS, accessible, background, drawCount, foreground, handle, hCursor, layoutData, menu, parent, toolTipText |
Fields inherited from class org.eclipse.swt.widgets.Widget |
CANVAS, COMCTL32_MAJOR, COMCTL32_MINOR, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DISABLED, DISPOSED, eventTable, HIDDEN, keys, MAJOR, MINOR, Mnemonic, state, style, values |
Constructor Summary | |
(package private) |
Decorations()
Prevents uninitialized instances from being created outside the package. |
|
Decorations(Composite parent,
int style)
Enabled: Constructs a new instance of this class given its parent and a style value describing its behavior and appearance. |
Method Summary | |
(package private) void |
add(Menu menu)
|
(package private) void |
add(MenuItem item)
|
(package private) void |
bringToTop()
|
(package private) static int |
checkStyle(int style)
|
protected void |
checkSubclass()
Checks that this class can be subclassed. |
(package private) Control |
computeTabGroup()
|
(package private) Control |
computeTabRoot()
|
Rectangle |
computeTrim(int x,
int y,
int width,
int height)
Enabled: |
(package private) void |
createAccelerators()
|
(package private) void |
createHandle()
|
(package private) void |
createWidget()
|
(package private) void |
destroyAccelerators()
|
(package private) Menu |
findMenu(int hMenu)
|
(package private) MenuItem |
findMenuItem(int id)
|
Rectangle |
getBounds()
Enabled: |
Rectangle |
getClientArea()
Enabled: |
Button |
getDefaultButton()
Enabled: Returns the receiver's default button if one had previously been set, otherwise returns null. |
Image |
getImage()
Enabled: Returns the receiver's image if it had previously been set using setImage() . |
Point |
getLocation()
Enabled: |
boolean |
getMaximized()
Enabled: Returns true if the receiver is currently
maximized, and false otherwise. |
Menu |
getMenuBar()
Enabled: Returns the receiver's menu bar if one had previously been set, otherwise returns null. |
boolean |
getMinimized()
Enabled: Returns true if the receiver is currently
minimized, and false otherwise. |
(package private) String |
getNameText()
|
Point |
getSize()
Enabled: |
String |
getText()
Enabled: Returns the receiver's text, which is the string that the window manager will typically display as the receiver's title. |
(package private) boolean |
isTabGroup()
|
(package private) boolean |
isTabItem()
|
(package private) Decorations |
menuShell()
|
(package private) void |
releaseWidget()
|
(package private) void |
remove(Menu menu)
|
(package private) void |
remove(MenuItem item)
|
(package private) boolean |
restoreFocus()
|
(package private) void |
saveFocus()
|
(package private) void |
setBounds(int x,
int y,
int width,
int height,
int flags)
|
void |
setDefaultButton(Button button)
Enabled: 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). |
(package private) void |
setDefaultButton(Button button,
boolean save)
|
boolean |
setFocus()
Suppressed: |
void |
setImage(Image image)
Enabled: Sets the receiver's image to the argument, which may be null. |
void |
setMaximized(boolean maximized)
Enabled: Sets the maximized state of the receiver. |
void |
setMenuBar(Menu menu)
Enabled: Sets the receiver's menu bar to the argument, which may be null. |
void |
setMinimized(boolean minimized)
Enabled: Sets the minimized stated of the receiver. |
(package private) void |
setParent()
|
(package private) void |
setPlacement(int x,
int y,
int width,
int height,
int flags)
|
(package private) void |
setSavedFocus(Control control)
|
(package private) void |
setSystemMenu()
|
void |
setText(String string)
Enabled: 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 may not be null. |
void |
setVisible(boolean visible)
Enabled: |
(package private) boolean |
translateAccelerator(org.eclipse.swt.internal.win32.MSG msg)
|
(package private) boolean |
traverseItem(boolean next)
|
(package private) boolean |
traverseReturn()
|
(package private) int |
widgetExtStyle()
|
(package private) int |
widgetStyle()
|
(package private) int |
windowProc(int msg,
int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_ACTIVATE(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_CLOSE(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_HOTKEY(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_KILLFOCUS(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_NCACTIVATE(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_QUERYOPEN(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_SETFOCUS(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_SIZE(int wParam,
int lParam)
|
(package private) org.eclipse.swt.internal.win32.LRESULT |
WM_WINDOWPOSCHANGING(int wParam,
int lParam)
|
Methods inherited from class org.eclipse.swt.widgets.Canvas |
clearArea, getCaret, scroll, setCaret, setFont |
Methods inherited from class org.eclipse.swt.widgets.Composite |
_getChildren, _getTabList, computeSize, computeTabList, getChildren, getChildrenCount, getLayout, getTabList, hooksKeys, layout, layout, minimumSize, moveAbove, moveBelow, releaseChildren, resizeChildren, resizeChildren, setLayout, setResizeChildren, setTabGroupFocus, setTabItemFocus, setTabList, toolTipText, translateMnemonic, updateFont, WM_ERASEBKGND, WM_GETDLGCODE, WM_GETFONT, WM_LBUTTONDOWN, WM_NOTIFY, WM_PAINT, WM_SETFONT, WM_SYSCOLORCHANGE, WM_SYSCOMMAND |
Methods inherited from class org.eclipse.swt.widgets.Scrollable |
callWindowProc, createScrollBar, getHorizontalBar, getVerticalBar, windowClass, windowProc, WM_HSCROLL, WM_MOUSEWHEEL, WM_VSCROLL, wmScroll |
Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, checkBits, checkParent, checkWidget, dispose, error, filters, getData, getData, getName, getStyle, hooks, isListening, isValidSubclass, isValidThread, mbcsToWcs, mbcsToWcs, notifyListeners, postEvent, postEvent, releaseChild, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, toString, wcsToMbcs, wcsToMbcs |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Image image
Menu menuBar
Menu[] menus
MenuItem[] items
Control savedFocus
Button defaultButton
Button saveDefault
int swFlags
int hAccel
int nAccel
int hIcon
static final int ID_START
Constructor Detail |
Decorations()
public Decorations(Composite parent, int style)
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 constructSWT.BORDER
,
SWT.CLOSE
,
SWT.MIN
,
SWT.MAX
,
SWT.RESIZE
,
SWT.TITLE
,
SWT.NO_TRIM
,
SWT.SHELL_TRIM
,
SWT.DIALOG_TRIM
,
SWT.ON_TOP
,
SWT.TOOL
,
Widget.checkSubclass()
,
Widget.getStyle()
Method Detail |
void add(Menu menu)
void add(MenuItem item)
void bringToTop()
static int checkStyle(int style)
protected void checkSubclass()
Widget
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.
checkSubclass
in class Composite
Control computeTabGroup()
computeTabGroup
in class Control
Control computeTabRoot()
computeTabRoot
in class Control
public Rectangle computeTrim(int x, int y, int width, int height)
computeTrim
in class Scrollable
Scrollable.getClientArea()
void createAccelerators()
void createHandle()
createHandle
in class Composite
void createWidget()
createWidget
in class Scrollable
void destroyAccelerators()
Menu findMenu(int hMenu)
MenuItem findMenuItem(int id)
public Rectangle getBounds()
getBounds
in class Control
public Rectangle getClientArea()
getClientArea
in class Scrollable
Scrollable.computeTrim(int, int, int, int)
public Button getDefaultButton()
setDefaultButton(org.eclipse.swt.widgets.Button)
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.
public Point getLocation()
getLocation
in class Control
public boolean getMaximized()
true
if the receiver is currently
maximized, and false otherwise.
setMaximized(boolean)
public Menu getMenuBar()
public boolean getMinimized()
true
if the receiver is currently
minimized, and false otherwise.
setMinimized(boolean)
String getNameText()
getNameText
in class Widget
public Point getSize()
getSize
in class Control
public String getText()
boolean isTabGroup()
isTabGroup
in class Control
boolean isTabItem()
isTabItem
in class Control
Decorations menuShell()
menuShell
in class Control
void releaseWidget()
releaseWidget
in class Canvas
void remove(Menu menu)
void remove(MenuItem item)
boolean restoreFocus()
void saveFocus()
void setBounds(int x, int y, int width, int height, int flags)
setBounds
in class Control
public void setDefaultButton(Button button)
void setDefaultButton(Button button, boolean save)
public boolean setFocus()
setFocus
in class Composite
true
if the control got focus, and false
if it was unable to.Control.forceFocus()
public void setImage(Image image)
image
- the new image (or null)public void setMaximized(boolean maximized)
true
causes the receiver
to switch to the maximized state, and if the argument is
false
and the receiver was previously maximized,
causes the receiver to switch back to either the minimized
or normal states.
Note: The result of intermixing calls tosetMaximized(true)
and setMinimized(true)
will vary by platform. Typically,
the behavior will match the platform user's expectations, but not
always. This should be avoided if possible.
setMinimized(boolean)
public void setMenuBar(Menu menu)
menu
- the new menu barpublic void setMinimized(boolean minimized)
true
causes the receiver
to switch to the minimized state, and if the argument is
false
and the receiver was previously minimized,
causes the receiver to switch back to either the maximized
or normal states.
Note: The result of intermixing calls tosetMaximized(true)
and setMinimized(true)
will vary by platform. Typically,
the behavior will match the platform user's expectations, but not
always. This should be avoided if possible.
setMaximized(boolean)
void setParent()
void setPlacement(int x, int y, int width, int height, int flags)
void setSavedFocus(Control control)
void setSystemMenu()
public void setText(String string)
public void setVisible(boolean visible)
setVisible
in class Control
visible
- the new visibility stateboolean translateAccelerator(org.eclipse.swt.internal.win32.MSG msg)
translateAccelerator
in class Control
boolean traverseItem(boolean next)
traverseItem
in class Control
boolean traverseReturn()
traverseReturn
in class Control
int widgetExtStyle()
widgetExtStyle
in class Scrollable
int widgetStyle()
widgetStyle
in class Composite
int windowProc(int msg, int wParam, int lParam)
windowProc
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_ACTIVATE(int wParam, int lParam)
WM_ACTIVATE
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_CLOSE(int wParam, int lParam)
WM_CLOSE
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_HOTKEY(int wParam, int lParam)
WM_HOTKEY
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_KILLFOCUS(int wParam, int lParam)
WM_KILLFOCUS
in class Canvas
org.eclipse.swt.internal.win32.LRESULT WM_NCACTIVATE(int wParam, int lParam)
WM_NCACTIVATE
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_QUERYOPEN(int wParam, int lParam)
WM_QUERYOPEN
in class Control
org.eclipse.swt.internal.win32.LRESULT WM_SETFOCUS(int wParam, int lParam)
WM_SETFOCUS
in class Canvas
org.eclipse.swt.internal.win32.LRESULT WM_SIZE(int wParam, int lParam)
WM_SIZE
in class Composite
org.eclipse.swt.internal.win32.LRESULT WM_WINDOWPOSCHANGING(int wParam, int lParam)
WM_WINDOWPOSCHANGING
in class Control
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |