org.eclipse.cdt.internal.ui.text.c.hover
Class SourceViewerInformationControl

java.lang.Object
  extended by org.eclipse.cdt.internal.ui.text.c.hover.SourceViewerInformationControl
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.text.IInformationControl, org.eclipse.jface.text.IInformationControlExtension, org.eclipse.swt.events.DisposeListener, org.eclipse.swt.internal.SWTEventListener

public class SourceViewerInformationControl
extends java.lang.Object
implements org.eclipse.jface.text.IInformationControl, org.eclipse.jface.text.IInformationControlExtension, org.eclipse.swt.events.DisposeListener

SourceViewerInformationControl Source viewer based implementation of IInformationControl. Displays information in a source viewer.


Constructor Summary
SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent)
          Creates a default information control with the given shell as parent.
SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent, int style)
          Creates a default information control with the given shell as parent.
SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent, int shellStyle, int style)
          Creates a default information control with the given shell as parent.
SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent, int shellStyle, int style, java.lang.String statusFieldText)
          Creates a default information control with the given shell as parent.
SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent, int style, java.lang.String statusFieldText)
          Creates a default information control with the given shell as parent.
SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent, java.lang.String statusFieldText)
          Creates a default 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 content)
           
 void setInput(java.lang.Object input)
           
 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 java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceViewerInformationControl

public SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent,
                                      int shellStyle,
                                      int style)
Creates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed. The given styles are applied to the created styled text widget.

Parameters:
parent - the parent shell
shellStyle - the additional styles for the shell
style - the additional styles for the styled text widget

SourceViewerInformationControl

public SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent,
                                      int shellStyle,
                                      int style,
                                      java.lang.String statusFieldText)
Creates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed. The given styles are applied to the created styled text widget.

Parameters:
parent - the parent shell
shellStyle - the additional styles for the shell
style - the additional styles for the styled text widget
statusFieldText - the text to be used in the optional status field or null if the status field should be hidden
Since:
3.0

SourceViewerInformationControl

public SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent,
                                      int style)
Creates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed. The given styles are applied to the created styled text widget.

Parameters:
parent - the parent shell
style - the additional styles for the styled text widget

SourceViewerInformationControl

public SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent,
                                      int style,
                                      java.lang.String statusFieldText)
Creates a default information control with the given shell as parent. The given information presenter is used to process the information to be displayed. The given styles are applied to the created styled text widget.

Parameters:
parent - the parent shell
style - the additional styles for the styled text widget
statusFieldText - the text to be used in the optional status field or null if the status field should be hidden
Since:
3.0

SourceViewerInformationControl

public SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent)
Creates a default information control with the given shell as parent. No information presenter is used to process the information to be displayed. No additional styles are applied to the styled text widget.

Parameters:
parent - the parent shell

SourceViewerInformationControl

public SourceViewerInformationControl(org.eclipse.swt.widgets.Shell parent,
                                      java.lang.String statusFieldText)
Creates a default information control with the given shell as parent. No information presenter is used to process the information to be displayed. No additional styles are applied to the styled text widget.

Parameters:
parent - the parent shell
statusFieldText - the text to be used in the optional status field or null if the status field should be hidden
Since:
3.0
Method Detail

setInput

public void setInput(java.lang.Object input)

setInformation

public void setInformation(java.lang.String content)
Specified by:
setInformation in interface org.eclipse.jface.text.IInformationControl

setVisible

public void setVisible(boolean visible)
Specified by:
setVisible 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
Since:
3.0

dispose

public final void dispose()

Specified by:
dispose 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

setLocation

public void setLocation(org.eclipse.swt.graphics.Point location)
Specified by:
setLocation in interface org.eclipse.jface.text.IInformationControl

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

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

hasContents

public boolean hasContents()
Specified by:
hasContents in interface org.eclipse.jface.text.IInformationControlExtension