@@ -1425,6 +1425,37 @@ private void _setupCompilerPanel(ConfigPanel panel) {
14251425
14261426 /** Add all of the components for the Interactions panel of the preferences window. */
14271427 private void _setupInteractionsPanel (ConfigPanel panel ) {
1428+ final DirectoryOptionComponent wdComponent =
1429+ new DirectoryOptionComponent (OptionConstants .FIXED_INTERACTIONS_DIRECTORY ,
1430+ "Interactions Working Directory" , this ,
1431+ "<html>Working directory for the Interactions Pane (unless<br>" +
1432+ "a project working directory has been set).</html>" ,
1433+ _dirChooser );
1434+ addOptionComponent (panel , wdComponent );
1435+ final BooleanOptionComponent stickyComponent =
1436+ new BooleanOptionComponent (OptionConstants .STICKY_INTERACTIONS_DIRECTORY ,
1437+ "<html><p align=\" right\" >" +
1438+ StringOps .
1439+ splitStringAtWordBoundaries ("Restore last working directory of the Interactions pane on start up" ,
1440+ 33 , "<br>" , SEPS ), this ,
1441+ "<html>Whether to restore the last working directory of the Interaction pane on start up,<br>" +
1442+ "or to always use the value of the \" user.home\" Java property<br>" +
1443+ "(currently " +System .getProperty ("user.home" )+")." );
1444+ addOptionComponent (panel , stickyComponent );
1445+
1446+ // OptionComponent.ChangeListener wdListener = new OptionComponent.ChangeListener() {
1447+ // public Object value(Object oc) {
1448+ // File f = wdComponent.getComponent().getFileFromField();
1449+ // boolean enabled = (f == null) || (f.equals(FileOps.NULL_FILE));
1450+ // stickyComponent.getComponent().setEnabled(enabled);
1451+ // return null;
1452+ // }
1453+ // };
1454+ // wdListener.value(wdComponent);
1455+
1456+ addOptionComponent (panel , new LabelComponent ("<html> </html>" , this , true ));
1457+ addOptionComponent (panel , new LabelComponent ("<html> </html>" , this , true ));
1458+
14281459 addOptionComponent (panel , new IntegerOptionComponent (OptionConstants .HISTORY_MAX_SIZE , "Size of Interactions History" , this ,
14291460 "The number of interactions to remember in the history." ));
14301461 addOptionComponent (panel , new BooleanOptionComponent (OptionConstants .DIALOG_AUTOIMPORT_ENABLED ,
@@ -1458,15 +1489,6 @@ protected boolean verify(String s) {
14581489 }
14591490 };
14601491 addOptionComponent (panel , autoImportClasses );
1461- addOptionComponent (panel ,
1462- new BooleanOptionComponent (OptionConstants .STICKY_INTERACTIONS_DIRECTORY ,
1463- "<html><p align=\" right\" >" +
1464- StringOps .
1465- splitStringAtWordBoundaries ("Restore last working directory of the Interactions pane on start up" ,
1466- 33 , "<br>" , SEPS ), this ,
1467- "<html>Whether to restore the last working directory of the Interaction pane on start up,<br>" +
1468- "or to always use the value of the \" user.home\" Java property<br>" +
1469- "(currently " +System .getProperty ("user.home" )+")." ));
14701492
14711493 addOptionComponent (panel , new LabelComponent ("<html> </html>" , this , true ));
14721494 addOptionComponent (panel , new LabelComponent ("<html> </html>" , this , true ));
0 commit comments