com.novocode.naf.swt.custom
Class BalloonWindow
java.lang.Object
com.novocode.naf.swt.custom.BalloonWindow
public class BalloonWindow
- extends java.lang.Object
A Shell wrapper which creates balloon popup windows.
By default, a balloon window has no title bar or system controls.
The following styles are supported:
- SWT.ON_TOP - Keep the window on top of other windows
- SWT.TOOL - Add a drop shadow to the window (on supported platforms)
- SWT.CLOSE - Show a "close" control on the title bar (implies SWT.TITLE)
- SWT.TITLE - Show a title bar
- Since:
- Jul 2, 2004
- Version:
- $Id: BalloonWindow.java,v 1.4 2005/06/25 19:01:18 szeiger Exp $
- Author:
- Stefan Zeiger (szeiger@novocode.com)
|
Constructor Summary |
BalloonWindow(org.eclipse.swt.widgets.Display display,
int style)
|
BalloonWindow(org.eclipse.swt.widgets.Shell parent,
int style)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BalloonWindow
public BalloonWindow(org.eclipse.swt.widgets.Shell parent,
int style)
BalloonWindow
public BalloonWindow(org.eclipse.swt.widgets.Display display,
int style)
addSelectionControl
public void addSelectionControl(org.eclipse.swt.widgets.Control c)
- Adds a control to the list of controls which close the balloon window.
The background, title image and title text are included by default.
addListener
public void addListener(int type,
org.eclipse.swt.widgets.Listener l)
setAnchor
public void setAnchor(int anchor)
- Set the location of the anchor. This must be one of the following values:
SWT.NONE, SWT.LEFT|SWT.TOP, SWT.RIGHT|SWT.TOP, SWT.LEFT|SWT.BOTTOM, SWT.RIGHT|SWT.BOTTOM
setAutoAnchor
public void setAutoAnchor(boolean autoAnchor)
setLocation
public void setLocation(int x,
int y)
setLocation
public void setLocation(org.eclipse.swt.graphics.Point p)
setText
public void setText(java.lang.String title)
setImage
public void setImage(org.eclipse.swt.graphics.Image image)
setMargins
public void setMargins(int marginLeft,
int marginRight,
int marginTop,
int marginBottom)
setMargins
public void setMargins(int marginX,
int marginY)
setMargins
public void setMargins(int margin)
setTitleSpacing
public void setTitleSpacing(int titleSpacing)
setTitleWidgetSpacing
public void setTitleWidgetSpacing(int titleImageSpacing)
getShell
public org.eclipse.swt.widgets.Shell getShell()
getContents
public org.eclipse.swt.widgets.Composite getContents()
prepareForOpen
public void prepareForOpen()
open
public void open()
close
public void close()
setVisible
public void setVisible(boolean visible)