public abstract class PopUpHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Control |
control
The Control this PopUpHelper's tooltip will belong to.
|
protected int |
shellStyle
These style bits should be used when creating the Shell.
|
Modifier | Constructor and Description |
---|---|
protected |
PopUpHelper(Control c)
Constructs a PopUpHelper to assist with popups on Control c.
|
protected |
PopUpHelper(Control c,
int shellStyle)
Constructs a PopUpHelper to display the given shell style popup.
|
Modifier and Type | Method and Description |
---|---|
protected LightweightSystem |
createLightweightSystem()
Creates and returns the LightweightSystem object used by PopUpHelper to
draw upon.
|
protected Shell |
createShell()
Creates a new Shell object with the style specified for this helper.
|
void |
dispose()
Dispose of this PopUpHelper object.
|
protected LightweightSystem |
getLightweightSystem()
Returns this PopUpHelper's LightweightSystem.
|
protected Shell |
getShell()
Returns this PopUpHelper's shell.
|
protected Dimension |
getShellTrimSize()
Returns the size needed to display the shell's trim.
|
protected void |
hide()
Hides this PopUpHelper's Shell.
|
protected abstract void |
hookShellListeners()
Desired popup helper behavior is achieved by writing listeners that
manipulate the behavior of the PopUpHelper's Shell.
|
boolean |
isShowing()
Returns
true if this PopUpHelper's Shell is visible,
false otherwise. |
void |
setBackgroundColor(Color c)
Sets the background color of this PopUpHelper's Shell.
|
void |
setForegroundColor(Color c)
Sets the foreground color of this PopUpHelper's Shell.
|
protected void |
setShellBounds(int x,
int y,
int width,
int height)
Sets the bounds on this PopUpHelper's Shell.
|
protected void |
show()
Displays this PopUpHelper's Shell.
|
protected Control control
protected final int shellStyle
createShell()
protected PopUpHelper(Control c)
c
- the Controlprotected PopUpHelper(Control c, int shellStyle)
c
- the control on which the popup is active.shellStyle
- the SWT style bits for the shellprotected LightweightSystem createLightweightSystem()
protected Shell createShell()
public void dispose()
protected Shell getShell()
protected Dimension getShellTrimSize()
protected LightweightSystem getLightweightSystem()
protected void hide()
protected abstract void hookShellListeners()
public boolean isShowing()
true
if this PopUpHelper's Shell is visible,
false
otherwise.true
if this PopUpHelper's Shell is visiblepublic void setBackgroundColor(Color c)
c
- the new background colorpublic void setForegroundColor(Color c)
c
- the new foreground colorprotected void setShellBounds(int x, int y, int width, int height)
x
- the x coordinatey
- the y coordinatewidth
- the widthheight
- the heightprotected void show()
Copyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.