Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Change Section height of Gantt Diagram (Nebula, Gantt, GanttSection, Section height)
Change Section height of Gantt Diagram [message #780516] Wed, 18 January 2012 07:29 Go to previous message
Bobo xTreme is currently offline Bobo xTreme
Messages: 1
Registered: January 2012
Junior Member
Halo folks,
I'm pleased to be a member of your community.

I work on an implementation of Nebula Gantt.

I've already created the Diagramm and imported Sections, Events and EventGroups and Scopes.
I've attached a picture of my Gantt Diagram.

As you can see in the section is too much free-space, caused by the calculation of the Nebula Gantt API.

Here is the function from
GanttSection.class
for ganttSection height-calculation:

int getEventsHeight(final ISettings settings) {
        if (_ganttEvents.size() == 0) {
            return settings.getMinimumSectionHeight();
        }

        int height = settings.getEventsTopSpacer();

        for (int i = 0; i < _ganttEvents.size(); i++) {
            final IGanttChartItem event = (IGanttChartItem) _ganttEvents.get(i);

            if (event.isAutomaticRowHeight()) {
                height += settings.getEventHeight();
            }
            else {
                height += event.getFixedRowHeight();                
            }

            if (i != _ganttEvents.size() - 1) {
                height += settings.getEventSpacer();
            }
        }

        height += settings.getEventsBottomSpacer();

        if (height < settings.getMinimumSectionHeight()) {
            height = settings.getMinimumSectionHeight();
        }

        return height;
    }



It adds for every event (24 Events at all) more height, but I just need the groupEvents (in this case: 7 GroupEvents)

calculated = 24 * 12px (eventheight) + 26 * 12px (eventspace) = 600px
i need = 7*12 + 9*12 = 192px

I've tried to override the function, but it's private.
What can I do ?

greets.

[Updated on: Wed, 18 January 2012 07:35]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic:Grid, GridTableViewer and sorting
Next Topic:Nebula xviewer column resize problem
Goto Forum:
  


Current Time: Tue May 21 04:17:22 EDT 2013

Powered by FUDForum. Page generated in 0.06218 seconds