Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.swt.widgets
Class Control  view Control download Control.java

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
Direct Known Subclasses:
Button, Label, ProgressBar, Sash, Scale, Scrollable, Slider

public abstract class Control
extends Widget
implements org.eclipse.swt.graphics.Drawable

Control is the abstract superclass of all windowed user interface classes.

Styles:
BORDER
LEFT_TO_RIGHT, RIGHT_TO_LEFT
Events:
FocusIn, FocusOut, Help, KeyDown, KeyUp, MouseDoubleClick, MouseDown, MouseEnter, MouseExit, MouseHover, MouseUp, MouseMove, Move, Paint, Resize, Traverse, DragDetect, MenuDetect

Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.

IMPORTANT: This class is intended to be subclassed only within the SWT implementation.


Field Summary
(package private)  org.eclipse.swt.accessibility.Accessible accessible
           
(package private)  org.eclipse.swt.graphics.Cursor cursor
           
(package private)  int drawCount
           
(package private)  long enableWindow
           
(package private)  long fixedHandle
           
(package private)  org.eclipse.swt.graphics.Font font
           
(package private)  java.lang.Object layoutData
           
(package private)  Menu menu
           
(package private)  Composite parent
           
(package private)  long redrawWindow
           
(package private)  java.lang.String toolTipText
           
 
Fields inherited from class org.eclipse.swt.widgets.Widget
ACTIVATE, BUTTON_PRESS_EVENT, BUTTON_RELEASE_EVENT, CANVAS, CHANGED, CLICKED, COMMIT, CONFIGURE_EVENT, data, DEFAULT_HEIGHT, DEFAULT_WIDTH, DELETE_EVENT, DELETE_RANGE, DELETE_TEXT, DISABLED, display, DISPOSED, ENTER_NOTIFY_EVENT, EVENT, EVENT_AFTER, eventTable, EXPOSE_EVENT, FOCUS, FOCUS_IN_EVENT, FOCUS_OUT_EVENT, handle, HANDLE, HIDE, INSERT_TEXT, KEY_PRESS_EVENT, KEY_RELEASE_EVENT, KEYED_DATA, LEAVE_NOTIFY_EVENT, MAP_EVENT, MENU, MNEMONIC_ACTIVATE, MOTION_NOTIFY_EVENT, OBSCURED, POPUP_MENU, PREEDIT_CHANGED, REALIZE, ROW_ACTIVATED, SCROLL_CHILD, SELECT, SHOW, SHOW_HELP, SIZE_ALLOCATE, state, style, STYLE_SET, SWITCH_PAGE, TEST_COLLAPSE_ROW, TEST_EXPAND_ROW, TOGGLED, UNMAP_EVENT, UNREALIZE, VALUE_CHANGED, VISIBILITY_NOTIFY_EVENT, WINDOW_STATE_EVENT
 
Constructor Summary
(package private) Control()
           
  Control(Composite parent, int style)
          Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.
 
Method Summary
(package private)  Shell _getShell()
           
 void addControlListener(org.eclipse.swt.events.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.
 void addFocusListener(org.eclipse.swt.events.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.
 void addHelpListener(org.eclipse.swt.events.HelpListener listener)
          Adds the listener to the collection of listeners who will be notified when help events are generated for the control, by sending it one of the messages defined in the HelpListener interface.
 void addKeyListener(org.eclipse.swt.events.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.
 void addMouseListener(org.eclipse.swt.events.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.
 void addMouseMoveListener(org.eclipse.swt.events.MouseMoveListener listener)
          Adds the listener to the collection of listeners who will be notified when the mouse moves, by sending it one of the messages defined in the MouseMoveListener interface.
 void addMouseTrackListener(org.eclipse.swt.events.MouseTrackListener listener)
          Adds the listener to the collection of listeners who will be notified when the mouse passes or hovers over controls, by sending it one of the messages defined in the MouseTrackListener interface.
 void addPaintListener(org.eclipse.swt.events.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.
 void addTraverseListener(org.eclipse.swt.events.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.
(package private)  org.eclipse.swt.graphics.Point computeNativeSize(long h, int wHint, int hHint, boolean changed)
           
 org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint)
          Returns the preferred size of the receiver.
 org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)
          Returns the preferred size of the receiver.
(package private)  Control computeTabGroup()
           
(package private)  Control[] computeTabList()
           
(package private)  Control computeTabRoot()
           
(package private)  void createWidget(int index)
           
(package private)  long defaultFont()
           
(package private)  void deregister()
           
(package private)  boolean drawGripper(int x, int y, int width, int height)
           
(package private)  void enableWidget(boolean enabled)
           
(package private)  long eventHandle()
           
(package private)  boolean filterKey(int keyval, long event)
           
(package private)  Menu[] findMenus(Control control)
           
(package private)  void fixChildren(Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu[] menus)
           
(package private)  void fixFocus(Control focusControl)
           
(package private)  long focusHandle()
           
(package private)  long fontHandle()
           
 boolean forceFocus()
          Forces the receiver to have the keyboard focus, causing all keyboard events to be delivered to it.
(package private)  boolean forceFocus(long focusHandle)
           
 org.eclipse.swt.accessibility.Accessible getAccessible()
          Returns the accessible object for the receiver.
 org.eclipse.swt.graphics.Color getBackground()
          Returns the receiver's background color.
(package private)  org.eclipse.swt.internal.gtk.GdkColor getBackgroundColor()
           
(package private)  org.eclipse.swt.internal.gtk.GdkColor getBaseColor()
           
(package private)  org.eclipse.swt.internal.gtk.GdkColor getBgColor()
           
 int getBorderWidth()
          Returns the receiver's border width.
 org.eclipse.swt.graphics.Rectangle getBounds()
          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.
 boolean getEnabled()
          Returns true if the receiver is enabled, and false otherwise.
(package private)  org.eclipse.swt.internal.gtk.GdkColor getFgColor()
           
 org.eclipse.swt.graphics.Font getFont()
          Returns the font that the receiver will use to paint textual information.
(package private)  long getFontDescription()
           
 org.eclipse.swt.graphics.Color getForeground()
          Returns the foreground color that the receiver will use to draw.
(package private)  org.eclipse.swt.internal.gtk.GdkColor getForegroundColor()
           
(package private)  org.eclipse.swt.graphics.Point getIMCaretPos()
           
 java.lang.Object getLayoutData()
          Returns layout data which is associated with the receiver.
 org.eclipse.swt.graphics.Point getLocation()
          Returns a point describing the receiver's location relative to its parent (or its display if its parent is null), unless the receiver is a shell.
 Menu getMenu()
          Returns the receiver's pop up menu if it has one, or null if it does not.
 Monitor getMonitor()
          Returns the receiver's monitor.
 Composite getParent()
          Returns the receiver's parent, which must be a Composite or null when the receiver is a shell that was created with null or a display for a parent.
(package private)  Control[] getPath()
           
 Shell getShell()
          Returns the receiver's shell.
 org.eclipse.swt.graphics.Point getSize()
          Returns a point describing the receiver's size.
(package private)  org.eclipse.swt.internal.gtk.GdkColor getTextColor()
           
 java.lang.String getToolTipText()
          Returns the receiver's tool tip text, or null if it has not been set.
 boolean getVisible()
          Returns true if the receiver is visible, and false otherwise.
(package private)  long gtk_button_press_event(long widget, long event)
           
(package private)  long gtk_button_release_event(long widget, long event)
           
(package private)  long gtk_commit(long imcontext, long text)
           
(package private)  long gtk_enter_notify_event(long widget, long event)
           
(package private)  long gtk_event_after(long widget, long gdkEvent)
           
(package private)  long gtk_expose_event(long widget, long eventPtr)
           
(package private)  long gtk_focus_in_event(long widget, long event)
           
(package private)  long gtk_focus_out_event(long widget, long event)
           
(package private)  long gtk_focus(long widget, long directionType)
           
(package private)  long gtk_key_press_event(long widget, long event)
           
(package private)  long gtk_key_release_event(long widget, long event)
           
(package private)  long gtk_leave_notify_event(long widget, long event)
           
(package private)  long gtk_mnemonic_activate(long widget, long arg1)
           
(package private)  long gtk_motion_notify_event(long widget, long event)
           
(package private)  long gtk_popup_menu(long widget)
           
(package private)  long gtk_preedit_changed(long imcontext)
           
(package private)  long gtk_realize(long widget)
           
(package private)  long gtk_show_help(long widget, long helpType)
           
(package private)  long gtk_unrealize(long widget)
           
(package private)  long gtk_visibility_notify_event(long widget, long event)
           
(package private)  boolean hasFocus()
           
(package private)  void hookEvents()
           
(package private)  long hoverProc(long widget)
           
(package private)  long imHandle()
           
 void internal_dispose_GC(long gdkGC, org.eclipse.swt.graphics.GCData data)
          Invokes platform specific functionality to dispose a GC handle.
 long internal_new_GC(org.eclipse.swt.graphics.GCData data)
          Invokes platform specific functionality to allocate a new GC handle.
 boolean isEnabled()
          Returns true if the receiver is enabled and all of the receiver's ancestors are enabled, and false otherwise.
(package private)  boolean isFocusAncestor(Control control)
           
 boolean isFocusControl()
          Returns true if the receiver has the user-interface focus, and false otherwise.
 boolean isReparentable()
          Returns true if the underlying operating system supports this reparenting, otherwise false
(package private)  boolean isShowing()
           
(package private)  boolean isTabGroup()
           
(package private)  boolean isTabItem()
           
 boolean isVisible()
          Returns true if the receiver is visible and all of the receiver's ancestors are visible and false otherwise.
(package private)  Decorations menuShell()
           
(package private)  boolean mnemonicHit(char key)
           
(package private)  boolean mnemonicMatch(char key)
           
 void moveAbove(Control control)
          Moves the receiver above the specified control in the drawing order.
 void moveBelow(Control control)
          Moves the receiver below the specified control in the drawing order.
(package private)  void moveHandle(int x, int y)
           
 void pack()
          Causes the receiver to be resized to its preferred size.
 void pack(boolean changed)
          Causes the receiver to be resized to its preferred size.
(package private)  long paintHandle()
           
(package private)  long paintWindow()
           
 void redraw()
          Causes the entire bounds of the receiver to be marked as needing to be redrawn.
 void redraw(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.
(package private)  void redrawWidget(int x, int y, int width, int height, boolean all)
           
(package private)  void register()
           
(package private)  void releaseChild()
           
(package private)  void releaseHandle()
           
(package private)  void releaseWidget()
           
 void removeControlListener(org.eclipse.swt.events.ControlListener listener)
          Removes the listener from the collection of listeners who will be notified when the control is moved or resized.
 void removeFocusListener(org.eclipse.swt.events.FocusListener listener)
          Removes the listener from the collection of listeners who will be notified when the control gains or loses focus.
 void removeHelpListener(org.eclipse.swt.events.HelpListener listener)
          Removes the listener from the collection of listeners who will be notified when the help events are generated for the control.
 void removeKeyListener(org.eclipse.swt.events.KeyListener listener)
          Removes the listener from the collection of listeners who will be notified when keys are pressed and released on the system keyboard.
 void removeMouseListener(org.eclipse.swt.events.MouseListener listener)
          Removes the listener from the collection of listeners who will be notified when mouse buttons are pressed and released.
 void removeMouseMoveListener(org.eclipse.swt.events.MouseMoveListener listener)
          Removes the listener from the collection of listeners who will be notified when the mouse moves.
 void removeMouseTrackListener(org.eclipse.swt.events.MouseTrackListener listener)
          Removes the listener from the collection of listeners who will be notified when the mouse passes or hovers over controls.
 void removePaintListener(org.eclipse.swt.events.PaintListener listener)
          Removes the listener from the collection of listeners who will be notified when the receiver needs to be painted.
 void removeTraverseListener(org.eclipse.swt.events.TraverseListener listener)
          Removes the listener from the collection of listeners who will be notified when traversal events occur.
(package private)  void resizeHandle(int width, int height)
           
(package private)  void sendFocusEvent(int type)
           
(package private)  boolean sendHelpEvent(long helpType)
           
(package private)  char[] sendIMKeyEvent(int type, org.eclipse.swt.internal.gtk.GdkEventKey keyEvent, char[] chars)
           
(package private)  boolean sendKeyEvent(int type, org.eclipse.swt.internal.gtk.GdkEventKey keyEvent)
           
(package private)  void sendMouseEvent(int type, int button, long eventPtr)
           
 void setBackground(org.eclipse.swt.graphics.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.
(package private)  void setBackgroundColor(org.eclipse.swt.internal.gtk.GdkColor color)
           
(package private)  void setBackgroundColor(long handle, org.eclipse.swt.internal.gtk.GdkColor color)
           
 void setBounds(int x, int y, int width, int height)
          Sets the receiver's size and location to the rectangular area specified by the arguments.
(package private)  boolean setBounds(int x, int y, int width, int height, boolean move, boolean resize)
           
 void setBounds(org.eclipse.swt.graphics.Rectangle rect)
          Sets the receiver's size and location to the rectangular area specified by the argument.
 void setCapture(boolean capture)
          If the argument is true, causes the receiver to have all mouse events delivered to it until the method is called with false as the argument.
 void setCursor(org.eclipse.swt.graphics.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.
(package private)  void setCursor(long cursor)
           
 void setEnabled(boolean enabled)
          Enables the receiver if the argument is true, and disables it otherwise.
 boolean setFocus()
          Causes the receiver to have the keyboard focus, such that all keyboard events will be delivered to it.
 void setFont(org.eclipse.swt.graphics.Font font)
          Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.
(package private)  void setFontDescription(long font)
           
 void setForeground(org.eclipse.swt.graphics.Color color)
          Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.
(package private)  void setForegroundColor(org.eclipse.swt.internal.gtk.GdkColor color)
           
(package private)  void setInitialSize()
           
 void setLayoutData(java.lang.Object layoutData)
          Sets the layout data associated with the receiver to the argument.
 void setLocation(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.
 void setLocation(org.eclipse.swt.graphics.Point location)
          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.
 void setMenu(Menu menu)
          Sets the receiver's pop up menu to the argument.
 boolean setParent(Composite parent)
          Changes the parent of the widget to be the one provided if the underlying operating system supports this feature.
(package private)  boolean setRadioSelection(boolean value)
           
 void setRedraw(boolean redraw)
          If the argument is false, causes subsequent drawing operations in the receiver to be ignored.
 void setSize(int width, int height)
          Sets the receiver's size to the point specified by the arguments.
 void setSize(org.eclipse.swt.graphics.Point size)
          Sets the receiver's size to the point specified by the argument.
(package private)  boolean setTabGroupFocus(boolean next)
           
(package private)  boolean setTabItemFocus(boolean next)
           
 void setToolTipText(java.lang.String string)
          Sets the receiver's tool tip text to the argument, which may be null indicating that no tool tip text should be shown.
 void setVisible(boolean visible)
          Marks the receiver as visible if the argument is true, and marks it invisible otherwise.
(package private)  void setZOrder(Control sibling, boolean above)
           
(package private)  void setZOrder(Control sibling, boolean above, boolean fixChildren)
           
(package private)  boolean showMenu(int x, int y)
           
(package private)  void sort(int[] items)
           
 org.eclipse.swt.graphics.Point toControl(int x, int y)
          Returns a point which is the result of converting the argument, which is specified in display relative coordinates, to coordinates relative to the receiver.
 org.eclipse.swt.graphics.Point toControl(org.eclipse.swt.graphics.Point point)
          Returns a point which is the result of converting the argument, which is specified in display relative coordinates, to coordinates relative to the receiver.
 org.eclipse.swt.graphics.Point toDisplay(int x, int y)
          Returns a point which is the result of converting the argument, which is specified in coordinates relative to the receiver, to display relative coordinates.
 org.eclipse.swt.graphics.Point toDisplay(org.eclipse.swt.graphics.Point point)
          Returns a point which is the result of converting the argument, which is specified in coordinates relative to the receiver, to display relative coordinates.
(package private)  long topHandle()
           
(package private)  boolean translateMnemonic(Event event, Control control)
           
(package private)  boolean translateMnemonic(int keyval, org.eclipse.swt.internal.gtk.GdkEventKey gdkEvent)
           
(package private)  boolean translateTraversal(org.eclipse.swt.internal.gtk.GdkEventKey keyEvent)
           
(package private)  int traversalCode(int key, org.eclipse.swt.internal.gtk.GdkEventKey event)
           
(package private)  boolean traverse(Event event)
           
 boolean traverse(int traversal)
          Based on the argument, perform one of the expected platform traversal action.
(package private)  boolean traverseEscape()
           
(package private)  boolean traverseGroup(boolean next)
           
(package private)  boolean traverseItem(boolean next)
           
(package private)  boolean traverseMnemonic(char key)
           
(package private)  boolean traversePage(boolean next)
           
(package private)  boolean traverseReturn()
           
 void update()
          Forces all outstanding paint requests for the widget to be processed before this method returns.
(package private)  void update(boolean all)
           
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkBits, checkOrientation, checkParent, checkSubclass, checkWidget, createHandle, destroyWidget, dispose, error, filterProc, filters, fixMnemonic, fontHeight, getData, getData, getDisplay, getName, getNameText, getStyle, gtk_activate, gtk_changed, gtk_clicked, gtk_configure_event, gtk_delete_event, gtk_delete_range, gtk_delete_text, gtk_event, gtk_hide, gtk_insert_text, gtk_map_event, gtk_row_activated, gtk_scroll_child, gtk_select, gtk_show, gtk_size_allocate, gtk_style_set, gtk_switch_page, gtk_test_collapse_row, gtk_test_expand_row, gtk_timer, gtk_toggled, gtk_unmap_event, gtk_value_changed, gtk_window_state_event, hooks, isDisposed, isListening, isValidSubclass, isValidThread, isValidWidget, menuPositionProc, mnemonicHit, mnemonicMatch, notifyListeners, pixbufCellDataProc, postEvent, postEvent, releaseResources, removeDisposeListener, removeListener, removeListener, sendEvent, sendEvent, sendEvent, sendEvent, setData, setData, setInputState, setKeyState, setOrientation, shellMapProc, textCellDataProc, timerProc, toString, translateTraversal, treeSelectionProc, windowProc, windowProc, windowProc, windowProc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fixedHandle

long fixedHandle

redrawWindow

long redrawWindow

enableWindow

long enableWindow

drawCount

int drawCount

parent

Composite parent

cursor

org.eclipse.swt.graphics.Cursor cursor

menu

Menu menu

font

org.eclipse.swt.graphics.Font font

toolTipText

java.lang.String toolTipText

layoutData

java.lang.Object layoutData

accessible

org.eclipse.swt.accessibility.Accessible accessible
Constructor Detail

Control

Control()

Control

public Control(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.

Method Detail

defaultFont

long defaultFont()

deregister

void deregister()
Overrides:
deregister in class Widget

drawGripper

boolean drawGripper(int x,
                    int y,
                    int width,
                    int height)

enableWidget

void enableWidget(boolean enabled)

eventHandle

long eventHandle()

fixFocus

void fixFocus(Control focusControl)

focusHandle

long focusHandle()

fontHandle

long fontHandle()

hasFocus

boolean hasFocus()

hookEvents

void hookEvents()
Overrides:
hookEvents in class Widget

hoverProc

long hoverProc(long widget)
Overrides:
hoverProc in class Widget

topHandle

long topHandle()
Overrides:
topHandle in class Widget

paintHandle

long paintHandle()

paintWindow

long paintWindow()

computeSize

public org.eclipse.swt.graphics.Point computeSize(int wHint,
                                                  int hHint)
Returns the preferred size of the receiver.

The preferred size of a control is the size that it would best be displayed at. The width hint and height hint arguments allow the caller to ask a control questions such as "Given a particular width, how high does the control need to be to show all of the contents?" To indicate that the caller does not wish to constrain a particular dimension, the constant SWT.DEFAULT is passed for the hint.


computeTabGroup

Control computeTabGroup()

computeTabList

Control[] computeTabList()

computeTabRoot

Control computeTabRoot()

createWidget

void createWidget(int index)
Overrides:
createWidget in class Widget

computeSize

public org.eclipse.swt.graphics.Point computeSize(int wHint,
                                                  int hHint,
                                                  boolean changed)
Returns the preferred size of the receiver.

The preferred size of a control is the size that it would best be displayed at. The width hint and height hint arguments allow the caller to ask a control questions such as "Given a particular width, how high does the control need to be to show all of the contents?" To indicate that the caller does not wish to constrain a particular dimension, the constant SWT.DEFAULT is passed for the hint.

If the changed flag is true, it indicates that the receiver's contents have changed, therefore any caches that a layout manager containing the control may have been keeping need to be flushed. When the control is resized, the changed flag will be false, so layout manager caches can be retained.


computeNativeSize

org.eclipse.swt.graphics.Point computeNativeSize(long h,
                                                 int wHint,
                                                 int hHint,
                                                 boolean changed)

getAccessible

public org.eclipse.swt.accessibility.Accessible getAccessible()
Returns the accessible object for the receiver. If this is the first time this object is requested, then the object is created and returned.

Since:
2.0

getBounds

public org.eclipse.swt.graphics.Rectangle getBounds()
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. In this case, the location is relative to the display.


setBounds

public void setBounds(org.eclipse.swt.graphics.Rectangle rect)
Sets the receiver's size and location to the rectangular area specified by the argument. The x and y fields of the rectangle are relative to the receiver's parent (or its display if its parent is null).

Note: Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead.


setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Sets the receiver's size and location to the rectangular area specified by the arguments. The x and y arguments are relative to the receiver's parent (or its display if its parent is null), unless the receiver is a shell. In this case, the x and y arguments are relative to the display.

Note: Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead.


moveHandle

void moveHandle(int x,
                int y)

resizeHandle

void resizeHandle(int width,
                  int height)

setBounds

boolean setBounds(int x,
                  int y,
                  int width,
                  int height,
                  boolean move,
                  boolean resize)

getLocation

public org.eclipse.swt.graphics.Point getLocation()
Returns a point describing the receiver's location relative to its parent (or its display if its parent is null), unless the receiver is a shell. In this case, the point is relative to the display.


setLocation

public void setLocation(org.eclipse.swt.graphics.Point location)
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. In this case, the point is relative to the display.


setLocation

public void setLocation(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. In this case, the point is relative to the display.


getSize

public org.eclipse.swt.graphics.Point getSize()
Returns a point describing the receiver's size. The x coordinate of the result is the width of the receiver. The y coordinate of the result is the height of the receiver.


setSize

public void setSize(org.eclipse.swt.graphics.Point size)
Sets the receiver's size to the point specified by the argument.

Note: Attempting to set the width or height of the receiver to a negative number will cause them to be set to zero instead.


setSize

public void setSize(int width,
                    int height)
Sets the receiver's size to the point specified by the arguments.

Note: Attempting to set the width or height of the receiver to a negative number will cause that value to be set to zero instead.


moveAbove

public void moveAbove(Control control)
Moves the receiver above the specified control in the drawing order. If the argument is null, then the receiver is moved to the top of the drawing order. The control at the top of the drawing order will not be covered by other controls even if they occupy intersecting areas.


moveBelow

public void moveBelow(Control control)
Moves the receiver below the specified control in the drawing order. If the argument is null, then the receiver is moved to the bottom of the drawing order. The control at the bottom of the drawing order will be covered by all other controls which occupy intersecting areas.


pack

public void pack()
Causes the receiver to be resized to its preferred size. For a composite, this involves computing the preferred size from its layout, if there is one.


pack

public void pack(boolean changed)
Causes the receiver to be resized to its preferred size. For a composite, this involves computing the preferred size from its layout, if there is one.

If the changed flag is true, it indicates that the receiver's contents have changed, therefore any caches that a layout manager containing the control may have been keeping need to be flushed. When the control is resized, the changed flag will be false, so layout manager caches can be retained.


setLayoutData

public