I personally prefer the FlyoutPalette over the one we implemented in TutoGEF. In order to use it we have to do some minor changes to our code:
In tutogef.MyGraphicalEditor change:
public class MyGraphicalEditor extends GraphicalEditorWithPalette
to:
public class MyGraphicalEditor extends GraphicalEditorWithFlyoutPalette
Also remove the methode initializePaletteViewer()
To get our DragSourceListener we just removed back we need to Override another methode:
@Override
protected PaletteViewerProvider createPaletteViewerProvider() {
return new PaletteViewerProvider(getEditDomain()) {
protected void configurePaletteViewer(PaletteViewer viewer) {
super.configurePaletteViewer(viewer);
viewer.addDragSourceListener(new TemplateTransferDragSourceListener(viewer))
protected PaletteViewerProvider createPaletteViewerProvider() {
return new PaletteViewerProvider(getEditDomain()) {
protected void configurePaletteViewer(PaletteViewer viewer) {
super.configurePaletteViewer(viewer);
viewer.addDragSourceListener(new TemplateTransferDragSourceListener(viewer))
}
};
}
};
}
3 comments:
thank you it was simple and useful
thank you it was simple and useful
Hi! I am south korean java developer.
I am going to develop about deeplearning program.i use gef,So i need your update TutoGEF.I take a cut at downloading your update TutoGEF. but i don't download your UpdateTutoGEF. So I send a email. My english ability is short. I would try to get your update TutoGEF. Please send your update TutoGEF.
Said thank you for your attention :)
Post a Comment