private void jbtnActualizarActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jbtnActualizarActionPerformed // TODO add your handling code here: accion = "NUEVO"; llenarAtributos(); try { if (fechaDesde != null && fechaHasta != null) { llenarjTableUtilidades(); manejoControles(true); manejoBotones(); } else javax.swing.JOptionPane.showInternalMessageDialog( this, "Existe un problema con la fecha desde y/o la fecha hasta.."); } catch (java.rmi.RemoteException re) { javax.swing.JOptionPane.showMessageDialog( null, "Se perdio la conexion. Contacte con el administrador..."); } catch (javax.ejb.EJBException eje) { javax.swing.JOptionPane.showMessageDialog( null, "Se perdio la conexion. Contacte con el administrador..."); } catch (javax.naming.NameNotFoundException nnfe) { javax.swing.JOptionPane.showMessageDialog( null, "El programa servidor no esta listo. Intente mas tarde..."); } catch (Exception e) { shrimp.helper.Excepciones.guardarExcepcionesAC( e, getClass().getName(), mDIShrimp.getSisInfoTO()); } if (jtblXiiiSueldo.getRowCount() > 0) { jtblXiiiSueldo.requestFocus(); jtblXiiiSueldo.changeSelection(0, 0, false, false); } } // GEN-LAST:event_jbtnActualizarActionPerformed
/// reporte de imprimir private void jbtnImprimirActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: accion = "IMPRIMIR"; compararCambioParametros(); // private shrimp.contabilidad.beanbinding.ContabilidadBBMayorAuxiliar // contabilidadBBMayorAuxiliar1; variable global if (contabilidadBBMayorAuxiliar1.getListaConMayorAuxiliarTO().size() > 0) { fechaDesde = jftfFechaDesde.getText().trim(); fechaHasta = jftfFechaHasta.getText().trim(); codigoCuentaDesde = jtfCuentaDesde.getText().trim() + " | " + jlblNombreCuentaDesde.getText().trim(); codigoCuentaHasta = jtfCuentaHasta.getText().trim(); LlamarReporteContabilidad.generarReporteMayorAuxiliarVistaPrevia( mDIShrimp, fechaDesde, fechaHasta, codigoCuentaDesde, "", contabilidadBBMayorAuxiliar1.getListaConMayorAuxiliarTO()); this.requestFocus(); } else { javax.swing.JOptionPane.showInternalMessageDialog( this, "No se puede generar un reporte en una tabla vacía..."); jtfCuentaDesde.requestFocus(); } }
private void btnUpdateActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnUpdateActionPerformed try { String newTypeName = tfUpdateName.getText(); String oldTypeName = lstTypes.getSelectedValue().toString(); PreparedStatement st = con.prepareStatement(Queries.UPDATE_SITE_TYPE); st.setString(1, newTypeName); st.setString(2, oldTypeName); st.executeUpdate(); fillTypes(); } catch (SQLException e) { if (e.getErrorCode() == 547) { JOptionPane.showInternalMessageDialog( this, "This type is already in use!", "Bummer!", JOptionPane.ERROR_MESSAGE); System.err.println( "Error code: " + e.getErrorCode() + "\nError Message: " + e.getMessage()); } else { System.err.println( "Error code: " + e.getErrorCode() + "\nError Message: " + e.getMessage()); } } } // GEN-LAST:event_btnUpdateActionPerformed
private void btnRegEstadoActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnRegEstadoActionPerformed if (this.btnRegEstado.getLabel() == "Registrar") { classEstados estados = new classEstados(); String strRespuesta = ""; if (this.cboPaises.getSelectedItem().toString() == "") { JOptionPane.showInternalMessageDialog(rootPane, "Es necesario elegir un país"); return; } estados.strEstado = this.txtNombreEstado.getText(); estados.StrPais = (this.cboPaises.getSelectedItem().toString().substring(0, 4).toString()); try { estados.ingresarEstado(); defineTablaEstados( "", 1, Long.parseLong(this.cboPaises.getSelectedItem().toString().substring(0, 4).toString())); limpiar(); JOptionPane.showInternalMessageDialog(rootPane, "Registrado Correctamente"); } catch (SQLException ex) { Logger.getLogger(frmEstados.class.getName()).log(Level.SEVERE, null, ex); } } else { classEstados estados = new classEstados(); estados.lngIdEstado = Long.valueOf(this.txtIdEstado.getText()); estados.StrPais = (this.cboPaises.getSelectedItem().toString().substring(0, 4).toString()); estados.strEstado = this.txtNombreEstado.getText(); try { if (estados.actualizarEstado() == true) { this.defineTablaEstados( this.txtBuscar.getText(), Long.valueOf(this.txtPagina.getText()), Long.parseLong( this.cboPaises.getSelectedItem().toString().substring(0, 4).toString())); JOptionPane.showInternalMessageDialog(rootPane, "Actualizado Correctamente"); } } catch (SQLException ex) { Logger.getLogger(frmGruposUsuarios.class.getName()).log(Level.SEVERE, null, ex); } } } // GEN-LAST:event_btnRegEstadoActionPerformed
// Extract all quotes from the quote bundle which cause the given // expression to equate to true. If there is no expression (string is null or // empty) then extract all the quotes. private List extractQuotesUsingRule(String filterExpression, EODQuoteBundle quoteBundle) { // If there is no rule, then just return all quotes if (filterExpression == null || filterExpression.length() == 0) return extractAllQuotes(quoteBundle); // First parse the expression Expression expression = null; try { expression = Parser.parse(filterExpressionString); } catch (ExpressionException e) { // We should have already checked the string for errors before here assert false; } // Add symbols to list when expression proves true ArrayList quotes = new ArrayList(); Iterator iterator = quoteBundle.iterator(); TradingDate lastDate = quoteBundle.getLastDate(); try { // Traverse all symbols on all dates while (iterator.hasNext()) { Quote quote = (Quote) iterator.next(); Symbol symbol = quote.getSymbol(); TradingDate date = quote.getDate(); int dateOffset = 0; try { dateOffset = quoteBundle.dateToOffset(date); } catch (WeekendDateException e) { assert false; } if (!singleDate || (lastDate.equals(quote.getDate()))) { if (expression.evaluate(new Variables(), quoteBundle, symbol, dateOffset) >= Expression.TRUE_LEVEL) quotes.add(quote); } } return quotes; } catch (EvaluationException e) { // Tell user expression didnt evaluate properly JOptionPane.showInternalMessageDialog( DesktopManager.getDesktop(), e.getReason() + ": " + expression.toString(), Locale.getString("ERROR_EVALUATION_EQUATION"), JOptionPane.ERROR_MESSAGE); // delete erroneous expression expression = null; // If the expression didn't evaluate then just return all the quotes return extractAllQuotes(quoteBundle); } }
/** * Indicates wether the panel has been validated or not. * * @return Always true. */ public boolean isValidated() { if (!isValid) { doSudoCmd(); } if (!isValid) { JOptionPane.showInternalMessageDialog( this, "Password", "Password is not valid", JOptionPane.ERROR_MESSAGE); } return isValid; }
private void jbtnImprimirActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: if (bbRRHHFunciones.getListaConsolidadoBonosViaticosTO().size() > 0) { LlamarReporteRrhh.generarReporteConsolidadoBonosViaticoVistaPrevia( mDIShrimp, fechaDesde, fechaHasta, bbRRHHFunciones.getListaConsolidadoBonosViaticosTO()); } else { javax.swing.JOptionPane.showInternalMessageDialog(this, "No hay datos para imprimir..."); this.requestFocus(); } }
private void jbtnImprimirActionPerformed(java.awt.event.ActionEvent evt) { if (bbResumenCorrida1.getListaPrdListaResumenCorridaTO() != null) { if (bbResumenCorrida1.getListaPrdListaResumenCorridaTO().size() > 0) { LlamarReporteProduccion.generarReporteResumenPescaVistaPrevia( mDIShrimp, bbResumenCorrida1.getListaPrdListaResumenCorridaTO()); } else { javax.swing.JOptionPane.showInternalMessageDialog(this, "No hay datos para imprimir..."); this.requestFocus(); } } }
private void btnEliminarActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnEliminarActionPerformed classEstados estados = new classEstados(); estados.lngIdEstado = Long.valueOf(this.txtIdEstado.getText()); estados.StrPais = (this.cboPaises.getSelectedItem().toString().substring(0, 4).toString()); try { estados.eliminarEstado(); defineTablaEstados("", 1, 1); this.limpiar(); JOptionPane.showInternalMessageDialog(rootPane, "Eliminado Correctamente"); } catch (SQLException ex) { Logger.getLogger(frmGruposUsuarios.class.getName()).log(Level.SEVERE, null, ex); } } // GEN-LAST:event_btnEliminarActionPerformed
/** * When the user clicks on the Submit button, all frames close itself and the High Score frame * will appear with the user's score added to the list. */ public void actionPerformed(ActionEvent e) { try { scoreFrame.writeFile(); newGameFrame.setVisible(false); newGameFrame.dispose(); scoreFrame.setVisible(false); scoreFrame.dispose(); createHighscoreFrame(); } catch (Exception e1) { e1.printStackTrace(); JOptionPane.showInternalMessageDialog( null, "Error writing file(s)", "File Error", JOptionPane.WARNING_MESSAGE); } }
// lista.get(0) = mensaje // lista.get(0+n) = cuerpo public static void presentarInformacion( java.util.List<String> lista, javax.swing.JFrame jFrame, javax.swing.JInternalFrame jInternalFrame) { if (lista.size() > 1) { javax.swing.JPanel jPanel = new javax.swing.JPanel(); // añadir un Panel superior para el borderLayout javax.swing.JPanel jPanelTitulo = new javax.swing.JPanel(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); javax.swing.JPanel jPanelContenido = new javax.swing.JPanel(); // expandir el contenedor jPanelContenido.setLayout( new javax.swing.BoxLayout(jPanelContenido, javax.swing.BoxLayout.Y_AXIS)); // crea un borderLayout jPanel.setLayout(new java.awt.BorderLayout()); javax.swing.JLabel jLabel = new javax.swing.JLabel(); javax.swing.DefaultListModel defaultListModel = new javax.swing.DefaultListModel(); for (int i = 0; i < lista.size(); i++) if (i > 0) defaultListModel.addElement(lista.get(i)); javax.swing.JList jLista = new javax.swing.JList(); jLista.setModel(defaultListModel); jLabel.setText(lista.get(0).substring(1)); jPanelTitulo.add(jLabel); jPanelContenido.add(new javax.swing.JScrollPane(jLista), java.awt.BorderLayout.CENTER); // añade los paneles al borderLayout jPanel.add(jPanelTitulo, java.awt.BorderLayout.NORTH); jPanel.add(jPanelContenido, java.awt.BorderLayout.CENTER); if (jFrame != null) javax.swing.JOptionPane.showMessageDialog(jFrame, jPanel); if (jInternalFrame != null) javax.swing.JOptionPane.showInternalMessageDialog(jInternalFrame, jPanel); } else { if (jFrame != null) javax.swing.JOptionPane.showMessageDialog(jFrame, lista.get(0).substring(1)); if (jInternalFrame != null) javax.swing.JOptionPane.showInternalMessageDialog( jInternalFrame, lista.get(0).substring(1)); } }
/** * @autor Jack Krauser * @param tituloMensaje El título del mensaje * @param mensaje El mensaje * @param nombreBotones Un arreglo de String que contiene el nombre de los botones y tiene este * formato: new String[]{"Boton4", "Boton3", "Boton2", "Boton1",} Así como se visualiza es el * orden en el que aparecerá en el diálogo pero inverso, o sea, "Boton4", "Boton3", "Boton2", * "Boton1" se visualiza asi: "Boton1", "Boton2", "Boton3", "Boton4" * @param nombreBotonFoco Nombre del botón que obtendrá el foco al iniciar el formulario * @param jFrame Define quien será el jFrame padre de este diálogo * @param jInternalFrame Define quien será el jInternalFrame padre de este diálogo * @return Retorno un entero indicando que botón fue presionado siendo 3 el primer botón de * izquierda a derecha (es decir de 3 a 0) */ public static int presentarInformacionConCuatroBotones( String tituloMensaje, String mensaje, String[] nombreBotones, String nombreBotonFoco, javax.swing.JFrame jFrame, javax.swing.JInternalFrame jInternalFrame) { int retorno = 0; if (mensaje.charAt(0) == 'T') { if (jFrame != null) retorno = javax.swing.JOptionPane.showOptionDialog( jFrame, mensaje.substring(1), tituloMensaje, javax.swing.JOptionPane.YES_NO_OPTION, javax.swing.JOptionPane.INFORMATION_MESSAGE, null, nombreBotones, nombreBotonFoco); if (jInternalFrame != null) retorno = javax.swing.JOptionPane.showInternalOptionDialog( jInternalFrame, mensaje.substring(1), tituloMensaje, javax.swing.JOptionPane.YES_NO_OPTION, javax.swing.JOptionPane.INFORMATION_MESSAGE, null, nombreBotones, nombreBotonFoco); } else { if (jFrame != null) javax.swing.JOptionPane.showMessageDialog(jFrame, mensaje.substring(1)); if (jInternalFrame != null) javax.swing.JOptionPane.showInternalMessageDialog(jInternalFrame, mensaje.substring(1)); } return retorno; }
private void jbtnImprimirActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: if (carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().size() > 0) { llenarAtributos(); java.util.List<cartera.reporte.ReporteListadoPagos> reporteListadoPagoses = new java.util.ArrayList(); cartera.reporte.ReporteListadoPagos reporteListadoPagos = null; for (int i = 0; i < carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().size(); i++) { reporteListadoPagos = new cartera.reporte.ReporteListadoPagos(); reporteListadoPagos.setCodigoCP(codigoSector); reporteListadoPagos.setDesde(fechaDesde); reporteListadoPagos.setHasta(fechaDesde); reporteListadoPagos.setProveedor(provCodNombre); reporteListadoPagos.setPagNumeroSistema( carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().get(i).getPagNumeroSistema()); reporteListadoPagos.setPagFecha( carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().get(i).getPagFecha()); reporteListadoPagos.setPagProveedor( carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().get(i).getPagProveedor()); reporteListadoPagos.setPagValor( carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().get(i).getPagValor()); reporteListadoPagos.setPagObservaciones( carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().get(i).getPagObservaciones()); reporteListadoPagos.setPagPendiente( carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().get(i).getPagPendiente()); reporteListadoPagos.setPagAnulado( carBBPagosCobrosConsulta.getCarFunPagosDetalleTOs().get(i).getPagAnulado()); reporteListadoPagoses.add(reporteListadoPagos); } shrimp.cartera.reporte.LlamarReporteCartera.generarReporteListadoPagosVistaPrevia( mDIShrimp, reporteListadoPagoses); this.requestFocus(); } else { javax.swing.JOptionPane.showInternalMessageDialog( this, "No se puede generar un reporte en una tabla vacía..."); } }
private void btnAddActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnAddActionPerformed PreparedStatement st; String siteType; try { siteType = tfAddName.getText(); st = con.prepareStatement(Queries.INSERT_SITE_TYPE); st.setString(1, siteType); st.executeUpdate(); fillTypes(); } catch (SQLException e) { if (e.getErrorCode() == 2627) { JOptionPane.showInternalMessageDialog( this, "This type already exists!", "Bummer!", JOptionPane.ERROR_MESSAGE); } else { System.err.println( "Error code: " + e.getErrorCode() + "\nError Message: " + e.getMessage()); } } } // GEN-LAST:event_btnAddActionPerformed
protected void modifyTableContent() { try { // selected lines Collection c = bargeTariffTable.getSelectedModel(); if (c.size() < 1) { MainFrame.setDefaultCursor(); JOptionPane.showInternalMessageDialog( MainFrame.getInstance().getContentPane(), "Please mark at least one line to modify."); return; } BargeTariffLineModificationFrame frame = new BargeTariffLineModificationFrame(c); frame.setVisible(true); // necessary as of 1.3 MainFrame.getInstance().addInternalFrame(frame); try { frame.setSelected(true); } catch (java.beans.PropertyVetoException e) { log.debug("Exception caught and ignored:", e); } } catch (Exception e) { log.error(this, e); } }
private void showInformationMessage(String message) { // @war-pp Container parent = MainFrame.getInstance().getContentPane(); String title = "ICC Manual Tracing Report Creation"; JOptionPane.showInternalMessageDialog(parent, message, title, JOptionPane.INFORMATION_MESSAGE); }
private void systemIsBusy() { JOptionPane.showInternalMessageDialog( c, "The system is currently busy.", "Busy", JOptionPane.INFORMATION_MESSAGE); }
/** * Show an internal dialog about box near the specified component. * * @param component The component near which the about box should be displayed */ protected void displayInternalNear(final Component component) { JOptionPane.showInternalMessageDialog( component, _message, _title, JOptionPane.INFORMATION_MESSAGE); }
/** * Displays an error message. * * @param parent the parent Component. If <code>parent</code> is null, the project's window is * used. * @param title * @param msg */ public static void showError(Component parent, String title, String msg) { JOptionPane.showInternalMessageDialog( notNullOrDefaultParent(parent), msg, title, JOptionPane.ERROR_MESSAGE); }
/** Default constructor. */ Highscore() { super( "Highscore", true, // resizable true, // closable true, // maximizable true); // iconifiable header.setBorder( BorderFactory.createEmptyBorder( 10, // top 10, // left 0, // bottom 10)); body.setBorder( BorderFactory.createEmptyBorder( 0, // top 10, // left 10, // bottom 10)); // call methods here try { readFile(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); JOptionPane.showInternalMessageDialog( null, "Error writing file(s)", "File Error", JOptionPane.WARNING_MESSAGE); } titleText.setText("Username\t" + "Time Elapse\t" + "Wrong(s)\t" + "Right(s)\t"); JScrollPane pScroll = new JScrollPane( scoreLine, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); header.setLayout(new GridLayout(2, 1, 2, 2)); body.setLayout(new GridLayout(1, 1)); content.setLayout(new BorderLayout()); mainPanel.setLayout(new BorderLayout()); buttonHolder.setLayout(new GridLayout(1, 2, 2, 2)); // add listeners done.addActionListener(new DoneButtonListener()); newGame.addActionListener(new NewGameButtonListener()); scoreLine.setEditable(false); titleText.setEditable(false); header.add(new JLabel("High Score")); header.add(new JSeparator(JSeparator.HORIZONTAL)); buttonHolder.add(done); buttonHolder.add(newGame); content.add(titleText, BorderLayout.NORTH); content.add(pScroll, BorderLayout.CENTER); content.add(buttonHolder, BorderLayout.SOUTH); body.add(content); mainPanel.add(header, BorderLayout.NORTH); mainPanel.add(body, BorderLayout.CENTER); add(mainPanel); }
@Override public void actionPerformed(ActionEvent event) { String cmd = event.getActionCommand(); statusBar.setStatus("Befehl " + cmd + " wird ausgefuehrt..."); System.out.println(cmd); if (cfg.useCmd_log()) { SendToServer.info("Action:" + cmd); } /* * Aufruf einer "Unterfunktion" in separatem thread: * * !!! Setzt aber voraus, daß der ActionListener in einem separaten * "NichtSwingThread" läuft! * * SwingUtilities.invokeLater(new Runnable() { * * public void run() { jIntKfzLb lb = new jIntKfzLb(); MyEventListener * el = new MyEventListener(); lb.addMyEventListener(el); * lb.setVisible(true); dp.add(lb); } }); } */ /* * LOGIN mit Aufbau Vbdg. */ if (cmd.equals("Anmeldung")) { this.cfg.initLDAP(); this.gui.initMenu(); this.cfg.setDst_list(null); System.out.println("Starte Anmelde-Prozess..."); lD = LoginDialog.getInstance(); } if (cmd.equals("USER")) { String user = LoginDialog.getInstance().getUserName(); this.snd.play(Sound.SoundClip.KASSE); if (this.cfg.isDebug()) { System.out.println("USER: "******"LOGIN")) { if (this.cfg.isWaitPanel() && this.cfg.isUseSwingWorker()) { this.workerWait = new SwingWorker<String, Void>() { @Override protected String doInBackground() { wt = new Wait("WARTE", "Anmeldung am System..."); return "OK"; } @Override protected void done() {} }; workerLogin = new SwingWorker<String, Void>() { @Override protected String doInBackground() { gui.login2(); return "OK"; } @Override protected void done() { wt.stop(); } }; // bei Anmeldung wird versucht, LOG-Eintrag zu erstellen, auch // wenn eventuell vorher die Vbdg. zum CMD-Server ohne Erfolg war cfg.setCmd_log(true); workerWait.execute(); workerLogin.execute(); } else { CursorTools.startWaitCursor(gui); gui.login2(); CursorTools.stopWaitCursor(gui); } } if (cmd.equals("ABBRUCH")) { if (lD != null) { System.out.println("Abbruch LOGIN- Bearbeitung..."); lD.close(); lD = null; cfg.initLDAP(); cfg.setLogin_usr(""); cfg.setLogin_pwd(""); cfg.setLogin_ok(false); Jan.logger.info("===> Abbruch der Anmeldung "); snd.play(Sound.SoundClip.LASER); gui.setTitle(cfg.getTitle() + " <NICHT ANGEMELDET>"); } } // mit VM verbinden if (cmd.equals("CVM")) { if (cfg.isLogin_ok()) { act_dst = ""; dl = LdapEntry_Parser.parse_protocol(cfg.getLdap_vm().trim()); if (dl != null) { if (dl.getEntryNum() > 1) { SelectDestination sd = new SelectDestination(); act_dst = sd.getDestination(dl); } else if (dl.getEntryNum() == 1) { act_dst = dl.getDstList().get(0).getDestinationTitle(); } else { System.out.println("CVM: destination list is empty!!!"); } } else { System.out.println("CVM: destination list is NULL!!!"); } if (cfg.isDebug()) { System.out.print("selected destination: " + act_dst + "\n"); } StartClientReturnCode rc = Destination_Hub.startThis(act_dst); } else { String msg = "\n Sie sind nicht erfolgreich angemeldet! \n\n"; if (cfg.isInternalFrames()) { JOptionPane.showInternalMessageDialog( gui.getContentPane(), msg, "FEHLER", JOptionPane.ERROR_MESSAGE); } else { JOptionPane.showMessageDialog(gui, msg, "FEHLER", JOptionPane.ERROR_MESSAGE); } } } // Info/Version if (cmd.equals("VERSION")) { snd.play(Sound.SoundClip.TAB); String msg = "\n Titel: " + cfg.getTitle() + "\n Version: " + cfg.getVersion() + "\n\n Autor: " + cfg.getAutor() + "\n\n Info: " + cfg.getInfo() + "\n\n"; if (cfg.isInternalFrames()) { JOptionPane.showInternalMessageDialog( gui.getContentPane(), msg, "Info", JOptionPane.INFORMATION_MESSAGE); } else { JOptionPane.showMessageDialog(gui, msg, "Info", JOptionPane.INFORMATION_MESSAGE); } } // Info/Umgebung if (cmd.equals("ENV")) { String param; snd.play(Sound.SoundClip.TAB); if (cfg.getLdap_vm().length() > 77) { param = cfg.getLdap_vm().substring(1, 77) + "..."; } else { param = cfg.getLdap_vm(); } String msg = "\n" + cfg.getTitle() + "\n" + cfg.getVersion() + "\n\n Host: " + cfg.getLocal_HostName() + "\n IP: " + cfg.getLocal_IP() + "\n MAC: " + cfg.getLocal_MAC() + "\n java version: " + cfg.getLocal_java_version() + "\n os name: " + cfg.getLocal_os_name() + "\n linux Rel.: " + cfg.getLinuxRelease() + "\n jvm version: " + cfg.getLocal_jvm_version() + "\n\n user: "******"\n context: " + cfg.getLogin_context() + "\n PARAM: " + param + "\n eMail: " + cfg.getLdap_mail() + "\n fullName: " + cfg.getLdap_fullName() + "\n last login time: " + Tools.t2s(cfg.getLdap_loginTime()) + "\n login exp. time: " + Tools.t2s(cfg.getLdap_passwordExpirationTime()) + "\n login disabled : " + cfg.getLdap_loginDisabled() + "\n login grace limit : " + cfg.getLdap_loginGraceLimit() + "\n login grace remaining : " + cfg.getLdap_loginGraceRemaining() + "\n passwordMinimumLength : " + cfg.getLdap_passwordMinimumLength() + "\n passwordUniqueRequired: " + cfg.getLdap_passwordUniqueRequired() + "\n\n"; if (cfg.isInternalFrames()) { JOptionPane.showInternalMessageDialog( gui.getContentPane(), msg, "Umgebung", JOptionPane.INFORMATION_MESSAGE); } else { JOptionPane.showMessageDialog(gui, msg, "Umgebung", JOptionPane.INFORMATION_MESSAGE); } } // Info/Uhr if (cmd.equals("UHR")) { JDialog f = new JDialog(); f.setTitle("Uhr-Zeit"); f.setIconImage(res.clockIcon); f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); f.setResizable(false); f.getContentPane().add(new Clock()); f.pack(); f.setLocationRelativeTo(null); f.setAlwaysOnTop(true); f.setResizable(false); f.setVisible(true); } // Hilfe001 if (cmd.equals("HELP001")) { Calendar cal = Calendar.getInstance(); int day = cal.get(Calendar.DAY_OF_MONTH); int month = cal.get(Calendar.MONTH); if (day == 7 && month == 9) { // 7. October Help00x.show(); } else { Help000.show(); } } // CountDown via ProgressMonitor if (cmd.equals("CNTDWN")) { final JDialog f = new JDialog(); f.setTitle("FRAGE"); f.setResizable(false); f.setIconImage(res.clockIcon); f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); f.setSize(290, 220); JLabel l1 = new JLabel("Start-Befehl wurde gesendet."); JLabel l2 = new JLabel(" Was soll ich jetzt tun?"); final JButton ok = new JButton("VERBINDEN"); ok.setMnemonic('v'); ok.setIcon(res.computerImageIcon); ok.setToolTipText("Verbindung wird erneut versucht."); ok.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { gui.getInstance().startRHEV(true); f.dispose(); } }); final JButton cancel = new JButton("Abbruch"); cancel.setMnemonic('a'); cancel.setIcon(res.cancelImageIcon); cancel.setToolTipText("Funktion abbrechen."); cancel.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { f.dispose(); } }); JPanel p = new JPanel(); p.setLayout(new BorderLayout()); JPanel p_north = new JPanel(); JPanel p_south = new JPanel(); JPanel p_center = new JPanel(); JPanel p_east = new JPanel(); JPanel p_west = new JPanel(); p_center.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED)); p_north.add(l1); p_center.add(l2); p_south.add(ok); p_south.add(cancel); p.add(BorderLayout.NORTH, p_north); p.add(BorderLayout.SOUTH, p_south); p.add(BorderLayout.CENTER, p_center); p.add(BorderLayout.EAST, p_east); p.add(BorderLayout.WEST, p_west); CountDown cd = new CountDown(cfg.getRhevCntDwnVMstart()); // p.add(cd); f.add(p); f.pack(); f.setLocationRelativeTo(null); f.setVisible(true); cd.start(); } // Senden if (cmd.equals("SENDEN")) { if (cfg.isLogin_ok()) { System.out.println("starte Sende-Dialog!"); int result = ImportSelector.selectFiles(); if (result > 0) { System.out.println("" + result + " Dateien übertragen"); } else { System.out.println("Fehler " + result + " beim Senden der Dateien aufgetreten."); } } else { String msg = "\n Sie sind nicht erfolgreich angemeldet! \n\n"; if (cfg.isInternalFrames()) { JOptionPane.showInternalMessageDialog( gui.getContentPane(), msg, "FEHLER", JOptionPane.ERROR_MESSAGE); } else { JOptionPane.showMessageDialog(gui, msg, "FEHLER", JOptionPane.ERROR_MESSAGE); } } } // Empfangen if (cmd.equals("EMPFANGEN")) { if (cfg.isLogin_ok()) { System.out.println("starte Empfang-Dialog!"); int result = ExportSelector.selectFiles(); if (result > 0) { System.out.println("" + result + " Dateien kopiert"); } else { System.out.println("Fehler " + result + " beim Empfang der Dateien aufgetreten."); } } else { String msg = "\n Sie sind nicht erfolgreich angemeldet! \n\n"; if (cfg.isInternalFrames()) { JOptionPane.showInternalMessageDialog( gui.getContentPane(), msg, "FEHLER", JOptionPane.ERROR_MESSAGE); } else { JOptionPane.showMessageDialog(gui, msg, "FEHLER", JOptionPane.ERROR_MESSAGE); } } } // Programm-Ende if (cmd.equals("ENDE")) { gui.sac(); } // Computer ausschalten if (cmd.equals("SHUTDOWN")) { System.out.println("Starte Shutdown-Prozess..."); gui.shutdownClient(); } statusBar.setStatus("Befehl " + cmd + " beendet."); }
/** * Displays and about dialog box, regardless of the event, and offers to display the GNU GPL, * offering to download it if it is not found locally. * * @param e ignored action event */ public void actionPerformed(ActionEvent e) { // We only want to open one About Dialog at a time // So if we already have, stop right here if (alreadyOpen) { return; } // Set aleadyOpen to true so we won't open another dialog // if this method is called again while we're still displaying // something alreadyOpen = true; // Open a standard about dialog with the option to // view the GPL or just say OK String message = name + " v" + version + "\n" + blurb + "\n\n" + copyright + "\n\nThis program is Open Source software, or more" + "\nspecifically, free software. You can redistribute" + "\nit and/or modify it under the terms of the GNU" + "\nGeneral Public License (GPL) as published by the " + "\nFree Software Foundation; either version 2 of the" + "\nLicense, or (at your option) any later version.\n"; int viewGPL; Object[] optionButtons = {"View GPL", "OK"}; if (internalFrames) { viewGPL = JOptionPane.showInternalOptionDialog( parent, message, "About " + name, 0, JOptionPane.INFORMATION_MESSAGE, programLogo, optionButtons, optionButtons[1]); } else { viewGPL = JOptionPane.showOptionDialog( parent, message, "About " + name, 0, JOptionPane.INFORMATION_MESSAGE, programLogo, optionButtons, optionButtons[1]); } // If they wanted to view the GPL, try and read the file // from the current directory if (viewGPL == JOptionPane.YES_OPTION) { // Set up the scrollpane to hold the GPL once we read it JTextArea textArea = new JTextArea(15, 60); textArea.setEditable(false); textArea.setWrapStyleWord(true); textArea.setLineWrap(true); // textArea.setFont(new Font("Courier", Font.PLAIN, 10)); JScrollPane scrollPane = new JScrollPane(textArea); // The URL for the Free Software foundation // in case we need to download a new copy of the GPL URL gplURL = null; try { gplURL = new URL("http://www.fsf.org/copyleft/gpl.txt"); } catch (MalformedURLException urlException) { } boolean loadedGPL = false; BufferedReader inGPL = null; // If we have a problem, bring up a dialog // and ask if we should grab it from the net gplURL = GPLAboutDialog.class.getResource("/com/hackerdude/devtools/db/sqlide/copying"); try { inGPL = new BufferedReader(new InputStreamReader(gplURL.openStream())); String textLine = null; StringBuffer sb = new StringBuffer(8192); while ((textLine = inGPL.readLine()) != null) { if (textLine.equals("")) sb.append("\n\n"); else sb.append(textLine).append(' '); } textArea.setText(sb.toString()); textArea.setCaretPosition(0); loadedGPL = true; } catch (IOException exc) { } ; // If we actually got a hold of the file, // display it if (loadedGPL == true) { scrollPane.setPreferredSize(textArea.getPreferredScrollableViewportSize()); if (internalFrames) { JOptionPane.showInternalMessageDialog( parent, scrollPane, "GNU General Public License", JOptionPane.INFORMATION_MESSAGE, gnuLogo); } else { JOptionPane.showMessageDialog( parent, scrollPane, "GNU General Public License", JOptionPane.INFORMATION_MESSAGE, gnuLogo); } } } // We're done, so if they want to open the window up again, // it's okay alreadyOpen = false; }
private void jbtnImprimirActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jbtnImprimirActionPerformed // TODO add your handling code here: if (rRHHBBFunciones.getRhFunUtilidadesConsultarTOs().size() > 0) { java.util.List<rrhh.reporte.ReporteXivSueldoConsulta> lista = new java.util.ArrayList(); for (int i = 0; i < rRHHBBFunciones.getRhFunUtilidadesConsultarTOs().size(); i++) { rrhh.reporte.ReporteXivSueldoConsulta rrhhXivSueldoConsulta = new rrhh.reporte.ReporteXivSueldoConsulta( sector, periodo, fechaDesde, fechaHasta, fechaMaxima, rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivCategoria() == null ? "" : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivCategoria(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivSector() == null ? "" : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivSector(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivId() == null ? "" : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivId(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivNombres() == null ? null : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivNombres(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivApellidos() == null ? null : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivApellidos(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivGenero() == null ? ' ' : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivGenero(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivFechaIngreso() == null ? "" : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivFechaIngreso(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivCargo() == null ? "" : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivCargo(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivTotalIngresos() == null ? null : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivTotalIngresos(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivDiasLaborados() == null ? null : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivDiasLaborados(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivValorXivSueldo() == null ? null : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivValorXivSueldo(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivCodigoMinisterial() == null ? ' ' : rRHHBBFunciones .getRhFunXivSueldoConsultarTO() .get(i) .getXivCodigoMinisterial(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivPeriodo() == null ? "" : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivPeriodo(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivTipo() == null ? "" : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivTipo(), rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivNumero() == null ? "" : rRHHBBFunciones.getRhFunXivSueldoConsultarTO().get(i).getXivNumero()); lista.add(rrhhXivSueldoConsulta); } LlamarReporteRrhh.generarReporteXivSueldoConsultaVistaPrevia( mDIShrimp, sector, periodo, fechaDesde, fechaHasta, fechaMaxima, rRHHBBFunciones.getRhFunXivSueldoConsultarTO()); cancelar(); } else { javax.swing.JOptionPane.showInternalMessageDialog(this, "No hay datos para imprimir..."); this.requestFocus(); } } // GEN-LAST:event_jbtnImprimirActionPerformed