org.eclipse.cdt.internal.ui.text
Class AbstractInformationControl

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.PopupDialog
          extended by org.eclipse.cdt.internal.ui.text.AbstractInformationControl
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.text.IInformationControl, org.eclipse.jface.text.IInformationControlExtension, org.eclipse.jface.text.IInformationControlExtension2, org.eclipse.jface.window.IShellProvider, org.eclipse.swt.events.DisposeListener, org.eclipse.swt.internal.SWTEventListener
Direct Known Subclasses:
COutlineInformationControl, THInformationControl

public abstract class AbstractInformationControl
extends org.eclipse.jface.dialogs.PopupDialog
implements org.eclipse.jface.text.IInformationControl, org.eclipse.jface.text.IInformationControlExtension, org.eclipse.jface.text.IInformationControlExtension2, org.eclipse.swt.events.DisposeListener

Abstract class for "quick" views in light-weight controls.

Since:
4.0

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.jface.dialogs.PopupDialog
HOVER_SHELLSTYLE, INFOPOPUP_SHELLSTYLE, INFOPOPUPRESIZE_SHELLSTYLE, POPUP_HORIZONTALSPACING, POPUP_MARGINHEIGHT, POPUP_MARGINWIDTH, POPUP_VERTICALSPACING
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
AbstractInformationControl(org.eclipse.swt.widgets.Shell parent, int shellStyle, int treeStyle)
          Creates a tree information control with the given shell as parent.
AbstractInformationControl(org.eclipse.swt.widgets.Shell parent, int shellStyle, int treeStyle, java.lang.String invokingCommandId, boolean showStatusField)
          Creates a tree information control with the given shell as parent.
 
Method Summary
 void addDisposeListener(org.eclipse.swt.events.DisposeListener listener)
          
 void addFocusListener(org.eclipse.swt.events.FocusListener listener)
          
 org.eclipse.swt.graphics.Point computeSizeHint()
          
 void dispose()
          
 boolean hasContents()
          
 boolean isFocusControl()
          
 void removeDisposeListener(org.eclipse.swt.events.DisposeListener listener)
          
 void removeFocusListener(org.eclipse.swt.events.FocusListener listener)
          
 void setBackgroundColor(org.eclipse.swt.graphics.Color background)
          
 void setFocus()
          
 void setForegroundColor(org.eclipse.swt.graphics.Color foreground)
          
 void setInformation(java.lang.String information)
          
abstract  void setInput(java.lang.Object information)
          
 void setLocation(org.eclipse.swt.graphics.Point location)
          
 void setSize(int width, int height)
          
 void setSizeConstraints(int maxWidth, int maxHeight)
          
 void setVisible(boolean visible)
          
 void widgetDisposed(org.eclipse.swt.events.DisposeEvent event)
          
 
Methods inherited from class org.eclipse.jface.dialogs.PopupDialog
close, open
 
Methods inherited from class org.eclipse.jface.window.Window
create, getDefaultImage, getDefaultImages, getDefaultOrientation, getReturnCode, getShell, getWindowManager, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setWindowManager
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInformationControl

public AbstractInformationControl(org.eclipse.swt.widgets.Shell parent,
                                  int shellStyle,
                                  int treeStyle,
                                  java.lang.String invokingCommandId,
                                  boolean showStatusField)
Creates a tree information control with the given shell as parent. The given styles are applied to the shell and the tree widget.

Parameters:
parent - the parent shell
shellStyle - the additional styles for the shell
treeStyle - the additional styles for the tree widget
invokingCommandId - the id of the command that invoked this control or null
showStatusField - true iff the control has a status field at the bottom

AbstractInformationControl

public AbstractInformationControl(org.eclipse.swt.widgets.Shell parent,
                                  int shellStyle,
                                  int treeStyle)
Creates a tree information control with the given shell as parent. The given styles are applied to the shell and the tree widget.

Parameters:
parent - the parent shell
shellStyle - the additional styles for the shell
treeStyle - the additional styles for the tree widget
Method Detail

setInformation

public void setInformation(java.lang.String information)

Specified by:
setInformation in interface org.eclipse.jface.text.IInformationControl

setInput

public abstract void setInput(java.lang.Object information)

Specified by:
setInput in interface org.eclipse.jface.text.IInformationControlExtension2

setVisible

public void setVisible(boolean visible)

Specified by:
setVisible in interface org.eclipse.jface.text.IInformationControl

dispose

public final void dispose()

Specified by:
dispose in interface org.eclipse.jface.text.IInformationControl

widgetDisposed

public void widgetDisposed(org.eclipse.swt.events.DisposeEvent event)

Specified by:
widgetDisposed in interface org.eclipse.swt.events.DisposeListener
Parameters:
event - can be null

Subclasses may extend.


hasContents

public boolean hasContents()

Specified by:
hasContents in interface org.eclipse.jface.text.IInformationControlExtension

setSizeConstraints

public void setSizeConstraints(int maxWidth,
                               int maxHeight)

Specified by:
setSizeConstraints in interface org.eclipse.jface.text.IInformationControl

computeSizeHint

public org.eclipse.swt.graphics.Point computeSizeHint()

Specified by:
computeSizeHint in interface org.eclipse.jface.text.IInformationControl

setLocation

public void setLocation(org.eclipse.swt.graphics.Point location)

Specified by:
setLocation in interface org.eclipse.jface.text.IInformationControl

setSize

public void setSize(int width,
                    int height)

Specified by:
setSize in interface org.eclipse.jface.text.IInformationControl

addDisposeListener

public void addDisposeListener(org.eclipse.swt.events.DisposeListener listener)

Specified by:
addDisposeListener in interface org.eclipse.jface.text.IInformationControl

removeDisposeListener

public void removeDisposeListener(org.eclipse.swt.events.DisposeListener listener)

Specified by:
removeDisposeListener in interface org.eclipse.jface.text.IInformationControl

setForegroundColor

public void setForegroundColor(org.eclipse.swt.graphics.Color foreground)

Specified by:
setForegroundColor in interface org.eclipse.jface.text.IInformationControl

setBackgroundColor

public void setBackgroundColor(org.eclipse.swt.graphics.Color background)

Specified by:
setBackgroundColor in interface org.eclipse.jface.text.IInformationControl

isFocusControl

public boolean isFocusControl()

Specified by:
isFocusControl in interface org.eclipse.jface.text.IInformationControl

setFocus

public void setFocus()

Specified by:
setFocus in interface org.eclipse.jface.text.IInformationControl

addFocusListener

public void addFocusListener(org.eclipse.swt.events.FocusListener listener)

Specified by:
addFocusListener in interface org.eclipse.jface.text.IInformationControl

removeFocusListener

public void removeFocusListener(org.eclipse.swt.events.FocusListener listener)

Specified by:
removeFocusListener in interface org.eclipse.jface.text.IInformationControl