Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » [GanttChart] Custom Text Formating Parameters
[GanttChart] Custom Text Formating Parameters [message #988583] Fri, 30 November 2012 15:28 Go to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hello

I would like to change the tooltip text of an event to show the number of hours instead of the number of days. I found the possibility to change the setting in ISetting.getDefaultAdvancedTooltipText(). The default here is:
buf.append("\\ce#sd# - #ed# (#days# day(s))\n");

The control doesnt know a parameter like #hours#, so I was wondering if I could hook in somewhere to implement this on my own.

Any tipps are very welcome!

Greetings
Christoph
Re: [GanttChart] Custom Text Formating Parameters [message #990210 is a reply to message #988583] Tue, 11 December 2012 12:17 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Hi,

you need to implement your own IToolTipContentReplacer. As you might have already done, you create your own AbstractSettings used for your Gantt and override getToolTipContentReplacer() to return an instance of your IToolTipContentReplacer. Use your implementation of AbstractSettings on creating your GanttChart instance.

Within your IToolTipContentReplacer you simply use String replace for supporting your own custom tooltip tags like this

String str = toolTipPattern;
str = str.replaceAll("#hours#", yourObject.getHours());


Hope that helps,
Dirk
Previous Topic:[Nebula Gallery] Update existing items, name of group when empty field was clicked
Next Topic:Announcement: CalendarCombo EOL
Goto Forum:
  


Current Time: Fri Apr 19 11:35:46 GMT 2024

Powered by FUDForum. Page generated in 0.01986 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top