ilog.views.gantt.xml
IlvGanttUrlReader.java
IlvActivityWriter.java
IlvConstraintReader.java
IlvConstraintWriter.java
IlvDefaultGanttDocumentReader.java
IlvDefaultGanttDocumentWriter.java
IlvDefaultGanttModelReader.java
IlvDefaultGanttModelWriter.java
IlvDefaultGanttStreamWriter.java
IlvGanttDocumentReader.java
IlvGanttDocumentWriter.java
IlvGanttDomUtil.java
IlvGanttModelReader.java
IlvGanttModelWriter.java
IlvGanttReaderException.java
IlvGanttStreamWriter.java
IlvActivityReader.java
IlvReservationReader.java
IlvReservationWriter.java
IlvResourceReader.java
IlvResourceWriter.java
IlvSDXLFileConnector.java
IlvSimpleActivityReader.java
IlvSimpleActivityWriter.java
IlvSimpleConstraintReader.java
IlvSimpleConstraintWriter.java
IlvSimpleReservationReader.java
IlvSimpleReservationWriter.java
IlvSimpleResourceReader.java
IlvSimpleResourceWriter.java
IlvTimeReader.java
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
- IlvHierarchyChart now
implements the IlvVerticalScrollable
interface.
- New methods:
- getDividerLocation()
- setDividerLocation(int location)
- isDividerOpaqueMove()
- setDividerOpaqueMove(boolean opaqueMove)
- getDividerSize()
- setDividerSize(int size)
- addChartDividerListener(ChartDividerListener
listener)
- removeChartDividerListener(ChartDividerListener
listener)
- getZoomInAction()
- getZoomOutAction()
- getScrollVerticalUpAction()
- getScrollVerticalDownAction()
- getScrollTimeLeftAction()
- getScrollTimeRightAction()
- registerTablePanelKeyboardAction(ActionListener
anAction, KeyStroke aKeyStroke, int aCondition)
- unregisterTablePanelKeyboardAction(KeyStroke
aKeyStroke)
- getRegisteredTablePanelKeyStrokes()
- getConditionForTablePanelKeyStroke(KeyStroke
aKeyStroke)
- getActionForTablePanelKeyStroke(KeyStroke
aKeyStroke)
- registerGanttPanelKeyboardAction(ActionListener
anAction, KeyStroke aKeyStroke, int aCondition)
- unregisterGanttPanelKeyboardAction(KeyStroke
aKeyStroke)
- getRegisteredGanttPanelKeyStrokes()
- getConditionForGanttPanelKeyStroke(KeyStroke
aKeyStroke)
- getActionForGanttPanelKeyStroke(KeyStroke
aKeyStroke)
- getVisibleRow(int rowIndex)
- getVisibleRowIndex(IlvHierarchyNode row)
- makeRowVisible(IlvHierarchyNode row)
- getVisibleRowBounds(IlvHierarchyNode row)
- getVisibleRowBounds(int rowIndex)
- makeRowDisplayed(IlvHierarchyNode row)
- getVisibleRowIndexAtPosition(int position)
- getVisibleRowAtPosition(int position)
- getDisplayedRowIndexAtPosition(int position)
- getDisplayedRowAtPosition(int position)
- getConstraintGraphicFactory()
- setConstraintGraphicFactory(IlvConstraintGraphicFactory
factory)
- isGanttSheetToolTipsEnabled
- setGanttSheetToolTipsEnabled(boolean enable)
- Deprecated methods:
- getSplitPaneDividerLocation():
Use the getDividerLocation
method instead.
- setSplitPaneDividerLocation(int location):
Use the setDividerLocation method
instead.
ilog.views.gantt.IlvGanttChart
- The start and end time columns now observe the default locale.
- Deprecated methods:
- getConstraintColor()
- setConstraintColor(Color c)
ilog.views.gantt.IlvGanttConfiguration
- New methods:
- removeSelectable(IlvJTree tree)
- removeSelectable(IlvJTable table)
- removeSelectable(IlvGanttSheet sheet)
- getVisibleRowIndexAtPosition(int position)
- getVisibleRowAtPosition(int position)
- getDisplayedRowIndexAtPosition(int position)
- getDisplayedRowAtPosition(int position)
ilog.views.gantt.IlvVerticalDisplayController
- New methods:
- getVisibleNodeAtPosition(int position)
- getVisibleRowAtPosition(int position)
- getDisplayedNodeAtPosition(int position)
- getDisplayedRowAtPosition(int position)
ilog.views.gantt.IlvDuration
- Implements Serializable.
- New methods:
- compareTo(IlvDuration anotherDuration)
hashCode()
ilog.views.gantt.IlvTimeScrollable
ilog.views.gantt.event.TimeScrollListener
ilog.views.gantt.event.VerticalExpansionListener
ilog.views.gantt.event.VerticalScrollListener
- The verticalScrollChanged
method has been renamed to verticalPositionChanged.
- New methods:
- verticalExtentChanged(VerticalScrollEvent evt)
- maxVerticalPositionChanged(VerticalScrollEvent
evt)
ilog.views.gantt.graphic.IlvGanttSheet
- IlvManagerView double
buffering has been disabled because Swing already double-buffers the entire Gantt chart.
- New methods:
- isToolTipsEnabled()
- setToolTipsEnabled(boolean enabled)
- Deprecated methods:
- getConstraintColor()
- setConstraintColor(Color c)
- setZoomInKeyStroke(KeyStroke stroke)
- setZoomOutKeyStroke(KeyStroke stroke)
- setScrollLeftKeyStroke(KeyStroke stroke)
- setScrollRightKeyStroke(KeyStroke stroke)
- setScrollDownKeyStroke(KeyStroke stroke)
ilog.views.gantt.graphic.IlvActivityGraphic
- Activity graphics now delegate creation of their selection object to their renderer.
- Activity graphics now delegate their tooltip text to their renderer.
- New methods:
- makeSelection()
- getToolTipText(IlvPoint p, IlvTransformer t)
ilog.views.gantt.graphic.IlvConstraintGraphic
- New methods:
- IlvConstraintGraphic(IlvActivityGraphic from,
IlvActivityGraphic to, IlvConstraint constraint)
- getHorizontalExtremityLength()
- setHorizontalExtremityLength(float length)
- getToolTipText(IlvPoint p, IlvTransformer t)
ilog.views.gantt.graphic.interactor.IlvActivityGraphicSelection
The y position of the handles is now based on the activity graphic's boundingBox, instead of its definitionRect. This positions the handles correctly if
an IlvActivityRenderer
modifies the y position of the activity graphic in its getBounds method.
ilog.views.gantt.graphic.renderer.IlvActivityRenderer
- New methods:
- makeSelection(IlvActivityGraphic ag)
- getToolTipText(IlvActivityGraphic ag, IlvPoint
p, IlvTransformer t)
ilog.views.gantt.property.IlvActivityEndTimeProperty
ilog.views.gantt.property.IlvActivityFormattedEndTimeProperty
ilog.views.gantt.property.IlvFormattedTimeProperty
The setFormat method now
accepts only a DateFormat argument. Any other type
of Format object will throw an
IllegalArgumentException.
ilog.views.gantt.scale.IlvDefaultScaleMouseInteractor
Corrected a bug in the zoom
and integerZoom methods that
caused zooming near the max visible time to set the incorrect time interval.
ilog.views.gantt.scale.IlvTimeScale
ilog.views.gantt.swing.IlvJTable
- New methods:
- removeColumn(Object identifier)
- columnUpdated(int modelColumnIndex)
- columnHeaderUpdated(int modelColumnIndex)
- rowUpdated(IlvHierarchyNode row)
- getColumnIndex(Object identifier)
- getColumnIndex(TableColumn column)
- getColumnIndex(IlvJTableColumn column)
- getColumn(int viewColumnIndex)
- getColumn(IlvJTableColumn column)
- getTableColumn(int viewColumnIndex)
- getTableColumn(Object identifier)
- getTableColumn(TableColumn column)
- getTreeColumn(int viewColumnIndex)
- getTreeColumn(Object identifier)
- getTreeColumn(TableColumn column)
- getRowSpacing
- setRowSpacing(int rowHeight)
ilog.views.gantt.swing.IlvJTree
- The root row is now automatically expanded when the first children are added to the root
row. This overrides the default behavior of javax.swing.JTree.
- A workaround has been provided for a Swing JTree
bug that occurs when an expanded parent node has its last child removed and then has new
children added. The JTree
displays the newly inserted children, but reports the parent node as not expanded.
- The tree's largeModel property is now enabled.
This optimizes the tree when fixed row heights are used.
ilog.views.gantt.swing.IlvJTableColumn
- New methods:
- Deprecated methods:
- getTableColumn(): This has
been replaced by getColumn(),
which is consistent with the new IlvJTable
APIs.
ilog.views.gantt.swing.IlvAbstractTableColumn
- New methods:
- columnUpdated()
- columnHeaderUpdated()
ilog.views.gantt.swing.IlvStringColumn
- New methods:
- IlvStringColumn(Object headerValue,
IlvStringProperty property, int width): A new constructor that takes a
column width parameter.
- getProperty()
ilog.views.gantt.swing.IlvTreeColumn
- New methods:
- isRootExpandIconVisible()
- setRootExpandIconVisible(boolean visible)
- getRenderer()
- getEditor()
Demonstration Changes
- New XML demonstrations have been provided to
illustrate the new XML capabilities of the Gantt module and show how to use the SDXL data
format.
- New Database demonstrations have been
provided to show how to interface the Gantt module to a database with load-on-demand.
- The "Field" menu items have been changed to radio buttons.
- The row layout menu items in the "Row" menu of the Schedule chart examples
have been changed to radio buttons.
- The following menus have been added:
- A toolbar has been added. All toolbar items and most menu items are now defined as IlvAction objects.
- A vertical WeekendGrid and a
"Grid" menu have been added.
- The Custom Gantt Example now
illustrates how to customize constraint links and the tree column icons.
- When adding, indenting, outdenting, or re-ordering rows the selected row is now scrolled
into the display area.
- When the demos are run as applications, they no longer embed a JApplet inside of the JFrame. The user interface is now constructed directly
inside the contentPane of the JFrame.
This eliminates some repaint issues when the window is resized.
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:
- IlvDuration.add(Date t)
- IlvTimeInterval.getStart()
- IlvTimeInterval.getEnd()
- IlvActivity.getStartTime()
- IlvActivity.getEndTime()
- IlvHierarchyChart.getMaxVisibleTime()
- IlvHierarchyChart.getMinVisibleTime()
- IlvHierarchyChart.getVisibleTime()
Code Migration Strategies
There are two approaches you can take to migrating your code from the IlvTime to java.util.Date
class:
- Targeted - The first approach is useful when your
application's usage of the IlvTime
class is limited and speed of development is more important than the utmost in
performance.
- Complete - The second approach involves a complete port
and elimination of the IlvTime
class from your code.
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.
- 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
- 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());
|
- Ensure that java.util.Date
is imported into all classes that you modified in steps #1 and #2.
- 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:
- IlvDefaultGanttModel.reservationIterator(IlvResource,IlvTimeInterval)
returned incorrect results.
- If a ReservedResourceEvent
was vetoed, the veto was not observed and the reservation graphic could still be moved to
a different resource row in the schedule chart.
- When the height of the rows changed in a Gantt sheet, the length of the first and the
last vertical segments of the constraint graphics did not change.
- IlvHierarchyChart.getSplitPaneDividerLocation
did not return a value that was compatible with the setSplitPaneDividerLocation method's argument.
- There were several timing bugs related to the charts tracking which rows are currently
expanded/collapsed, which row number a particular activity or resource is displayed on,
and how many rows are currently visible.
- IlvGanttSheet threw an
exception when handling a RowMovedEvent
that resulted in a visible row becoming hidden or the opposite, a hidden row becoming
visible.
- IlvConstraintType
deserialization did not preserve the identity of the static constants.
- Using the mouse to zoom in the time scale could cause an incorrect time range to be set
when zooming near the max visible time.
- Several miscellaneous bugs existed when setting the chart's visible time, duration, and
min/max values. Usually these occurred when the values were set before the chart was made
shown.
- The Gantt chart did not properly track the current Look & Feel.
- IlvConstraintGraphic's connectionType property was static
when it should have been an instance attribute.
- When an activity graphic was selected, two duplicate selection events were being fired.
- If the Gantt model was changed using the IlvHierarchyChart.setGanttModel
method while rows were selected, the old rows would remain flagged as being selected.
- The Gantt sheet did not fire a visibleTimeChanged
event when it auto-scrolled horizontally due to the user dragging a graphic.
- The Gantt sheet did not fire any events when the setVisibleTime, setVisibleDuration, or setVisibleInterval APIs were invoked.
- When a chart was resized, its visible duration property did not change to reflect its
actual appearance. Also, no TimeScrollListener
events were fired.
- The time scale did not track the mouse properly during drag panning operations.
- If editing was disabled in the table's tree column, this also disabled the user from
using the mouse to expand/collapse rows.
- If a column in the table has its editor set to null, the column is uneditable. But, when
a cell in such a column was selected it would be displayed with a normal, editable
outline.
- In the Schedule chart, if a reservation was dragged to an unoccupied resource row and
then dragged away again, a ghost of the reservation graphic was left behind.
- In an IlvDefaultGanttModel, changing a
reservation's resource by calling the IlvReservation.setResource()
API would result in corruption of the data model's internal data structures.