Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.window
Class DefaultToolTip


java.lang.Object
  extended by 

org.eclipse.jface.window.ToolTip
      extended by 
org.eclipse.jface.window.DefaultToolTip
Direct Known Subclasses:
ColumnViewerToolTipSupport

public class DefaultToolTip
extends ToolTip

Default implementation of ToolTip that provides an iconofied label with font and color controls by subclass.

Since:
3.3

Field Summary
 
Fields inherited from class org.eclipse.jface.window. ToolTip
NO_RECREATE, RECREATE
 
Constructor Summary
DefaultToolTip ( Control control)
          Create new instance which add TooltipSupport to the widget
DefaultToolTip ( Control control, int style, boolean manualActivation)
          Create new instance which add TooltipSupport to the widget
 
Method Summary
protected   Composite createToolTipContentArea ( Event event, Composite parent)
          Creates the content are of the the tooltip.
protected   Color getBackgroundColor ( Event event)
          The background Color used by CLabel in the default implementation
protected   Image getBackgroundImage ( Event event)
          The background Image used by CLabel in the default implementation
protected   Font getFont ( Event event)
          The Font used by CLabel in the default implementation
protected   Color getForegroundColor ( Event event)
          The foreground Color used by CLabel in the default implementation
protected   Image getImage ( Event event)
          The Image displayed in the CLabel in the default implementation implementation
protected  int getStyle ( Event event)
          The style used to create the CLabel in the default implementation
protected   String getText ( Event event)
          The text displayed in the CLabel in the default implementation
 void setBackgroundColor ( Color backgroundColor)
          The background Image used by CLabel in the default implementation
 void setBackgroundImage ( Image backgroundImage)
          The background Image used by CLabel in the default implementation
 void setFont ( Font font)
          The Font used by CLabel in the default implementation
 void setForegroundColor ( Color foregroundColor)
          The foreground Color used by CLabel in the default implementation
 void setImage ( Image image)
          The Image displayed in the CLabel in the default implementation implementation
 void setStyle (int style)
          The style used to create the CLabel in the default implementation
 void setText ( String text)
          The text displayed in the CLabel in the default implementation
 
Methods inherited from class org.eclipse.jface.window. ToolTip
activate, afterHideToolTip, deactivate, getData, getLocation, getToolTipArea, hide, isHideOnMouseDown, isRespectDisplayBounds, isRespectMonitorBounds, setData, setHideDelay, setHideOnMouseDown, setPopupDelay, setRespectDisplayBounds, setRespectMonitorBounds, setShift, shouldCreateToolTip, show
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultToolTip

public DefaultToolTip(
Control control)
Create new instance which add TooltipSupport to the widget

Parameters:
control - the control on whose action the tooltip is shown

DefaultToolTip

public DefaultToolTip(
Control control,
                      int style,
                      boolean manualActivation)
Create new instance which add TooltipSupport to the widget

Parameters:
control - the control to which the tooltip is bound
style - style passed to control tooltip behaviour
manualActivation - true if the activation is done manually using ToolTip.show(Point)
See Also:
ToolTip.RECREATE, ToolTip.NO_RECREATE
Method Detail

createToolTipContentArea

protected 
Composite createToolTipContentArea(
Event event,
                                             
Composite parent)
Creates the content are of the the tooltip. By default this creates a CLabel to display text. To customize the text Subclasses may override the following methods

Specified by:
createToolTipContentArea in class ToolTip
Parameters:
event - the event that triggered the activation of the tooltip
parent - the parent of the content area
Returns:
the content area created

getStyle

protected int getStyle(
Event event)
The style used to create the CLabel in the default implementation

Parameters:
event - the event triggered the popup of the tooltip
Returns:
the style

getImage

protected 
Image getImage(
Event event)
The Image displayed in the CLabel in the default implementation implementation

Parameters:
event - the event triggered the popup of the tooltip
Returns:
the Image or null if no image should be displayed

getForegroundColor

protected 
Color getForegroundColor(
Event event)
The foreground Color used by CLabel in the default implementation

Parameters:
event - the event triggered the popup of the tooltip
Returns:
the Color or null if default foreground color should be used

getBackgroundColor

protected 
Color getBackgroundColor(
Event event)
The background Color used by CLabel in the default implementation

Parameters:
event - the event triggered the popup of the tooltip
Returns:
the Color or null if default background color should be used

getBackgroundImage

protected 
Image getBackgroundImage(
Event event)
The background Image used by CLabel in the default implementation

Parameters:
event - the event triggered the popup of the tooltip
Returns:
the Image or null if no image should be displayed in the background

getFont

protected 
Font getFont(
Event event)
The Font used by CLabel in the default implementation

Parameters:
event - the event triggered the popup of the tooltip
Returns:
the Font or null if the default font should be used

getText

protected 
String getText(
Event event)
The text displayed in the CLabel in the default implementation

Parameters:
event - the event triggered the popup of the tooltip
Returns:
the text or null if no text has to be displayed

setBackgroundColor

public void setBackgroundColor(
Color backgroundColor)
The background Image used by CLabel in the default implementation

Parameters:
backgroundColor - the Color or null if default background color ( SWT.COLOR_INFO_BACKGROUND) should be used

setBackgroundImage

public void setBackgroundImage(
Image backgroundImage)
The background Image used by CLabel in the default implementation

Parameters:
backgroundImage - the Image or null if no image should be displayed in the background

setFont

public void setFont(
Font font)
The Font used by CLabel in the default implementation

Parameters:
font - the Font or null if the default font should be used

setForegroundColor

public void setForegroundColor(
Color foregroundColor)
The foreground Color used by CLabel in the default implementation

Parameters:
foregroundColor - the Color or null if default foreground color should be used

setImage

public void setImage(
Image image)
The Image displayed in the CLabel in the default implementation implementation

Parameters:
image - the Image or null if no image should be displayed

setStyle

public void setStyle(int style)
The style used to create the CLabel in the default implementation

Parameters:
style - the event triggered the popup of the tooltip

setText

public void setText(
String text)
The text displayed in the CLabel in the default implementation

Parameters:
text - the text or null if no text has to be displayed

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire