JMeld looks like a really cool Java diff viewer--much more robust than the one I've included in SourceJammer. I'd love to incorproate JMeld into the next release of the SJ client (yes, I'm working on one after a very long hiatus), but the BufferedDiffPanel is pretty tightly integrated into the JMeld application.
I would love to see BufferedDiffPanel (or some other class, preferably one that extends JPanel) implemented in a way that makes it easy to include in another Swing application.
This panel tool should be readily configurable by the implementing application, providing a way to set font, character size, highlight colors, read-only vs writeable, etc.
Actually, I'll probably give implementing this a shot myself and perhaps you will want to incorporate my changes into the JMeld codebase. Or perhaps not.
Anyway, thanks for making such a nice tool!
Maybe the best thing you can do is to use JMeldPanel.
Probably you should:
1. Not add the toolbar.
2. Not use a tabbedpane.
All settings are ruled by the singleton JMeldSettings.
It is designed to be used without a UI so that should not be a problem.
It can also load/save itself.
I also need embedded use so I programmed something for it (it's in subversion now)
It works like this:
panel = new JMeldPanel();
panel.SHOW_TOOLBAR_OPTION.disable();
panel.SHOW_TABBEDPANE_OPTION.disable();
panel.openComparison(args[0], args[1]);
JMeldPanel is a JPanel.
You can only set options BEFORE you add the panel to a container.
If you need more options you can include them and I will incorporate them (or perhaps not)
I've made pretty good progress with this. I basically just migrated BufferDiffPanel out from JMeldPanel and used that. The one thing I haven't figured out yet is how to disable the delete function built into the little connectors that show what lines/sections go together. I like the connectors, but I just want to make it so that you can't delete.
Thanks.