}
}
- public final static int CONNECTIONS_TAB = 5;
+ public static enum TabRef
+ {
+ CONNECTIONS_TAB, STRUCTURE_TAB
+ };
- public void selectTab(int selectTab)
+ public void selectTab(TabRef selectTab)
{
// select a given tab - currently only for Connections
switch (selectTab)
case CONNECTIONS_TAB:
tabbedPane.setSelectedComponent(connectTab);
break;
+ case STRUCTURE_TAB:
+ tabbedPane.setSelectedComponent(structureTab);
+ break;
default:
}
}
}
/**
- * Show a dialog for the user to choose a file. Returns the chosen path, or
- * null on Cancel.
+ * Show a dialog for the user to choose a file. Returns the chosen path, or null
+ * on Cancel.
*
* @return
*/
String choice = null;
JFileChooser chooser = new JFileChooser();
+ // Enable appBundleIsTraversable in macOS FileChooser to allow selecting
+ // hidden executables within .app dirs
+ if (Platform.isMac())
+ {
+ chooser.putClientProperty("JFileChooser.appBundleIsTraversable",
+ true);
+ }
+
// chooser.setFileView(new JalviewFileView());
chooser.setDialogTitle(
MessageManager.getString("label.open_local_file"));
* DOCUMENT ME!
*
* @param e
- * DOCUMENT ME!
+ * DOCUMENT ME!
*/
public void ok_actionPerformed(ActionEvent e)
{
* DOCUMENT ME!
*
* @param e
- * DOCUMENT ME!
+ * DOCUMENT ME!
*/
public void cancel_actionPerformed(ActionEvent e)
{
* DOCUMENT ME!
*
* @param e
- * DOCUMENT ME!
+ * DOCUMENT ME!
*/
public void annotations_actionPerformed(ActionEvent e)
{