Release Notes

JViews 3.5 Gantt Release Notes

This document describes the main changes that have been made to the JViews Gantt module since version 3.0.

Incompatibilities
New Features
Behavioral Changes
Library Changes
       New Packages

       New Classes

       Modified Classes

Demonstration Changes
IlvTime Deprecation
Bug Fixes


Incompatibilities


New Features

The major new features of the Gantt module are the following:


Behavioral Changes

The Gantt module includes the following minor behavior changes that you should be aware of:


Library Changes

New Packages

ilog.views.gantt.action

ilog.views.gantt.util.log

ilog.views.gantt.xml

New Classes

ilog.views.gantt.IlvCacheManager

ilog.views.gantt.IlvTimeScrollController

ilog.views.gantt.IlvTimeUtil

ilog.views.gantt.IlvTimeScrollUtil

ilog.views.gantt.IlvVerticalScrollController

ilog.views.gantt.event.ChartDividerListener

ilog.views.gantt.event.ChartDividerEvent

ilog.views.gantt.event.TimeChangedEvent

ilog.views.gantt.graphic.IlvConstraintGraphicFactory

ilog.views.gantt.graphic.IlvDefaultConstraintGraphicFactory

ilog.views.gantt.swing.IlvAbstractBoundedRangeModel

ilog.views.gantt.swing.IlvJManagerViewContainer

ilog.views.gantt.swing.IlvVerticalBoundedRangeModel

ilog.views.gantt.util.collections.IlvCompositeIterator

Modified Classes

ilog.views.gantt.IlvHierarchyChart

ilog.views.gantt.IlvGanttChart

ilog.views.gantt.IlvGanttConfiguration

ilog.views.gantt.IlvVerticalDisplayController

ilog.views.gantt.IlvDuration

ilog.views.gantt.IlvTimeScrollable

ilog.views.gantt.event.TimeScrollListener

ilog.views.gantt.event.VerticalExpansionListener

ilog.views.gantt.event.VerticalScrollListener

ilog.views.gantt.graphic.IlvGanttSheet

ilog.views.gantt.graphic.IlvActivityGraphic

ilog.views.gantt.graphic.IlvConstraintGraphic

ilog.views.gantt.graphic.interactor.IlvActivityGraphicSelection

ilog.views.gantt.graphic.renderer.IlvActivityRenderer

ilog.views.gantt.property.IlvActivityEndTimeProperty

ilog.views.gantt.property.IlvActivityFormattedEndTimeProperty

ilog.views.gantt.property.IlvFormattedTimeProperty

ilog.views.gantt.scale.IlvDefaultScaleMouseInteractor

ilog.views.gantt.scale.IlvTimeScale

ilog.views.gantt.swing.IlvJTable

ilog.views.gantt.swing.IlvJTree

ilog.views.gantt.swing.IlvJTableColumn

ilog.views.gantt.swing.IlvAbstractTableColumn

ilog.views.gantt.swing.IlvStringColumn

ilog.views.gantt.swing.IlvTreeColumn


Demonstration Changes


IlvTime Deprecation

As mentioned in the Incompatibilities section, the class IlvTime has been deprecated in JViews 3.5. All APIs in the Gantt module now use standard java.util.Date objects for both method arguments and return values. Because IlvTime is a subclass of Date, in JViews 3.5 an IlvTime object will still be accepted as a method argument. If your application's use of IlvTime is limited to method arguments, you can safely decide to ignore the deprecation warnings you will receive when you rebuild your existing projects. You can then study the porting information below to decide whether the effort of migrating your code is worth the gain in run-time efficiency.

If your application calls a Gantt API that used to return an IlvTime value in JViews 3.0, you will have to migrate your code to accommodate the fact that the API now returns a Date value in version 3.5. A listing of the most commonly used Gantt module APIs that are affected follows:

Code Migration Strategies

There are two approaches you can take to migrating your code from the IlvTime to java.util.Date class:

Targeted Migration

In Targeted Migration, you simply encapsulate Date values returned by the Gantt API inside an IlvTime instance by using the IlvTime(Date) constructor.

