Composite or Display.
These rectangles can be specified to respond to mouse and key events
by either moving or resizing themselves accordingly. Trackers are
typically used to represent window geometries in a lightweight manner.
Note
Rectangle move behavior is assumed unless RESIZE is specified.
Important Note
This class is not intended to be subclassed.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Rectangle | |
| pack-priv Boolean | |
| pack-priv Rectangle | |
| pack-priv Rectangle | |
| pack-priv boolean | |
| pack-priv Cursor | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv long | |
| pack-priv int | |
| pack-priv int | |
| pack-priv long | |
| pack-priv Composite | |
| pack-priv Rectangle[] | |
| pack-priv long | |
| pack-priv Rectangle[] | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv boolean | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addControlListener(ControlListener
the listener which should be notified 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 |
| public void | addKeyListener(KeyListener
the listener which should be notified 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 |
| pack-priv Point | |
| pack-priv Point | |
| pack-priv static int | |
| public void | |
| pack-priv Rectangle | |
| pack-priv Rectangle[] | |
| pack-priv void | drawRectangles(Rectangle[] rects)
Developer note: - Rectangles can have absolute coords [Tracker(Display)] or relative to parent [Tracker(Composite)] - This method is called a lot, optimize your code. |
| public Rectangle[] | Returns: the bounds of the Rectangles being drawnReturns the bounds that are being drawn, expressed relative to the parent widget. |
| pack-priv Rectangle[] | |
| public boolean | Returns: the stippled effect of the rectanglesReturns |
| pack-priv boolean | |
| pack-priv long | gtk_button_release_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_key_press_event(long widget, long eventPtr)
Overrides org. |
| pack-priv long | gtk_motion_notify_event(long widget, long eventPtr)
Overrides org. |
| pack-priv long | |
| pack-priv void | |
| public boolean | Returns: true if the user did not cancel the Tracker, false otherwiseDisplays the Tracker rectangles for manipulation by the user. |
| pack-priv boolean | |
| pack-priv void | |
| public void | removeControlListener(ControlListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when the control is moved or resized. |
| public void | removeKeyListener(KeyListener
the listener which should no longer be notified listener)Removes the listener from the collection of listeners who will be notified when keys are pressed and released on the system keyboard. |
| pack-priv void | |
| public void | |
| public void | setRectangles(Rectangle[]
the bounds of the rectangles to be drawn rectangles)Specifies the rectangles that should be drawn, expressed relative to the parent widget. |
| pack-priv void | |
| public void | setStippled(boolean
true if rectangle should appear stippledChanges the appearance of the line used to draw the rectangles. |
| private void | |
| pack-priv void | |
| pack-priv void |
| bounds | back to summary |
|---|---|
| pack-priv Rectangle bounds | |
| cachedBackgroundIsOpaque | back to summary |
|---|---|
| pack-priv Boolean cachedBackgroundIsOpaque | |
| cachedCombinedDisplayResolution | back to summary |
|---|---|
| pack-priv Rectangle cachedCombinedDisplayResolution | |
| cachedUnion | back to summary |
|---|---|
| pack-priv Rectangle cachedUnion | |
| cancelled | back to summary |
|---|---|
| pack-priv boolean cancelled | |
| cursor | back to summary |
|---|---|
| pack-priv Cursor cursor | |
| cursorOrientation | back to summary |
|---|---|
| pack-priv int cursorOrientation | |
| grabbed | back to summary |
|---|---|
| pack-priv boolean grabbed | |
| lastCursor | back to summary |
|---|---|
| pack-priv long lastCursor | |
| oldX | back to summary |
|---|---|
| pack-priv int oldX | |
| oldY | back to summary |
|---|---|
| pack-priv int oldY | |
| overlay | back to summary |
|---|---|
| pack-priv long overlay | |
| parent | back to summary |
|---|---|
| pack-priv Composite parent | |
| proportions | back to summary |
|---|---|
| pack-priv Rectangle[] proportions | |
| provider | back to summary |
|---|---|
| pack-priv long provider | |
| rectangles | back to summary |
|---|---|
| pack-priv Rectangle[] rectangles | |
| STEPSIZE_LARGE | back to summary |
|---|---|
| pack-priv static final int STEPSIZE_LARGE | |
| STEPSIZE_SMALL | back to summary |
|---|---|
| pack-priv static final int STEPSIZE_SMALL | |
| stippled | back to summary |
|---|---|
| pack-priv boolean stippled | |
| surface | back to summary |
|---|---|
| pack-priv long surface | |
| tracking | back to summary |
|---|---|
| pack-priv boolean tracking | |
| window | back to summary |
|---|---|
| pack-priv long window | |
| Tracker | back to summary |
|---|---|
| public Tracker(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
| |
| Tracker | back to summary |
|---|---|
| public Tracker(Display display, int style) Constructs a new instance of this class given the display to create it on and a style value describing its behavior and appearance.
The style value is either one of the style constants defined in
class Note Currently, null can be passed in for the display argument. This has the effect of creating the tracker on the currently active display if there is one. If there is no current display, the tracker is created on a "default" display. Passing in null as the display argument is not considered to be good coding style, and may not be supported in a future release of SWT.
| |
| addControlListener | back to summary |
|---|---|
| public void addControlListener(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
| |
| addKeyListener | back to summary |
|---|---|
| public void addKeyListener(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
| |
| adjustMoveCursor | back to summary |
|---|---|
| pack-priv Point adjustMoveCursor() | |
| adjustResizeCursor | back to summary |
|---|---|
| pack-priv Point adjustResizeCursor() | |
| checkStyle | back to summary |
|---|---|
| pack-priv static int checkStyle(int style) | |
| close | back to summary |
|---|---|
| public void close() Stops displaying the tracker rectangles. Note that this is not considered to be a cancelation by the user.
| |
| computeBounds | back to summary |
|---|---|
| pack-priv Rectangle computeBounds() | |
| computeProportions | back to summary |
|---|---|
| pack-priv Rectangle[] computeProportions(Rectangle[] rects) | |
| drawRectangles | back to summary |
|---|---|
| pack-priv void drawRectangles(Rectangle[] rects) Developer note: - Rectangles can have absolute coords [Tracker(Display)] or relative to parent [Tracker(Composite)] - This method is called a lot, optimize your code. - Note, region != rectangle. A region can have a non-squared form, e.g an 'L' shape. | |
| getRectangles | back to summary |
|---|---|
| public Rectangle[] getRectangles() Returns the bounds that are being drawn, expressed relative to the parent
widget. If the parent is a
| |
| getRectanglesInPixels | back to summary |
|---|---|
| pack-priv Rectangle[] getRectanglesInPixels() | |
| getStippled | back to summary |
|---|---|
| public boolean getStippled() Returns
| |
| grab | back to summary |
|---|---|
| pack-priv boolean grab() | |
| gtk_button_release_event | back to summary |
|---|---|
| pack-priv long gtk_button_release_event(long widget, long event) Overrides org.
| |
| gtk_key_press_event | back to summary |
|---|---|
| pack-priv long gtk_key_press_event(long widget, long eventPtr) Overrides org.
| |
| gtk_motion_notify_event | back to summary |
|---|---|
| pack-priv long gtk_motion_notify_event(long widget, long eventPtr) Overrides org.
| |
| gtk_mouse | back to summary |
|---|---|
| pack-priv long gtk_mouse(int eventType, long widget, long eventPtr) | |
| moveRectangles | back to summary |
|---|---|
| pack-priv void moveRectangles(int xChange, int yChange) | |
| open | back to summary |
|---|---|
| public boolean open() Displays the Tracker rectangles for manipulation by the user. Returns when the user has either finished manipulating the rectangles or has cancelled the Tracker.
| |
| processEvent | back to summary |
|---|---|
| pack-priv boolean processEvent(long eventPtr) | |
| releaseWidget | back to summary |
|---|---|
| pack-priv void releaseWidget() Overrides org.
| |
| removeControlListener | back to summary |
|---|---|
| public void removeControlListener(ControlListener listener) Removes the listener from the collection of listeners who will be notified when the control is moved or resized.
| |
| removeKeyListener | back to summary |
|---|---|
| public void removeKeyListener(KeyListener listener) Removes the listener from the collection of listeners who will be notified when keys are pressed and released on the system keyboard.
| |
| resizeRectangles | back to summary |
|---|---|
| pack-priv void resizeRectangles(int xChange, int yChange) | |
| setCursor | back to summary |
|---|---|
| public void setCursor(Cursor newCursor) Sets the
| |
| setRectangles | back to summary |
|---|---|
| public void setRectangles(Rectangle[] rectangles) Specifies the rectangles that should be drawn, expressed relative to the parent widget. If the parent is a Display then these are screen coordinates.
| |
| setRectanglesInPixels | back to summary |
|---|---|
| pack-priv void setRectanglesInPixels(Rectangle[] rectangles) | |
| setStippled | back to summary |
|---|---|
| public void setStippled(boolean stippled) Changes the appearance of the line used to draw the rectangles.
| |
| setTrackerBackground | back to summary |
|---|---|
| private void setTrackerBackground(boolean opaque) | |
| ungrab | back to summary |
|---|---|
| pack-priv void ungrab() | |
| update | back to summary |
|---|---|
| pack-priv void update() | |