private void jButton2ActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton2ActionPerformed if (mpv5.ui.dialogs.Popup.Y_N_dialog( "Really delete all invoices, orders and offers from the database? This is irreversible!!! Contacts and Products will not be affected.", Messages.ARE_YOU_SURE)) { if (Popup.Y_N_dialog(Messages.ARE_YOU_SURE)) { Popup.notice( QueryHandler.instanceOf() .freeQuery("delete from items", MPSecurityManager.ADMINISTRATE, "Item reset done.") .getMessage()); final String fmessage = "ITEM RESET: removed all invoices, orders and offers from database"; final String fdbid = "items"; final int fids = 0; final int fgids = 1; Runnable runnable = new Runnable() { @Override public void run() { QueryHandler.instanceOf() .clone(Context.getHistory()) .insertHistoryItem( fmessage, mpv5.db.objects.User.getCurrentUser().__getCname(), fdbid, fids, fgids); } }; SwingUtilities.invokeLater(runnable); } } } // GEN-LAST:event_jButton2ActionPerformed
private void setSettings() { if (font.getText().equalsIgnoreCase(getFontString(Font.decode(null)))) { LocalSettings.setProperty( LocalSettings.DEFAULT_FONT, getFontString(jFontChooser1.getSelectedFont())); } else if (font.getText() != null && font.getText().length() > 0 && !(getFontString(font.getText())).equalsIgnoreCase(getFontString(Font.decode(null)))) { LocalSettings.setProperty(LocalSettings.DEFAULT_FONT, getFontString(font.getText())); } else { Popup.notice(Messages.VALUE_NOT_VALID + font.getText()); } jFontChooser1.setSelectedFont( Font.decode(LocalSettings.getProperty(LocalSettings.DEFAULT_FONT))); font.setText(getFontString(jFontChooser1.getSelectedFont())); applyFont(Font.decode(getFontString(font.getText()))); }