Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344579 - Minute level zooming support
Summary: Minute level zooming support
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Nebula (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Emil Crumhorn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 10:05 EDT by Ersan Demircioglu CLA
Modified: 2021-07-05 11:41 EDT (History)
0 users

See Also:


Attachments
Modified AbstractPaintManager.java (28.98 KB, patch)
2011-05-04 04:38 EDT, Ersan Demircioglu CLA
no flags Details | Diff
Modified GanttComposite.java (334.77 KB, patch)
2011-05-04 04:40 EDT, Ersan Demircioglu CLA
no flags Details | Diff
Modified ISettings.java (41.83 KB, patch)
2011-05-04 04:42 EDT, Ersan Demircioglu CLA
no flags Details | Diff
Modified ViewPortHandler.java (7.41 KB, patch)
2011-05-04 04:43 EDT, Ersan Demircioglu CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ersan Demircioglu CLA 2011-05-03 10:05:40 EDT
Build Identifier: 

Maximum zooming level support hourly representation. However, for some short events (only few minutes long), this level is not enough to track. Minute level zooming support would be nice and useful.  

Reproducible: Always
Comment 1 Ersan Demircioglu CLA 2011-05-03 10:08:16 EDT
In fact, I have add minute zooming support, by coping hour zooming implementation and changing them to provide minute level zooming support. How can I commit these changes?
Comment 2 Emil Crumhorn CLA 2011-05-04 04:21:58 EDT
Hi Ersan,

Please attach the code changes as an attachment to this bug (text file, java files, zip file, whatever you prefer) so I can merge the changes with the code.

Thanks,
Emil
Comment 3 Ersan Demircioglu CLA 2011-05-04 04:38:46 EDT
Created attachment 194672 [details]
Modified AbstractPaintManager.java

Line 607: change from 
if (ganttComposite.getCurrentView() == ISettings.VIEW_DAY) {
            extra = 0;
        }

to 

if (ganttComposite.getCurrentView() == ISettings.VIEW_DAY || ganttComposite.getCurrentView() == ISettings.VIEW_HOURS) {
            extra = 0;
        }
Comment 4 Ersan Demircioglu CLA 2011-05-04 04:40:24 EDT
Created attachment 194673 [details]
Modified GanttComposite.java

Many changes in code.
Comment 5 Ersan Demircioglu CLA 2011-05-04 04:42:11 EDT
Created attachment 194674 [details]
Modified ISettings.java

New View and Zoom levels are added

public static final int VIEW_HOURS                     = 0;
    // zoom levels
public static final int MIN_ZOOM_LEVEL                 = -3;
public static final int ZOOM_MINUTES_MAX               = -3;
public static final int ZOOM_MINUTES_MEDIUM            = -2;
public static final int ZOOM_MINUTES_NORMAL            = -1;
Comment 6 Ersan Demircioglu CLA 2011-05-04 04:43:26 EDT
Created attachment 194675 [details]
Modified ViewPortHandler.java

Two new functions are added.

/**
	 * Jumps to the next minute.
	 */
	public void nextMinute() {
		Calendar mCalendar = _ganttComposite.getRootCalendar();
		mCalendar.add(Calendar.MINUTE, 1);
		
		if (mCalendar.get(Calendar.MINUTE) >= 60) {
			mCalendar.add(Calendar.HOUR_OF_DAY, 1);
		}
		
		if (mCalendar.get(Calendar.HOUR_OF_DAY) >= 24) {
			mCalendar.add(Calendar.DATE, 1);
			mCalendar.set(Calendar.HOUR_OF_DAY, 0);
		}

		_ganttComposite.setNoRecalc();
		_ganttComposite.moveXBounds(false);
		_ganttComposite.redraw();
	}

	/**
	 * Jumps to the previous minute.
	 */
	public void prevMinute() {
		Calendar mCalendar = _ganttComposite.getRootCalendar();
		mCalendar.add(Calendar.MINUTE, -1);

		if (mCalendar.get(Calendar.MINUTE) < 0) {
			mCalendar.add(Calendar.HOUR_OF_DAY, -1);
		}
		
		if (mCalendar.get(Calendar.HOUR_OF_DAY) < 0) {
			mCalendar.add(Calendar.DATE, -1);
			// -1 !!
			mCalendar.set(Calendar.HOUR_OF_DAY, 24 - 1);
		}

		_ganttComposite.setNoRecalc();
		_ganttComposite.moveXBounds(true);
		_ganttComposite.redraw();
	}
Comment 7 Wim Jongman CLA 2011-06-07 13:18:28 EDT
Is this done?
Comment 8 Emil Crumhorn CLA 2011-06-09 03:55:25 EDT
(In reply to comment #7)
> Is this done?

No, not yet. I have tested the code but it needs additional work to be properly integrated. I have no ETA at the moment.
Comment 9 Wim Jongman CLA 2019-12-12 15:58:27 EST
This bug does not have a target milestone assigned and is automatically closed as part of the 2.3.0 release cleanup.

It could be that this bug is accidentally closed for which we apologize.

If this bug is still relevant, please re-open and set a target milestone.