@@ -720,8 +720,13 @@ private void createInitLayout(SDKUrlHolder downloadUrls) {
720
720
downloadPathPanel .setLayout (new BorderLayout ());
721
721
JLabel pathLabel = new JLabel ("Installation Path: " );
722
722
downloadPathPanel .add (pathLabel ,BorderLayout .NORTH );
723
+
723
724
final JLabel locationLabel = new JLabel (processing .app .Base .getSketchbookFolder ().getAbsolutePath ());
725
+ locationLabel .setMaximumSize (Toolkit .zoom (100 ,locationLabel .getHeight ()));
726
+ locationLabel .setPreferredSize (Toolkit .zoom (100 ,locationLabel .getHeight ()));
727
+ locationLabel .setToolTipText (locationLabel .getText ());
724
728
downloadPathPanel .add (locationLabel ,BorderLayout .WEST );
729
+
725
730
JButton selectPathButton = new JButton ("Change" );
726
731
Dimension dim = new Dimension (Toolkit .getButtonWidth (),
727
732
Toolkit .zoom (selectPathButton .getPreferredSize ().height ));
@@ -735,13 +740,20 @@ public void actionPerformed(ActionEvent e) {
735
740
fd .setModalityType (Dialog .ModalityType .APPLICATION_MODAL );
736
741
fd .setVisible (true );
737
742
System .setProperty ("apple.awt.fileDialogForDirectories" , "false" );
743
+ if (fd .getFile () != null ){
744
+ locationLabel .setText (new File (fd .getDirectory (),fd .getFile ()).getAbsolutePath ());
745
+ locationLabel .setToolTipText (locationLabel .getText ());
746
+ }
738
747
} else {
739
748
JFileChooser fc = new JFileChooser ();
740
749
fc .setDialogTitle ("Select Download Location" );
741
750
fc .setCurrentDirectory (processing .app .Base .getSketchbookFolder ());
742
751
fc .setFileSelectionMode (JFileChooser .DIRECTORIES_ONLY );
743
752
fc .showOpenDialog (SDKDownloader .super .rootPane ); //To put it on top of the modalDialog
744
- if (fc .getSelectedFile () != null ) locationLabel .setText (fc .getSelectedFile ().getAbsolutePath ());
753
+ if (fc .getSelectedFile () != null ) {
754
+ locationLabel .setText (fc .getSelectedFile ().getAbsolutePath ());
755
+ locationLabel .setToolTipText (locationLabel .getText ());
756
+ }
745
757
}
746
758
}
747
759
});
0 commit comments