com.novocode.naf.swt.custom
Class BalloonWindow

java.lang.Object
  extended by 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:

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)
           
 
Method Summary
 void addListener(int type, org.eclipse.swt.widgets.Listener l)
           
 void addSelectionControl(org.eclipse.swt.widgets.Control c)
          Adds a control to the list of controls which close the balloon window.
 void close()
           
 org.eclipse.swt.widgets.Composite getContents()
           
 org.eclipse.swt.widgets.Shell getShell()
           
 void open()
           
 void prepareForOpen()
           
 void setAnchor(int anchor)
          Set the location of the anchor.
 void setAutoAnchor(boolean autoAnchor)
           
 void setImage(org.eclipse.swt.graphics.Image image)
           
 void setLocation(int x, int y)
           
 void setLocation(org.eclipse.swt.graphics.Point p)
           
 void setMargins(int margin)
           
 void setMargins(int marginX, int marginY)
           
 void setMargins(int marginLeft, int marginRight, int marginTop, int marginBottom)
           
 void setText(java.lang.String title)
           
 void setTitleSpacing(int titleSpacing)
           
 void setTitleWidgetSpacing(int titleImageSpacing)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BalloonWindow

public BalloonWindow(org.eclipse.swt.widgets.Shell parent,
                     int style)

BalloonWindow

public BalloonWindow(org.eclipse.swt.widgets.Display display,
                     int style)
Method Detail

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)