The first step is to attempt recompilation of your application using JViews 3.5. You can then ignore the deprecation warnings and focus on the actual compiler errors that indicate type incompatibilities. For example, assume that you have written some code using JViews 3.0 that scrolls the chart to one day before the beginning of an activity:

IlvTime activityTime = anActivity.getStartTime();
IlvTime chartTime = activityTime.subtract(IlvDuration.ONE_DAY);
aChart.setVisibleTime(chartTime);

When you recompile using JViews 3.5, you will get an error because the Date object returned by the getStarttime() method cannot be stored in an IlvTime variable. You can port this code quickly by creating an IlvTime object from the Date object:

IlvTime activityTime = new IlvTime(anActivity.getStartTime());
IlvTime chartTime = activityTime.subtract(IlvDuration.ONE_DAY);
aChart.setVisibleTime(chartTime);

The same solution can be applied if you have written methods that take an IlvTime argument. For example, assume that you have written a method using JViews 3.0 that scrolls the chart:

public void scrollTheChart(IlvTime t)
{
theChart.setVisibleTime(t.subtract(IlvDuration.ONE_DAY));
}
...
scrollTheChart(anActivity.getStartTime());

When you recompile using version 3.5, you will get an error because a method scrollTheChart(Date t) could not be found. The solution is the same as before: create an IlvTime object from the Date value:

scrollTheChart(new IlvTime(anActivity.getStartTime()));

Complete Migration

The Complete Migration approach completely eliminates usage of the IlvTime class from your application code. This will yield both the best performance and the best long-term solution, at the expense of slightly more effort. Here we present a step-by-step guide to completely migrating your application. Throughout the following steps, we will be using standard regular expressions for search and replace parameters.

  1. Globally search and replace all usage of IlvTime with Date. The search and replace expressions are formulated so that usages of IlvTimeInterval will not be affected.

    Search Expression: IlvTime([^I])

    Replace Expression: Date\1

  2. Delete unneeded, temporary Date instances. Typically, these will occur where your application calls a standard Java API that returns a Date value, but JViews 3.0 required an IlvTime object. Since version 3.5 now accepts Date values as method parameters, the temporary encapsulation is no longer needed. For example, assume that your application uses a Java Calendar to calculate where to scroll the chart. Using JViews 3.0, your code might look like this:
     
    theChart.setVisibleTime(new IlvTime(aCalendar.getTime()));

    And, once you have applied step #1, the code will now look like this:

    theChart.setVisibleTime(new Date(aCalendar.getTime()));

    As you can see, the temporary Date object is now superfluous. You can search for all cases where a Date is constructed to encapsulate another value by using:

    Search Expression: new Date\([^)]

    You will then need to manually delete these temporary objects. The code example should now look like this:

    theChart.setVisibleTime(aCalendar.getTime());
  3. Ensure that java.util.Date is imported into all classes that you modified in steps #1 and #2.
  4. Replace usage of IlvTime APIs with IlvTimeUtil. The easiest way to determine where your application invokes IlvTime APIs is to attempt a compilation after performing steps #1 - 3. The compiler will generate a list of error messages indicating that various methods could not be found for the java.util.Date class. You will then need to edit your code to invoke the appropriate IlvTimeUtil APIs:

    JViews 3.0 IlvTime API

    JViews 3.5 IlvTimeUtil API

    add(IlvDuration delta) add(Date date, IlvDuration delta)
    subtract(IlvDuration delta) subtract(Date date, IlvDuration delta)
    subtract(IlvTime time) subtract(Date date1, Date date2)

    The following search and replace expressions can also be used. However, they are not foolproof and will generate false positive matches on the add() method for collection, Swing component classes, and so on. You should visually verify each expression match before accepting the replacement string.

    Search Expression: (([_a-zA-Z][_a-zA-Z0-9]*(\(\))?\.)*[_a-zA-Z][_a-zA-Z0-9]*(\(\))?)\.(add|subtract)\(

    Replace Expression (place a blank at the end for proper method argument spacing): IlvTimeUtil.\5(\1,


Bug Fixes

The following bugs have been fixed: