Skip to main content



      Home
Home » Eclipse Projects » Nebula » [GanttChart] Custom Text Formating Parameters
[GanttChart] Custom Text Formating Parameters [message #988583] Fri, 30 November 2012 10:28 Go to next message
Eclipse UserFriend
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 07:17 Go to previous message
Eclipse UserFriend
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: Mon Jun 30 23:20:12 EDT 2025

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

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

Back to the top