Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 21956 Details for
Bug 96301
[CLabel] Custom behaviour when the whole text of a CLabel cannot be displayed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch proposal
patch.txt (text/plain), 1.58 KB, created by
Michal Tkacz
on 2005-05-30 07:33:34 EDT
(
hide
)
Description:
Patch proposal
Filename:
MIME Type:
Creator:
Michal Tkacz
Created:
2005-05-30 07:33:34 EDT
Size:
1.58 KB
patch
obsolete
>Index: CLabel.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CLabel.java,v >retrieving revision 1.54 >diff -u -r1.54 CLabel.java >--- CLabel.java 18 May 2005 19:16:58 -0000 1.54 >+++ CLabel.java 30 May 2005 11:22:40 -0000 >@@ -379,11 +379,10 @@ > extent.x = Math.max(extent.x, e.x); > } > } >- if (appToolTipText == null) { >- super.setToolTipText(text); >- } >+ >+ internalSetTooltipText(text, appToolTipText); > } else { >- super.setToolTipText(appToolTipText); >+ internalSetTooltipText(null, appToolTipText); > } > > // determine horizontal position >@@ -500,6 +499,18 @@ > } > } > /** >+ * Allows to define a custom way of handling tooltips. >+ * >+ * @param text label's text if it is not completely visible, null otherwise >+ * @param appTooltipText tooltip set by the application >+ */ >+protected void internalSetTooltipText(String text, String appTooltipText) { >+ if (appTooltipText != null) >+ super.setToolTipText(appTooltipText); >+ else >+ super.setToolTipText(text); >+} >+/** > * Paint the Label's border. > */ > private void paintBorder(GC gc, Rectangle r) { >@@ -744,8 +755,8 @@ > } > } > public void setToolTipText (String string) { >- super.setToolTipText (string); >- appToolTipText = super.getToolTipText(); >+ internalSetTooltipText(null, string); >+ appToolTipText = string; // super.getToolTipText(); > } > /** > * Shorten the given text <code>t</code> so that its length doesn't exceed
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 96301
: 21956