Friday, November 12, 2010

Back to programming

On my final push. Trying to get all basic actions working as flawlessly as possible. Dragging is being a real pain in the ass. Having to write some utility methods that I never thought I would have to write. Yeesh. Java and floating point values can be a real pain in the butt sometimes.

Today is the day

Taking a break from development to write my paper. It's going fairly well.

I hope to get back to my application in time to complete the following things:
- Have a graph and its edges completely drawable and manipulable, and undo/redoable (this part has presented a bit of an issue lately).
- Have a very basic demo plugin to simply demonstrate that the capability exists.
- Have an immaculate codebase.

While this certainly does not complete the full set of features I hope the Plotter Framework will eventually contain, I believe it's certainly a very strong starting point, and leaves a strong foundation to build on.

Thursday, November 11, 2010

Whew

Half way done with the clean up. This is going to take longer than expected.

Let's Wash that Code!

Code cleaning time. I'm almost reaching the deadline, and while the program isn't yet entirely finished (and the stupid edge/vertex dragging is still bothersome), I have enough here where a code clean/refactor makes sense, and would be a wise use of time.

I'll be back up for air in a couple hours, see you then!

Undo Manager and Curved Edges

The undo manager can be a pain in the butt! The chaining/aggregation of events had me befuddled for quite a while indeed. Initially I didn't realize that I had to chain the events manually (that the UndoManager wouldn't do it for me if I told it that I wanted a chain). But then when I realized that I had to manually implement the chaining, it made more sense why that was the case. It matters whether the chained events are invoked before or after the current event on undo and redo!

Concerning curved edges, Dondi sent me this interesting SVG sample spline. I think I could incorporate that logic and make a pretty sweet edge. Fortunately I think that I've found a way to intuitively offer the CubicCurve2D as the underlying edge implementation. This way being only allow one edge to be selected for control point manipulation at a time, thus only showing one edge's control points at a time. This will leave no ambiguity as to which edge the control points are for. We'll determine whether this is a decent long-term solution. Previously I had envisioned showing the control points for all edges at the same time. That would have led to a large amount of confusion and ambiguity.

Wednesday, November 10, 2010

Maven

Adding project support for Maven. About time! While refactoring the project directory structure for Maven, Subclipse did not have a fun time. Commits got all screwy just to get things back in order. I did have one major commit without a comment on accident. For this I apologize! Anyhow, we now support Maven.

Ctrl-Z!

Implementing the undo/redo stack. I'm providing the standard Undo/Redo Edit menu options with the nearly ubiquitous Ctrl-Z/Ctrl-Y accelerators, respectively. This is requiring a substantial refactor, as all logic for the undone/redone actions must be abstracted. Of course this abstraction ultimately results in a much cleaner code-base, but comes at the expensive of a substantial amount of work.

Relative to the previous post, I never really did take the step back to refactor and comment. But I think I have a decent feature-set now where a substantial refactoring/commenting session might be in order.