List of usage examples for javax.swing JFileChooser setApproveButtonToolTipText
@BeanProperty(preferred = true, description = "The tooltip text for the ApproveButton.") public void setApproveButtonToolTipText(String toolTipText)
ApproveButton
. From source file:Main.java
public static void main(String[] argv) { JFileChooser chooser = new JFileChooser(); // Set the text chooser.setApproveButtonText("New Approve Text"); // Set the mnemonic chooser.setApproveButtonMnemonic('a'); // Set the tool tip chooser.setApproveButtonToolTipText("New Approve Tool Tip"); chooser.showOpenDialog(null);/*from w w w .j a v a2s .c o m*/ }
From source file:Main.java
public static void main(String[] argv) { JFileChooser chooser = new JFileChooser(); // Set the text chooser.setApproveButtonText("New Approve Text"); // Set the mnemonic chooser.setApproveButtonMnemonic((int) 'a'); // Set the tool tip chooser.setApproveButtonToolTipText("New Approve Tool Tip"); chooser.showOpenDialog(null);/*from w w w. j a va2s.c o m*/ }
From source file:com.nubits.nubot.launch.toolkit.LaunchUI.java
private JFileChooser createFileChoser() { JFileChooser fileChooser = new JFileChooser(); // Set the text of the button fileChooser.setApproveButtonText("Import"); // Set the tool tip fileChooser.setApproveButtonToolTipText("Import configuration file"); //Filter .json files FileFilter filter = new FileNameExtensionFilter(".json files", "json"); fileChooser.setFileFilter(filter);/*from w ww.j a v a 2 s . c o m*/ fileChooser.setCurrentDirectory(new File(local_path)); return fileChooser; }
From source file:net.aepik.alasca.gui.util.LoadFileFrame.java
/** * Perform action on event for this object. *//* w ww. j a v a 2 s . c om*/ public void actionPerformed(ActionEvent e) { Object o = e.getSource(); if (o == boutonOpenFile) { JFileChooser jfcProgramme = new JFileChooser("."); jfcProgramme.setMultiSelectionEnabled(false); jfcProgramme.setDialogTitle("Selectionner un fichier"); jfcProgramme.setApproveButtonText("Selectionner"); jfcProgramme.setApproveButtonToolTipText("Cliquer apres avoir selectionn un fichier"); jfcProgramme.setAcceptAllFileFilterUsed(false); if (jfcProgramme.showDialog(this, null) == JFileChooser.APPROVE_OPTION) { try { filename.setText(jfcProgramme.getSelectedFile().getCanonicalPath()); } catch (IOException ioe) { JOptionPane.showMessageDialog(null, "Erreur de nom de fichier.", "Erreur", JOptionPane.ERROR_MESSAGE); } } } if (o == boutonOk && filename.getText().length() != 0) { if (!this.loadFile(filename.getText(), (String) this.syntaxes.getSelectedItem())) { JOptionPane.showMessageDialog(this, this.getErrorMessage(), "Erreur", JOptionPane.ERROR_MESSAGE); } else { windowClosing(null); } } if (o == boutonAnnuler) { windowClosing(null); } }
From source file:de.dmarcini.submatix.pclogger.gui.ProgramProperetysDialog.java
/** * Suche einen Platz und den Namen frs Logfile Project: SubmatixBTForPC Package: de.dmarcini.submatix.pclogger.gui * //from w w w. j a va 2s . co m * @author Dirk Marciniak (dirk_marciniak@arcor.de) Stand: 03.08.2012 */ private void chooseLogFile() { JFileChooser fileChooser; int retVal; // // Einen Dateiauswahldialog Creieren // fileChooser = new JFileChooser(); fileChooser.setLocale(Locale.getDefault()); fileChooser.setDialogTitle(fileChooserLogTitle); fileChooser.setDialogType(JFileChooser.CUSTOM_DIALOG); fileChooser.setApproveButtonToolTipText(approveLogButtonTooltip); // das existierende Logfile voreinstellen fileChooser.setSelectedFile(SpxPcloggerProgramConfig.logFile); retVal = fileChooser.showDialog(this, approveLogButtonText); // Mal sehen, was der User gewollt hat if (retVal == JFileChooser.APPROVE_OPTION) { // Ja, ich wollte das so // nach dem nchsten Programmstart dieses File anlegen/nutzen logfileNameTextField.setText(fileChooser.getSelectedFile().getAbsolutePath()); wasChangedParameter = true; lg.debug("select <" + fileChooser.getSelectedFile().getName() + "> as new logfile after restart."); } }
From source file:de.dmarcini.submatix.pclogger.gui.ProgramProperetysDialog.java
/** * Verzeichnis fr die Daten auswhlen Project: SubmatixBTForPC Package: de.dmarcini.submatix.pclogger.gui * /*from w ww . ja v a 2 s. c o m*/ * @author Dirk Marciniak (dirk_marciniak@arcor.de) Stand: 03.08.2012 */ private void chooseDataDir() { JFileChooser fileChooser; int retVal; // // Einen Dateiauswahldialog Creieren // fileChooser = new JFileChooser(); fileChooser.setLocale(Locale.getDefault()); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fileChooser.setDialogTitle(fileChooserDirTitle); fileChooser.setDialogType(JFileChooser.CUSTOM_DIALOG); fileChooser.setApproveButtonToolTipText(approveDirButtonTooltip); // das existierende Logfile voreinstellen fileChooser.setSelectedFile(SpxPcloggerProgramConfig.databaseDir); retVal = fileChooser.showDialog(this, approveDirButtonText); // Mal sehen, was der User gewollt hat if (retVal == JFileChooser.APPROVE_OPTION) { // Ja, ich wollte das so databaseDirTextField.setText(fileChooser.getSelectedFile().getAbsolutePath()); wasChangedParameter = true; } }
From source file:de.dmarcini.submatix.pclogger.gui.ProgramProperetysDialog.java
/** * Das exportverzeichis auswhlen Project: SubmatixBTForPC Package: de.dmarcini.submatix.pclogger.gui * /*from ww w . j a va2 s. c om*/ * @author Dirk Marciniak (dirk_marciniak@arcor.de) Stand: 28.08.2012 */ private void chooseExportDir() { JFileChooser fileChooser; int retVal; // // Einen Dateiauswahldialog Creieren // fileChooser = new JFileChooser(); fileChooser.setLocale(Locale.getDefault()); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fileChooser.setDialogTitle(fileChooserExportDirTitle); fileChooser.setDialogType(JFileChooser.CUSTOM_DIALOG); fileChooser.setApproveButtonToolTipText(approveDirButtonTooltip); // das existierende Verzeichnis voreinstellen fileChooser.setSelectedFile(SpxPcloggerProgramConfig.exportDir); retVal = fileChooser.showDialog(this, approveDirButtonText); // Mal sehen, was der User gewollt hat if (retVal == JFileChooser.APPROVE_OPTION) { // Ja, ich wollte das so exportDirTextField.setText(fileChooser.getSelectedFile().getAbsolutePath()); wasChangedParameter = true; } }