private void btn_initdebate_selectlogoActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btn_initdebate_selectlogoActionPerformed // TODO add your handling code here: String logoPath = ""; logoPath = BungeniEditorProperties.getEditorProperty("logoPath"); log.debug("logo path = " + logoPath); String strPath = DefaultInstanceFactory.DEFAULT_INSTALLATION_PATH(); logoPath = strPath + File.separator + logoPath.replace('/', File.separatorChar); log.debug("logo path new = " + logoPath); JFileChooser chooser = new JFileChooser(); chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); File fLogoPath = new File(logoPath); chooser.setCurrentDirectory(fLogoPath); int nReturnVal = chooser.showOpenDialog(this); if (nReturnVal == JFileChooser.APPROVE_OPTION) { File file = chooser.getSelectedFile(); m_strLogoFileName = file.getName(); m_strLogoPath = file.getAbsolutePath(); txt_initdebate_selectlogo.setText(m_strLogoFileName); // This is where a real application would open the file. log.debug("Opening: " + file.getName() + "." + "\n"); } else { log.debug("Open command cancelled by user." + "\n"); } } // GEN-LAST:event_btn_initdebate_selectlogoActionPerformed
public void init() { super.init(); initComponents(); // default m_strLogoPath String logoPath = BungeniEditorProperties.getEditorProperty("logoPath"); log.debug("logo path = " + logoPath); String strPath = DefaultInstanceFactory.DEFAULT_INSTALLATION_PATH(); m_strLogoPath = strPath + File.separator + logoPath + File.separator + "default_logo.jpg"; log.debug("InitDebateRecord:" + m_strLogoPath); dt_initdebate_timeofhansard.setModel( new SpinnerDateModel(new Date(), null, null, Calendar.HOUR)); dt_initdebate_timeofhansard.setEditor( new JSpinner.DateEditor(dt_initdebate_timeofhansard, "HH:mm")); ((JSpinner.DefaultEditor) dt_initdebate_timeofhansard.getEditor()) .getTextField() .setEditable(false); this.dt_initdebate_hansarddate.setInputVerifier(new DateVerifier()); buildComponentsArray(); }
/** Creates a new instance of EditorSelectionActionHandler */ public EditorSelectionActionHandler() { dbSettings = new BungeniClientDB( DefaultInstanceFactory.DEFAULT_INSTANCE(), DefaultInstanceFactory.DEFAULT_DB()); }