Developers TODO list: 
=====================

The list is divided into the following sections:

  o  Bugs: Known bugs that should be solved
  o  Wish list: Changes that would be nice to have
  o  Optimization: Suggested code optimizations
  o  Examples: Examples that are most wanted
  o  Review: Some code was never reviewed and cleaned up
  o  Research: API changes and architectural issues
  o  Documentation: Is an important part of this project
  o  Swing: Problems with javax.swing


Bugs
----
* Shift-Move does not work in Drag Enabled mode (Edge-Move does):
  It is not possible to access the state of the Shift key during drag and
drop operations with the new DnD setup (Java 1.4 and later). Therefore, the
Shift-Drag operation does not work in drag enabled mode. This is a Java
1.4 limitation. (Workarounds?)

* Ctrl-release during move instantly applies change on Windows:
  When the Ctrl-key is released during a Ctrl-Drag operation, then the
change is instantly applied under Windows. The change should be applied
when the mouse is released. This is a Java limitation. (Workarounds?)

* When using zoom levels above 800% the system throws a "IllegalArgument
  Exception" (see org.jgraph.graph.VertexRenderer.paint). This is a Java bug.

* Edges between groups (with mixed ports and cells children) not updated

* In-place editing capability lost in applets on second start.


Optimization
------------

* Code Optimization:
  Replace method calls with variables, reduce allocation of temporary
objects, use fast datastructures (Example: DefaultGraphModel.getRoots should
return a List) etc.

* Maximize Read-access via GraphView (Cache):
  All read access should be done via the GraphView (alias GraphLayoutCache),
to enable remote models and make better use of the cache.

* Reduce number of update/refresh calls:
  The number of calls to AbstractCellView.update and refresh should be
reduced if possible.


Wish list
---------

* Test Suite:
  JGraph requires a test suite (for example based on JUnit) to quickly test
new features, code changes and platforms/JDKs.

* AutoSize behaviour:
  In addition the the autosize attribute it should be possible for the view
to automatically size cells on insertion (setAutoSizeOnInsert).

* Support bean properties for XMLEncoder long-term serialization:
  It should be possible to serialize JGraph to XML using Swing. The
respective getters and setters should be added, which results in possible
method renaming. (Example: AbstractCellView.setAttributes must be renamed to
AbstractCellView.changeAttributes)


Examples
--------

* Folding/Unfolding (JGraph 2.0.x):
  Show/hide children and groups. This allows to make the graph visible on
different levels of the group structure, and only show individual cells,
without allocating additional memory for the invisible cells.

* XMLEncoder/Decoder:
  Use XMLEncoder/Decoder for long-term serialization of the model and all
attached views.

* Drag and Drop:
  Use drag and drop to implement grouping operations and exchange data with
other programs and the operating system.

* X-Y-Size (Gantt):
  Restrict possible cell modifications, for example by only allowing to size
vertically or horizontally.

* Squence Diagrams:
  The basic setup for drawing a sequence diagram.

* Selectable & Moveable Ports:
  How to make ports selectable and moveable.

* Custom Shapes:
  How to implement custom shapes that use custom handles.

* Multiple labels for an edge:
  Implement an edge with two labels as used eg. in UML diagrams.

* TreeModelAdapter
  An adapter to use a TreeModel in JGraph. TreeModels are widely used!

* RDF Binding
  RDF bindings for the graph model and the layout caches.


Review
------

* The new GraphLayoutCache must be tested with command history:
  The current implementation with automatic show/hide of cells was not fully
tested with respect to command history. Some rules may interfere!

* JGraph, BasicGraphUI, EdgeHandle, RootHandle, VertexHandle and Javadoc:
  The code of these classes should be reviewed and cleaned up. All Javadoc
comments should be constantly updated.


Research
--------

* Combined Port and Vertex cell (-> Vertex interface):
  Is it possible to ommit the vertex-port indirection and use one cell
as both, vertex _and_ port? (See http://sourceforge.net/mailarchive/
forum.php?thread_id=1675530&forum_id=7889)

* "Drop into group" Key Assignment:
  What standard key could be assigned to an "add to group" behaviour of drag
operations. Should this be built-into the core API?

* Animation (Events) & Animated Gifs:
  What is the standard approach to allow notification of cells by external
sources (for example if the view and cell are propertychange listeners for
their user object). How to use animated Gifs in JGraph and JTree?

* Scaleablility and Performance:
  Do profiling on the core API with very large models. Pay special attention
to bottlenecks in the DefaultGraphModel when only a subset of cells are
visible in the view.

* API unification wrt. scaling of arguments:
  Some of JGraph's methods scale their arguments, others do not (see
getFirstViewAt, getCellForLocation). This should be unified.

* Attribute sharing and chaining:
  JGraph provides a hook (GraphConstants.createMap) to implement a more
efficient AttributeSet for cells and views. Cells should share common
attributes, and it should be possible to inherit the attributes of parents
(see
http://sourceforge.net/mailarchive/forum.php?thread_id=864724&forum_id=7889)
. There is a similar implementation in Swing's TextComponents (see
MutableAttributeSet,
http://java.sun.com/products/jdk/1.2/docs/api/javax/swing/text/AbstractDocum
ent.AbstractElement.html).

* JGraph Bean Properties:
  Which JGraph properties should be published via PropertyChangeEvents?

* Rotate functionality:
  How could cells and labels be rotated in JGraph? How does this affect the
handles, and in-place editing?

* Additional core functionality:
  What funcionality/helper methods should be embedded into the core API?
(Examples: DefaultGraphModel.getSourceVertex, GraphConstants.setFontSize,
Style, Name etc)

* Editing and Transactions:
  Implicit (non-significant) edits should be distinguished and composite
transactions (eg. setVisible in one view and insert in global model)
should be better supported. (See https://sourceforge.net/forum/forum.php?
thread_id=818443&forum_id=140880)


Documentation
-------------

* Javadoc: The javadoc comments in the code should be reviewed.

* FAQ: The FAQ can always be updated.

* Paper, Tutorial: These documents should be updated to 2.0


Swing
-----

* javax.swing.plaf.basic.BasicTransferable should be public

* javax.swing.plaf.basic.BasicDropTargetListener should be public

