Replies: 1 comment 1 reply
-
Freeplane uses Java Swing for its GUI, which provides the component When I copy the example code, from JFileChooser.html, as a script to my mind map ( import javax.swing.JFileChooser
import javax.swing.filechooser.FileNameExtensionFilter
JFileChooser chooser = new JFileChooser();
FileNameExtensionFilter filter = new FileNameExtensionFilter(
"JPG & GIF Images", "jpg", "gif");
chooser.setFileFilter(filter);
int returnVal = chooser.showOpenDialog();
if(returnVal == JFileChooser.APPROVE_OPTION) {
System.out.println("You chose to open this file: " +
chooser.getSelectedFile().getName());
} If I were a developer looking to change file choosers in Freeplane, I'd start with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, the Freeplane native Java file chooser is a major friction point for me. I've asked before about how to change it and @dpolivaev said that there were good reasons that Freeplane uses the Java file picker rather an the OS native file dialog: https://sourceforge.net/p/freeplane/discussion/758437/thread/02f600d6f6/
I understand that there are benefits to the native chooser, but I'm still interested in having the option of a native file picker as an option. I even found someone else to implement this option but his questions went unanswered so he didn't know how to start figuring out how to implement this option: #1591
I really want this option, even as an add-on or a custom fork (although I really hope to avoid that), but I need some help letting me know how a coder might approach figuring out how to do it. If this option is not in the API, is it even possible to do this with an add-on? Would it require a fork of Freeplane or a big rewrite of major parts of the code? Is it just a matter of knowing the right variable in the code or something? I'm totally ignorant of this sort of thing so I would really appreciate any guidance about how to approach a project to make it possible to do this.
Beta Was this translation helpful? Give feedback.
All reactions