Friday, November 5, 2010

Pluggable analysis

Added the basic functionality for pluggable graph analysis algorithms. The algorithms are packaged as jars with entry points that implement an Algorithm interface. The jars can be selected via the "Load Algorithm" item in the "Analyze" menu. When the algorithm is successfully loaded it is added to the "Algorithms" sub menu of the "Analyze" menu, from where it can be invoked. The code certainly needs to be expanded upon and cleaned up/refactored, and additional functionality must be added.

View menu

Just implemented functionality for the view menu. This includes zoom in/zoom out/reset zoom. Some decisions had to be made regarding accelerator keys and menu item labels. The overwhelmingly-popular zoom in and zoom out menu labels appear to be "Zoom In" and "Zoom Out". Not surprising. Thus, those are what I chose to go with. The accelerator keys, however, presented a bit of a dilemma. Personally I'm a bit partial to the Firefox (and several other popular programs) Ctrl++ and Ctrl+-, but if you notice, Ctrl+- actually suggests Ctrl+=, since - is the shifted version of the = key. Not only is this a bit disconcerting for me, as this was the first time I realized this inconsistency, but Java in its Action framework will render out Ctrl+= and not Ctrl+-, which prevented me from using it. (FYI with Ctrl+- as the accelerator, Ctrl+Shift+= == Ctrl+- doesn't work, at least in the Linux impl of Java Swing) Thus, I went with a less intuitive but more consistent Cltr+M (m for minus) for zoom out and Ctrl+P for zoom in. The controls for the reset zoom button appear pretty standard, only the label is "Reset Zoom" and not "Reset" as is commonly used, because the button in fact resets the zoom level, and not the whole of the scrollable grid view.

Additionally, some rather intricate (for me, probably because I hadn't done it before) logic had to be implemented to determine how to resize the grid inside the scrollpane on zoom.

Thursday, November 4, 2010

File menu

The File menu is now fully functional it seems. There's logic to facilitate New/Open/Save/Save As/Exit. In support of this I implemented fairly standard logic to prompt a user to save his/her grid prior to program exit or change discarding in favor of a new or opened grid. I also added the file name currently being modified to the title bar in standard fashion, including a standard * (asterisk) to the immediate left of the file name to signify a dirty grid (unsaved changes).

Minor considerations

How to format the items in the File menu..

You'd think mnemonics and accelerators for the typical File menu operations of New/Open/Save/Save As would be standardized, if not across platforms, then within heavy-use applications on the same platform. Well, they're not!

I've found that New, Open and Save are fairly standard, using Ctrl+N, Ctrl+O and Ctrl+S accelerators respectively.

Save As, however, presented a minor conundrum. One of the most popular applications around - Firefox - doesn't even have a "Save As" option, and instead uses "Save Page As". Intriguing, however, is that the key mnemonic used is 'A', which is the mnemonic used for "Save As" is many other applications, but the accelerator is Ctrl+S, which is the accelerator used for "Save" in most applications.

In Eclipse, "Save As" doesn't even get an accelerator by default (yuck!).

After digging at bit further, I found that many applications intended for use on Linux use "A" as the mnemonic and "Ctrl+Shift+S" as the accelerator. I like this quite a bit, and thus have incorporated it into the Plotter.

Hello again

It's certainly been a while! Development has once again commenced on the plotter. I'd like to first clarify/augment the scope of the plotter application that I'm developing. My intent is to create a Java Swing-based application that can perform and facilitate the following tasks:
- Display a scrollable 2D grid
- Add/remove/drag vertices
- Add/remove/drag quadric-curve edges
- Save/open graphs to/from disk
- Provide a "drag-net" feature where elements caught in the mouse-dragged net will be selected
- Provide a pluggable interface for algorithm plugin jars to facilitate analysis of plotted graphs

The code is present in the following Google code repository:
http://code.google.com/p/plotterframework/

Until my next post!..

Sunday, March 21, 2010

Shift

Okay, so, my focus has changed from the 3D visualizer, to a 2D plotter.

I currently have a prototype version of the plotter, but it needs to be redone. Dr. Mellor and his Topologist colleagues hope to have the application by this summer so they can continue their work. It's currently not in a state where anyone but myself can use it as its usability is so inconsistent.

Thus, my over-arching objectives are:
- Recreate the plotter such that it's highly usable. In other words, it should comply with the usability features of popular drawing/diagramming applications.
- Have the source clean enough where 1) it can be open-sourced, and 2) Dr. Mellor and his colleagues (who know a bit about programming) can maintain it.
- Provide a pluggable algorithm functionality for running algorithms against the embeddings.

As part of the motivation for writing the plotter from scratch, I did a bit of searching around for programs that have similar functionality. Searching through Google, and looking over http://www.computop.org/, there's really nothing close in functionality to what TopPlot will provide. The closest applications I found (which are not really close at all) are:
- KnotPlot - purely 3D visualization application. Among other deficits, it doesn't provide for 2(.5)D projections, nd doesn't have an algorithm interface.
- Knotilus - A knot/link generator, without any plotting or direct manipulation.

Mathematica has a GraphPlot[] function, but it doesn't support direct manipulation of the produced graph, it doesn't provide information about edge crossings, and it only supports straight-edge embeddings.

There are also, of course, paint programs, but those are purely visual. We desire an underlying representation of the vertices and edges plotted such that algorithms can be run against them.

I've done some initial scenario and use-case analysis on paper in my TopPlot. I shall show it to Dondi!

Also, I'm going to be using the Shag-GUI library to provide functionality on top of basic Java Swing (such as an undo stack). I've started to read the API documentation.

Further, I've created the following Google Code project for TopPlot: http://code.google.com/p/topplot/

Saturday, March 6, 2010

Java Web Start

Things have recently transpired in my life which have made it fairly difficult to make progress on my school work.

I did manage to configure TopPlot as a Java Web Start on the LMU Keck web servers. It was relatively painless actually.

Over the next few days I intend on making significant progress towards getting vertices plotted.