/** * Setting the internal field {@link #document} directly (bypassing {@link #setDocument(URL)}) is * used to deplay the document loading until {@link #ready()}. */ @Override protected void initialize(final String[] as) { if ("Linux".equals(System.getProperty("os.name"))) getContext().getResourceManager().setPlatform("linux"); final Class<?> mc = this.getClass(); { final ResourceMap r = Application.getInstance().getContext().getResourceMap(); initialScene = mc.getResource("/" + r.getResourcesDir() + r.getString("Application.defaultDocument")); templateScene = mc.getResource("/" + r.getResourcesDir() + r.getString("Application.templateDocument")); } // schedule the document to load in #ready() document = initialScene; for (final String p : as) { // ignore javaws parameters if ("-open".equals(p) || "-print".equals(p)) continue; try { document = new URL(p); break; } catch (final MalformedURLException e) { final File f = new File(p); if (f.canRead()) try { document = f.toURL(); break; } catch (final MalformedURLException e2) { log.warn("Cannot load '" + p + "'.", e); } else log.warn("Cannot load '" + p + "'.", e); } } }
public SimpleSearchDialog(JDialog owner, SearchableListDialog dialogToSearch) { super(owner, false); _owner = owner; _dialogToSearch = dialogToSearch; _lastMatchedListIndex = -1; ResourceMap resourceMap = Application.getInstance().getContext().getResourceMap(SimpleSearchDialog.class); resourceMap.injectFields(this); ActionMap actionMap = Application.getInstance().getContext().getActionMap(this); setTitle(title); getContentPane().setLayout(new BorderLayout(0, 0)); _pnlMain = new JPanel(); _pnlMain.setBorder(new EmptyBorder(10, 10, 10, 10)); getContentPane().add(_pnlMain, BorderLayout.NORTH); _pnlMain.setLayout(new BorderLayout(0, 0)); _lblEnterSearchString = new JLabel(enterStringCaption); _lblEnterSearchString.setBorder(new EmptyBorder(0, 0, 10, 0)); _pnlMain.add(_lblEnterSearchString, BorderLayout.NORTH); _txtFldSearch = new JTextField(); _pnlMain.add(_txtFldSearch); _txtFldSearch.setColumns(10); _pnlButtons = new JPanel(); getContentPane().add(_pnlButtons, BorderLayout.SOUTH); _btnSearch = new JButton(); _btnSearch.setAction(actionMap.get("SimpleSearchDialog_Search")); _pnlButtons.add(_btnSearch); _btnCancel = new JButton(); _btnCancel.setAction(actionMap.get("SimpleSearchDialog_Cancel")); _pnlButtons.add(_btnCancel); _txtFldSearch .getDocument() .addDocumentListener( new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { _lastMatchedListIndex = -1; } @Override public void insertUpdate(DocumentEvent e) { _lastMatchedListIndex = -1; } @Override public void changedUpdate(DocumentEvent e) { _lastMatchedListIndex = -1; } }); }
public static File appDirectory() { File app, dir; try { app = new File( Application.getInstance() .getClass() .getProtectionDomain() .getCodeSource() .getLocation() .toURI()); dir = app.getParentFile(); } catch (Exception e) { app = new File( Application.getInstance() .getClass() .getProtectionDomain() .getCodeSource() .getLocation() .getPath() .replaceAll("%20", " ")); dir = app.getParentFile(); } return dir; }
public Object showWizard() { HashMap map = new HashMap(); map.put(DWizardDisplayerImpl.KEY_NAME, this.wizardPanelProvider.getClass().getSimpleName()); Wizard wizard = this.wizardPanelProvider.createWizard(); wizard.addWizardObserver(this.wizardObserver); // todo одно место для всех permissions if ((Application.getInstance() instanceof CuttingApp ? ((CuttingApp) Application.getInstance()) .getPermissionManager() .checkPermission(wizardPanelProvider) : true)) { return WizardDisplayer.showWizard(wizard, null, null, map); } return null; }
public void setPlanteIcon(SimulIcon icon) { org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance() .getContext() .getResourceMap(JBigPlant.class); switch (icon) { case SANS_PLANTE: imagePlante.setIcon(resourceMap.getIcon("ICON_SANS_PLANTE")); break; case GRAINE: imagePlante.setIcon(resourceMap.getIcon("ICON_GRAINE")); break; case CACAI_GERMEE: imagePlante.setIcon(resourceMap.getIcon("ICON_CACAI_GERMEE")); break; case CACAI_MORTE: imagePlante.setIcon(resourceMap.getIcon("ICON_CACAI_MORTE")); break; case CACAI_VIVANTE: imagePlante.setIcon(resourceMap.getIcon("ICON_CACAI_VIVANTE")); break; case TOMATITO_GERMEE: imagePlante.setIcon(resourceMap.getIcon("ICON_TOMATITO_GERMEE")); break; case TOMATITO_MORTE: imagePlante.setIcon(resourceMap.getIcon("ICON_TOMATITO_MORTE")); break; case TOMATITO_MORTE1: imagePlante.setIcon(resourceMap.getIcon("ICON_TOMATITO_MORTE1")); break; case TOMATITO_VIVANTE: imagePlante.setIcon(resourceMap.getIcon("ICON_TOMATITO_VIVANTE")); break; } }
public void setFruitIcon(SimulIcon icon) { org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance() .getContext() .getResourceMap(JBigPlant.class); switch (icon) { case SANS_FRUIT: imageFruit.setIcon(resourceMap.getIcon("ICON_SANS_FRUIT")); break; case CACAI_AMER: imageFruit.setIcon(resourceMap.getIcon("ICON_CACAI_AMER")); break; case CACAI_SUCRE: imageFruit.setIcon(resourceMap.getIcon("ICON_CACAI_SUCRE")); break; case TOMATITO_MARRON: imageFruit.setIcon(resourceMap.getIcon("ICON_TOMATITO_MARRON")); break; case TOMATITO_ROUGE: imageFruit.setIcon(resourceMap.getIcon("ICON_TOMATITO_ROUGE")); break; case TOMATITO_VERT: imageFruit.setIcon(resourceMap.getIcon("ICON_TOMATITO_VERT")); break; } }
/** * Acción a realizar cuando el usuario pulsa el botón "Aceptar". Cierra la ventana tras aplicar * los cambios realizados. */ @Action public void aceptar() { org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(delphsim.DelphSimApp.class) .getContext() .getResourceMap(PreferenciasSimulacion.class); try { // Actualizamos las preferencias PreferenciasSimulacion.preferencias.put( "metodo", Integer.toString(this.metodoComboBox.getSelectedIndex())); // NOI18N PreferenciasSimulacion.preferencias.put( "h", Double.toString((Double) this.hSpinner.getValue())); // NOI18N if (this.autosaveCheckBox.isSelected()) { PreferenciasSimulacion.preferencias.put("autosave", "si"); // NOI18N } else { PreferenciasSimulacion.preferencias.put("autosave", "no"); // NOI18N } // Las exportamos al fichero String rutaArchivo = new File(System.getProperty("java.class.path")).getParent() + resourceMap.getString("archivoPreferencias.path"); // NOI18N File f = new File(rutaArchivo); FileOutputStream os = new FileOutputStream(f); PreferenciasSimulacion.preferencias.exportSubtree(os); // Y cerramos la ventana dispose(); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } catch (BackingStoreException bse) { System.err.println(bse.getMessage()); } }
private void jButton1ActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: try { /* jTable1.print(); */ org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(bankingapp.BankingApp.class) .getContext() .getResourceMap(ReportCashBook.class); // jTable1.print(PrintMode.FIT_WIDTH,new // MessageFormat(resourceMap.getString("print.first")+"-{0}-"+resourceMap.getString("print.second")+resourceMap.getString("print.third")),null); PrinterJob job = PrinterJob.getPrinterJob(); MessageFormat[] header = new MessageFormat[6]; header[0] = new MessageFormat(""); header[1] = new MessageFormat(" " + resourceMap.getString("print.first")); header[2] = new MessageFormat(" " + resourceMap.getString("print.second")); header[3] = new MessageFormat(" " + resourceMap.getString("print.third")); header[4] = new MessageFormat(""); header[5] = new MessageFormat(" Report"); MessageFormat[] footer = new MessageFormat[1]; footer[0] = new MessageFormat("--{0}--"); job.setPrintable(new MyTablePrintable(jTable1, PrintMode.FIT_WIDTH, header, footer)); job.print(); } catch (PrinterException ex) { Logger.getLogger(ReportCashBook.class.getName()).log(Level.SEVERE, null, ex); } } // GEN-LAST:event_jButton1ActionPerformed
/** * Set the summary details * * @param summary */ public void setSummaryDetails(SummaryDetails summary) { Map<String, Map<String, Integer>> totals = summary.getSummaryTotals(); Map<String, Integer> typeTotal; List<Object> row; for (String type : totals.keySet()) { typeTotal = totals.get(type); for (String counter : typeTotal.keySet()) { row = new ArrayList<Object>(3); row.add(type); row.add(counter); row.add(typeTotal.get(counter)); rows.add(row); } } // add grand totals ResourceMap rMap = Application.getInstance(SourceCodeCounter.class) .getContext() .getResourceMap(SummaryResultsTableModel.class); String gt = rMap.getString("grand.total"); rows.add(getGrandTotalRow(gt, rMap.getString("blank.lines"), summary.getTotalBlankLines())); rows.add(getGrandTotalRow(gt, rMap.getString("counted.lines"), summary.getTotalCountedLines())); rows.add(getGrandTotalRow(gt, rMap.getString("rem.lines"), summary.getTotalSourceLines())); rows.add(getGrandTotalRow(gt, rMap.getString("total.lines"), summary.getTotalLines())); if (!rows.isEmpty()) { TableModelEvent e = new TableModelEvent( this, 0, rows.size() - 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT); notifyListeners(e); } }
@Action(block = Task.BlockingScope.ACTION) public Task imprimirHorarios() { return new ImprimirHorariosProfesoresSeleccionadosTask( org.jdesktop.application.Application.getInstance( com.codeko.apps.maimonides.MaimonidesApp.class), false); }
/** * Método que pide confirmación al usuario antes de salir de la aplicación. * * @param e El evento generado. * @return Si se puede salir o no (elección del usuario). */ public boolean canExit(EventObject e) { // Si se ha modificado el modelo, pedir confirmación de salida if (DelphSimApp.getApplication().getInterfaz().getArchivoModificado()) { org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(delphsim.DelphSimApp.class) .getContext() .getResourceMap(DelphSimView.class); Object source = (e != null) ? e.getSource() : null; Component owner = (source instanceof Component) ? (Component) source : null; String[] opciones = {"Sí", "No"}; int option = JOptionPane.showOptionDialog( owner, resourceMap.getString("ExitListener.msg"), resourceMap.getString("ExitListener.title"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null, opciones, opciones[1]); // NOI18N return option == JOptionPane.YES_OPTION; } else { return true; } }
/** Al ejecutar la aplicación, crea y muestra la ventana principal. */ @Override protected void startup() { org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(delphsim.DelphSimApp.class) .getContext() .getResourceMap(DelphSimView.class); // Sólo permitir una instancia (mediante sockets) try { // Se intenta bloquear el socket por defecto ss = new java.net.ServerSocket(PORT); } catch (java.net.BindException be) { // Si no se puede, ya hay otra instancia, mensaje y cerrar JOptionPane.showMessageDialog( null, resourceMap.getString("YaEjecutandose.msg"), resourceMap.getString("YaEjecutandose.title"), JOptionPane.INFORMATION_MESSAGE); // NOI18N System.exit(1); } catch (java.io.IOException ioe) { // Si ocurre otro problema, se vuelca el error y se cierra ioe.printStackTrace(); System.exit(1); } // Crear y mostrar la vista general this.interfaz = new DelphSimView(this); show(this.interfaz); // Establecer icono, tamaño, posición y el listener para confirmar salida Image img = new ImageIcon(DelphSimApp.class.getResource(resourceMap.getString("Application.icon"))) .getImage(); // NOI18N DelphSimApp.getApplication().getMainFrame().setIconImage(img); DelphSimApp.getApplication() .getMainFrame() .setSize( resourceMap.getInteger("Application.initialSize.width"), resourceMap.getInteger("Application.initialSize.height")); // NOI18N DelphSimApp.getApplication().getMainFrame().setLocationRelativeTo(null); DelphSimApp.getApplication().getMainFrame().setVisible(true); DelphSimApp.getApplication().addExitListener(new ConfirmExit()); // Eliminar archivos temporales si es que queda alguno File[] fs = new File( new File(System.getProperty("java.class.path")).getParent() + // NOI18N File.separator + "temp" + File.separator) .listFiles(); // NOI18N if (fs != null) { for (int i = 0; i < fs.length; i++) { fs[i].delete(); } } // Comprobar si hay una copia de respaldo this.interfaz.comprobarCopiaRespaldo(); }
public static void main(String[] args) { Application.launch(TestApp.class, args); /*try { ImageIO.write(ImageIO.read(new File("E:\\projects\\captchatest\\letters1.png")), "png", new File("E:\\projects\\captchatest\\letters.png")); } catch (Exception e) { e.printStackTrace(); }*/ }
public MsfguiAboutBox(java.awt.Frame parent, String version) { super(parent); initComponents(); getRootPane().setDefaultButton(closeButton); appVersionLabel.setText(version); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(msfgui.MsfguiApp.class) .getContext() .getResourceMap(ModulePopup.class); this.setIconImage(resourceMap.getImageIcon("main.icon").getImage()); }
private void deleteButtonActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_deleteButtonActionPerformed org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.jstore.JStoreApp.class) .getContext() .getResourceMap(CitasView.class); int answer = JOptionPane.showConfirmDialog( this, "Seguro que desea borrar?", "Eliminar", JOptionPane.YES_NO_OPTION, 0, resourceMap.getIcon("questionIcon")); if (answer == JOptionPane.YES_OPTION) { deleteCitaSelected(); } } // GEN-LAST:event_deleteButtonActionPerformed
private void initFrame() { frame = Application.getInstance(RDV.class).getMainFrame(); setLayout(new BorderLayout()); c = new GridBagConstraints(); initActions(); initMenuBar(); initChannelListPanel(); initMetadataPanel(); initLeftPanel(); initRightPanel(); initControls(); initDataPanelContainer(); initAudioPlayerPanel(); initMarkerSubmitPanel(); initSplitPane(); channelListPanel.addChannelSelectionListener(metadataPanel); rbnb.addSubscriptionListener(controlPanel); rbnb.addTimeListener(controlPanel); rbnb.addStateListener(channelListPanel); rbnb.addStateListener(controlPanel); rbnb.addStateListener(this); rbnb.getMetadataManager().addMetadataListener(channelListPanel); rbnb.getMetadataManager().addMetadataListener(metadataPanel); rbnb.getMetadataManager().addMetadataListener(controlPanel); rbnb.addPlaybackRateListener(controlPanel); rbnb.addTimeScaleListener(controlPanel); rbnb.addMessageListener(this); rbnb.addConnectionListener(this); }
@SuppressWarnings("unchecked") @Action(block = Task.BlockingScope.APPLICATION) public Task actualizarDatos() { Task t = new ImportarDatosBaseSenecaTask( org.jdesktop.application.Application.getInstance( com.codeko.apps.maimonides.MaimonidesApp.class), ImportadorDatosGeneralesSeneca.PROFESORES); TaskListener tl = new TaskListener() { @Override public void doInBackground(TaskEvent event) {} @Override public void process(TaskEvent event) {} @Override public void succeeded(TaskEvent event) { setCargado(false); cargar(); } @Override public void failed(TaskEvent event) {} @Override public void cancelled(TaskEvent event) {} @Override public void interrupted(TaskEvent event) {} @Override public void finished(TaskEvent event) {} }; t.addTaskListener(tl); return t; }
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { mainPanel = new javax.swing.JPanel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); conectarItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); jMenu1 = new javax.swing.JMenu(); cobradasMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); statusPanel = new javax.swing.JPanel(); javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator(); statusMessageLabel = new javax.swing.JLabel(); statusAnimationLabel = new javax.swing.JLabel(); progressBar = new javax.swing.JProgressBar(); mainPanel.setName("mainPanel"); // NOI18N menuBar.setName("menuBar"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(amltpvclient.AmltpvClientApp.class) .getContext() .getResourceMap(AmltpvViewClient.class); fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setFont(resourceMap.getFont("fileMenu.font")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N conectarItem.setFont(resourceMap.getFont("conectarItem.font")); // NOI18N conectarItem.setForeground(resourceMap.getColor("conectarItem.foreground")); // NOI18N conectarItem.setText(resourceMap.getString("conectarItem.text")); // NOI18N conectarItem.setName("conectarItem"); // NOI18N conectarItem.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { conectarItemActionPerformed(evt); } }); fileMenu.add(conectarItem); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(amltpvclient.AmltpvClientApp.class) .getContext() .getActionMap(AmltpvViewClient.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setFont(resourceMap.getFont("exitMenuItem.font")); // NOI18N exitMenuItem.setForeground(resourceMap.getColor("exitMenuItem.foreground")); // NOI18N exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N exitMenuItem.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitMenuItemActionPerformed(evt); } }); fileMenu.add(exitMenuItem); menuBar.add(fileMenu); jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N jMenu1.setFont(resourceMap.getFont("jMenu1.font")); // NOI18N jMenu1.setName("jMenu1"); // NOI18N cobradasMenuItem.setFont(resourceMap.getFont("cobradasMenuItem.font")); // NOI18N cobradasMenuItem.setForeground(resourceMap.getColor("cobradasMenuItem.foreground")); // NOI18N cobradasMenuItem.setText(resourceMap.getString("cobradasMenuItem.text")); // NOI18N cobradasMenuItem.setName("cobradasMenuItem"); // NOI18N cobradasMenuItem.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cobradasMenuItemActionPerformed(evt); } }); jMenu1.add(cobradasMenuItem); menuBar.add(jMenu1); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setFont(resourceMap.getFont("helpMenu.font")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setFont(resourceMap.getFont("aboutMenuItem.font")); // NOI18N aboutMenuItem.setForeground(resourceMap.getColor("aboutMenuItem.foreground")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); statusPanel.setName("statusPanel"); // NOI18N statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N statusMessageLabel.setName("statusMessageLabel"); // NOI18N statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N progressBar.setName("progressBar"); // NOI18N javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel); statusPanel.setLayout(statusPanelLayout); statusPanelLayout.setHorizontalGroup( statusPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 230, Short.MAX_VALUE) .addComponent( progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(statusAnimationLabel) .addContainerGap())); statusPanelLayout.setVerticalGroup( statusPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( statusPanelLayout .createSequentialGroup() .addComponent( statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( statusPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(statusMessageLabel) .addComponent(statusAnimationLabel) .addComponent( progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(3, 3, 3))); setComponent(mainPanel); setMenuBar(menuBar); setStatusBar(statusPanel); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel7 = new javax.swing.JLabel(); jTextField5 = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jTextField2 = new javax.swing.JTextField(); jPanel1 = new javax.swing.JPanel(); jButton3 = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jButton5 = new javax.swing.JButton(); jTextField3 = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jButton6 = new javax.swing.JButton(); setName("Form"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(app.ApplicationLauncher.class) .getContext() .getResourceMap(BitcoinAccountTopPanel.class); jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N jLabel7.setName("jLabel7"); // NOI18N jTextField5.setBackground(resourceMap.getColor("jTextField5.background")); // NOI18N jTextField5.setEditable(false); jTextField5.setName("jTextField5"); // NOI18N jTextField5.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField5ActionPerformed(evt); } }); jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jTextField1.setBackground(resourceMap.getColor("jTextField2.background")); // NOI18N jTextField1.setEditable(false); jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N jTextField1.setName("jTextField1"); // NOI18N jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N jTextField2.setBackground(resourceMap.getColor("jTextField2.background")); // NOI18N jTextField2.setEditable(false); jTextField2.setText(resourceMap.getString("jTextField2.text")); // NOI18N jTextField2.setName("jTextField2"); // NOI18N jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanel1.setName("jPanel1"); // NOI18N jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N jButton3.setName("jButton3"); // NOI18N jButton3.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N jButton1.setName("jButton1"); // NOI18N jButton1.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N jButton4.setName("jButton4"); // NOI18N jButton4.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N jButton5.setName("jButton5"); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap() .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, 127, Short.MAX_VALUE) .addContainerGap())); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton3) .addComponent(jButton4) .addComponent(jButton5)) .addContainerGap())); jTextField3.setBackground(resourceMap.getColor("jTextField3.background")); // NOI18N jTextField3.setEditable(false); jTextField3.setText(resourceMap.getString("jTextField3.text")); // NOI18N jTextField3.setName("jTextField3"); // NOI18N jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N jButton6.setName("jButton6"); // NOI18N jButton6.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(27, 27, 27) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment .LEADING) .addComponent(jLabel2) .addComponent(jLabel1)) .addComponent(jLabel7)) .addComponent(jLabel3)) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( jTextField2, javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jTextField1, javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jTextField5, javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup() .addComponent( jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .UNRELATED) .addComponent(jButton6))))) .addContainerGap(33, Short.MAX_VALUE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(28, 28, 28) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7)) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent( jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addComponent(jButton6)) .addGap(18, 18, 18) .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(81, Short.MAX_VALUE))); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); mainPanel = new javax.swing.JPanel(); jDesktopPane1 = new javax.swing.JDesktopPane(); jPanel1 = new javax.swing.JPanel(); jDesktopPane2 = new javax.swing.JDesktopPane(); jLabel1 = new javax.swing.JLabel(); currentTaskNavOption = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); nextTaskNavOption = new javax.swing.JButton(); todayTaskNavOption = new javax.swing.JButton(); scheduleTaskNavOption = new javax.swing.JButton(); someDayTaskNavOption = new javax.swing.JButton(); logBookNavOption = new javax.swing.JButton(); trashCanNavOption = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); tasksTable = new javax.swing.JTable(); jDesktopPane3 = new javax.swing.JDesktopPane(); newTaskBtn = new javax.swing.JButton(); jButton9 = new javax.swing.JButton(); editRow = new javax.swing.JButton(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jSeparator1 = new javax.swing.JPopupMenu.Separator(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); mainPanel.setName("mainPanel"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(addictionmanager.AddictionManagerApp.class) .getContext() .getResourceMap(AddictionManagerView.class); jDesktopPane1.setBackground(resourceMap.getColor("jDesktopPane1.background")); // NOI18N jDesktopPane1.setName("jDesktopPane1"); // NOI18N jPanel1.setName("jPanel1"); // NOI18N org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(0, 160, Short.MAX_VALUE)); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(0, 100, Short.MAX_VALUE)); jPanel1.setBounds(10, 20, 160, 100); jDesktopPane1.add(jPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPane2.setBackground(resourceMap.getColor("siderBarPanel.background")); // NOI18N jDesktopPane2.setName("siderBarPanel"); // NOI18N jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N jLabel1.setForeground(resourceMap.getColor("jLabel1.foreground")); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jLabel1.setBounds(10, 70, 50, 16); jDesktopPane2.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER); currentTaskNavOption.setIcon(resourceMap.getIcon("currentTaskNavOption.icon")); // NOI18N currentTaskNavOption.setText(resourceMap.getString("currentTaskNavOption.text")); // NOI18N currentTaskNavOption.setToolTipText( resourceMap.getString("currentTaskNavOption.toolTipText")); // NOI18N currentTaskNavOption.setName("currentTaskNavOption"); // NOI18N currentTaskNavOption.setSelected(true); currentTaskNavOption.setSelectedIcon( resourceMap.getIcon("currentTaskNavOption.selectedIcon")); // NOI18N currentTaskNavOption.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { currentTaskNavOptionActionPerformed(evt); } }); currentTaskNavOption.setBounds(0, 30, 180, 30); jDesktopPane2.add(currentTaskNavOption, javax.swing.JLayeredPane.DEFAULT_LAYER); jLabel2.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N jLabel2.setForeground(resourceMap.getColor("jLabel2.foreground")); // NOI18N jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N jLabel2.setBounds(10, 10, 70, 15); jDesktopPane2.add(jLabel2, javax.swing.JLayeredPane.DEFAULT_LAYER); nextTaskNavOption.setIcon(resourceMap.getIcon("nextActivityBtn.icon")); // NOI18N nextTaskNavOption.setText(resourceMap.getString("nextActivityBtn.text")); // NOI18N nextTaskNavOption.setToolTipText( resourceMap.getString("nextActivityBtn.toolTipText")); // NOI18N nextTaskNavOption.setName("nextActivityBtn"); // NOI18N nextTaskNavOption.setSelected(true); nextTaskNavOption.setSelectedIcon( resourceMap.getIcon("nextActivityBtn.selectedIcon")); // NOI18N nextTaskNavOption.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { nextTaskNavOptionActionPerformed(evt); } }); nextTaskNavOption.setBounds(0, 120, 180, 30); jDesktopPane2.add(nextTaskNavOption, javax.swing.JLayeredPane.DEFAULT_LAYER); todayTaskNavOption.setIcon(resourceMap.getIcon("todayActivityBtn.icon")); // NOI18N todayTaskNavOption.setText(resourceMap.getString("todayActivityBtn.text")); // NOI18N todayTaskNavOption.setToolTipText( resourceMap.getString("todayActivityBtn.toolTipText")); // NOI18N todayTaskNavOption.setName("todayActivityBtn"); // NOI18N todayTaskNavOption.setSelected(true); todayTaskNavOption.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { todayTaskNavOptionActionPerformed(evt); } }); todayTaskNavOption.setBounds(0, 90, 180, 30); jDesktopPane2.add(todayTaskNavOption, javax.swing.JLayeredPane.DEFAULT_LAYER); scheduleTaskNavOption.setIcon(resourceMap.getIcon("scheduleActivityBtn.icon")); // NOI18N scheduleTaskNavOption.setText(resourceMap.getString("scheduleActivityBtn.text")); // NOI18N scheduleTaskNavOption.setToolTipText( resourceMap.getString("scheduleActivityBtn.toolTipText")); // NOI18N scheduleTaskNavOption.setName("scheduleActivityBtn"); // NOI18N scheduleTaskNavOption.setSelected(true); scheduleTaskNavOption.setSelectedIcon( resourceMap.getIcon("scheduleActivityBtn.selectedIcon")); // NOI18N scheduleTaskNavOption.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { scheduleTaskNavOptionActionPerformed(evt); } }); scheduleTaskNavOption.setBounds(0, 150, 180, 30); jDesktopPane2.add(scheduleTaskNavOption, javax.swing.JLayeredPane.DEFAULT_LAYER); someDayTaskNavOption.setIcon(resourceMap.getIcon("somedayActivityBtn.icon")); // NOI18N someDayTaskNavOption.setText(resourceMap.getString("somedayActivityBtn.text")); // NOI18N someDayTaskNavOption.setToolTipText( resourceMap.getString("somedayActivityBtn.toolTipText")); // NOI18N someDayTaskNavOption.setName("somedayActivityBtn"); // NOI18N someDayTaskNavOption.setSelected(true); someDayTaskNavOption.setSelectedIcon( resourceMap.getIcon("somedayActivityBtn.selectedIcon")); // NOI18N someDayTaskNavOption.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { someDayTaskNavOptionActionPerformed(evt); } }); someDayTaskNavOption.setBounds(0, 180, 180, 30); jDesktopPane2.add(someDayTaskNavOption, javax.swing.JLayeredPane.DEFAULT_LAYER); logBookNavOption.setIcon(resourceMap.getIcon("logbookBtn.icon")); // NOI18N logBookNavOption.setText(resourceMap.getString("logbookBtn.text")); // NOI18N logBookNavOption.setToolTipText(resourceMap.getString("logbookBtn.toolTipText")); // NOI18N logBookNavOption.setName("logbookBtn"); // NOI18N logBookNavOption.setSelected(true); logBookNavOption.setSelectedIcon(resourceMap.getIcon("logbookBtn.selectedIcon")); // NOI18N logBookNavOption.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { logBookNavOptionActionPerformed(evt); } }); logBookNavOption.setBounds(0, 560, 180, 30); jDesktopPane2.add(logBookNavOption, javax.swing.JLayeredPane.DEFAULT_LAYER); trashCanNavOption.setIcon(resourceMap.getIcon("trashBtn.icon")); // NOI18N trashCanNavOption.setText(resourceMap.getString("trashBtn.text")); // NOI18N trashCanNavOption.setToolTipText(resourceMap.getString("trashBtn.toolTipText")); // NOI18N trashCanNavOption.setName("trashBtn"); // NOI18N trashCanNavOption.setSelected(true); trashCanNavOption.setSelectedIcon(resourceMap.getIcon("trashBtn.selectedIcon")); // NOI18N trashCanNavOption.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { trashCanNavOptionActionPerformed(evt); } }); trashCanNavOption.setBounds(0, 590, 180, 30); jDesktopPane2.add(trashCanNavOption, javax.swing.JLayeredPane.DEFAULT_LAYER); jPanel2.setBackground(resourceMap.getColor("centerPanel.background")); // NOI18N jPanel2.setForeground(resourceMap.getColor("centerPanel.foreground")); // NOI18N jPanel2.setName("centerPanel"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N tasksTable.setBackground(resourceMap.getColor("tasksTable.background")); // NOI18N tasksTable.setFont(resourceMap.getFont("tasksTable.font")); // NOI18N tasksTable.setForeground(resourceMap.getColor("tasksTable.foreground")); // NOI18N tasksTable.setModel( new javax.swing.table.DefaultTableModel( new Object[][] {}, new String[] { "", "Task no.", "Task Name", "Task Description", "Allowed Applications", "Restricted Applications", "Start Date & Time", "End Date & Time", "Notification Type" }) { Class[] types = new Class[] { java.lang.Boolean.class, java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class }; boolean[] canEdit = new boolean[] {true, false, false, false, false, false, false, false, false}; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tasksTable.setColumnSelectionAllowed(true); tasksTable.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); tasksTable.setGridColor(resourceMap.getColor("tasksTable.gridColor")); // NOI18N tasksTable.setName("tasksTable"); // NOI18N tasksTable.setRowHeight(30); tasksTable.setRowMargin(3); tasksTable.setSelectionBackground( resourceMap.getColor("tasksTable.selectionBackground")); // NOI18N tasksTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION); tasksTable.getTableHeader().setReorderingAllowed(false); jScrollPane1.setViewportView(tasksTable); tasksTable .getColumnModel() .getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_INTERVAL_SELECTION); tasksTable.getColumnModel().getColumn(0).setMinWidth(15); tasksTable.getColumnModel().getColumn(0).setPreferredWidth(20); tasksTable.getColumnModel().getColumn(0).setMaxWidth(20); tasksTable .getColumnModel() .getColumn(0) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title6")); // NOI18N tasksTable.getColumnModel().getColumn(1).setMinWidth(40); tasksTable.getColumnModel().getColumn(1).setPreferredWidth(55); tasksTable.getColumnModel().getColumn(1).setMaxWidth(55); tasksTable .getColumnModel() .getColumn(1) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title0")); // NOI18N tasksTable.getColumnModel().getColumn(2).setMinWidth(80); tasksTable.getColumnModel().getColumn(2).setPreferredWidth(120); tasksTable.getColumnModel().getColumn(2).setMaxWidth(220); tasksTable .getColumnModel() .getColumn(2) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title1")); // NOI18N tasksTable.getColumnModel().getColumn(3).setMinWidth(150); tasksTable.getColumnModel().getColumn(3).setPreferredWidth(220); tasksTable.getColumnModel().getColumn(3).setMaxWidth(320); tasksTable .getColumnModel() .getColumn(3) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title9")); // NOI18N tasksTable.getColumnModel().getColumn(4).setMinWidth(80); tasksTable.getColumnModel().getColumn(4).setPreferredWidth(140); tasksTable.getColumnModel().getColumn(4).setMaxWidth(240); tasksTable .getColumnModel() .getColumn(4) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title2")); // NOI18N tasksTable.getColumnModel().getColumn(5).setMinWidth(120); tasksTable.getColumnModel().getColumn(5).setPreferredWidth(160); tasksTable.getColumnModel().getColumn(5).setMaxWidth(260); tasksTable .getColumnModel() .getColumn(5) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title3")); // NOI18N tasksTable.getColumnModel().getColumn(6).setMinWidth(80); tasksTable.getColumnModel().getColumn(6).setPreferredWidth(120); tasksTable.getColumnModel().getColumn(6).setMaxWidth(220); tasksTable .getColumnModel() .getColumn(6) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title4")); // NOI18N tasksTable.getColumnModel().getColumn(7).setMinWidth(80); tasksTable.getColumnModel().getColumn(7).setPreferredWidth(120); tasksTable.getColumnModel().getColumn(7).setMaxWidth(220); tasksTable .getColumnModel() .getColumn(7) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title7")); // NOI18N tasksTable.getColumnModel().getColumn(8).setMinWidth(80); tasksTable.getColumnModel().getColumn(8).setPreferredWidth(100); tasksTable.getColumnModel().getColumn(8).setMaxWidth(200); tasksTable .getColumnModel() .getColumn(8) .setHeaderValue(resourceMap.getString("tasksTable.columnModel.title8")); // NOI18N jDesktopPane3.setBackground(resourceMap.getColor("jDesktopPane3.background")); // NOI18N jDesktopPane3.setName("jDesktopPane3"); // NOI18N newTaskBtn.setText(resourceMap.getString("newTaskBtn.text")); // NOI18N newTaskBtn.setName("newTaskBtn"); // NOI18N newTaskBtn.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newTaskBtnActionPerformed(evt); } }); newTaskBtn.setBounds(20, 10, 97, 29); jDesktopPane3.add(newTaskBtn, javax.swing.JLayeredPane.DEFAULT_LAYER); jButton9.setText(resourceMap.getString("jButton9.text")); // NOI18N jButton9.setEnabled(false); jButton9.setName("jButton9"); // NOI18N jButton9.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton9ActionPerformed(evt); } }); jButton9.setBounds(920, 10, 110, 29); jDesktopPane3.add(jButton9, javax.swing.JLayeredPane.DEFAULT_LAYER); editRow.setText(resourceMap.getString("editRow.text")); // NOI18N editRow.setEnabled(false); editRow.setName("editRow"); // NOI18N editRow.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editRowActionPerformed(evt); } }); editRow.setBounds(810, 10, 110, 29); jDesktopPane3.add(editRow, javax.swing.JLayeredPane.DEFAULT_LAYER); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jDesktopPane3) .add( org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1030, Short.MAX_VALUE)); jPanel2Layout.setVerticalGroup( jPanel2Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add( org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout .createSequentialGroup() .add( jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 591, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add( jDesktopPane3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 57, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))); org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add( mainPanelLayout .createSequentialGroup() .add( jDesktopPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add( jDesktopPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 180, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add( jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jDesktopPane1) .add(org.jdesktop.layout.GroupLayout.TRAILING, jDesktopPane2) .add( jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); menuBar.setName("menuBar"); // NOI18N org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, menuBar, org.jdesktop.beansbinding.ELProperty.create("${background}"), menuBar, org.jdesktop.beansbinding.BeanProperty.create("background")); bindingGroup.addBinding(binding); fileMenu.setBackground(resourceMap.getColor("fileMenu.background")); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N jMenuItem1.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK)); jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N jMenuItem1.setName("jMenuItem1"); // NOI18N jMenuItem1.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); fileMenu.add(jMenuItem1); jSeparator1.setName("jSeparator1"); // NOI18N fileMenu.add(jSeparator1); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(addictionmanager.AddictionManagerApp.class) .getContext() .getActionMap(AddictionManagerView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setBackground(resourceMap.getColor("helpMenu.background")); // NOI18N helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setIcon(resourceMap.getIcon("aboutMenuItem.icon")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); setComponent(mainPanel); setMenuBar(menuBar); bindingGroup.bind(); } // </editor-fold>//GEN-END:initComponents
/** * A convenient static getter for the application instance. * * @return the instance of SwimProgramApp */ public static BudgeterApp getApplication() { return Application.getInstance(BudgeterApp.class); }
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jAEITLP = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jNENGSP = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jTHSTCP = new javax.swing.JTextField(); THSTCP = new javax.swing.JLabel(); jPHALOC = new javax.swing.JTextField(); PHALOC = new javax.swing.JLabel(); jPHVLOC = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jENGFCT = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jPRPRAD = new javax.swing.JTextField(); jLabel12 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jBAPR75 = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jNOPBPE = new javax.swing.JTextField(); jBWAPR9 = new javax.swing.JTextField(); jLabel9 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jBWAPR6 = new javax.swing.JTextField(); jBWAPR3 = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); jCounterRotating = new javax.swing.JCheckBox(); jYP = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); jPanel4 = new javax.swing.JPanel(); setName("Form"); // NOI18N jPanel1.setName("jPanel1"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(opendatcom.OpenDatcomController.class) .getContext() .getResourceMap(Prop.class); jAEITLP.setText(resourceMap.getString("jAEITLP.text")); // NOI18N jAEITLP.setName("jAEITLP"); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jNENGSP.setText(resourceMap.getString("jNENGSP.text")); // NOI18N jNENGSP.setName("jNENGSP"); // NOI18N jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N jTHSTCP.setText(resourceMap.getString("jTHSTCP.text")); // NOI18N jTHSTCP.setName("jTHSTCP"); // NOI18N THSTCP.setText(resourceMap.getString("THSTCP.text")); // NOI18N THSTCP.setName("THSTCP"); // NOI18N jPHALOC.setText(resourceMap.getString("jPHALOC.text")); // NOI18N jPHALOC.setName("jPHALOC"); // NOI18N PHALOC.setText(resourceMap.getString("PHALOC.text")); // NOI18N PHALOC.setName("PHALOC"); // NOI18N jPHVLOC.setText(resourceMap.getString("jPHVLOC.text")); // NOI18N jPHVLOC.setName("jPHVLOC"); // NOI18N jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N jLabel5.setName("jLabel5"); // NOI18N jENGFCT.setText(resourceMap.getString("jENGFCT.text")); // NOI18N jENGFCT.setName("jENGFCT"); // NOI18N jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N jLabel6.setName("jLabel6"); // NOI18N jPRPRAD.setName("jPRPRAD"); // NOI18N jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N jLabel12.setName("jLabel12"); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( PHALOC, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE) .addComponent( jLabel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE) .addComponent( THSTCP, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE) .addComponent( jLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE) .addComponent( jLabel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE) .addComponent( jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jLabel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent( jPRPRAD, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE) .addComponent( jENGFCT, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE) .addComponent( jPHVLOC, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE) .addComponent( jPHALOC, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE) .addComponent( jTHSTCP, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE) .addComponent( jNENGSP, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(1, 1, 1) .addComponent( jAEITLP, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE))) .addContainerGap())); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jAEITLP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addGap(18, 18, 18) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jNENGSP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addGap(18, 18, 18) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(THSTCP) .addComponent( jTHSTCP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(PHALOC) .addComponent( jPHALOC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent( jPHVLOC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent( jENGFCT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jPRPRAD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel12)) .addContainerGap(12, Short.MAX_VALUE))); jPanel3.setName("jPanel3"); // NOI18N jLabel3.setFont(resourceMap.getFont("jLabel3.font")); // NOI18N jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 568, Short.MAX_VALUE) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel3Layout .createSequentialGroup() .addContainerGap() .addComponent( jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE) .addContainerGap()))); jPanel3Layout.setVerticalGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 68, Short.MAX_VALUE) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel3Layout .createSequentialGroup() .addContainerGap() .addComponent( jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 46, Short.MAX_VALUE) .addContainerGap()))); jPanel2.setName("jPanel2"); // NOI18N jBAPR75.setName("jBAPR75"); // NOI18N jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N jLabel11.setName("jLabel11"); // NOI18N jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N jLabel10.setName("jLabel10"); // NOI18N jNOPBPE.setName("jNOPBPE"); // NOI18N jBWAPR9.setText(resourceMap.getString("jBWAPR9.text")); // NOI18N jBWAPR9.setName("jBWAPR9"); // NOI18N jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N jLabel9.setName("jLabel9"); // NOI18N jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N jLabel8.setName("jLabel8"); // NOI18N jBWAPR6.setText(resourceMap.getString("jBWAPR6.text")); // NOI18N jBWAPR6.setName("jBWAPR6"); // NOI18N jBWAPR6.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBWAPR6ActionPerformed(evt); } }); jBWAPR3.setText(resourceMap.getString("jBWAPR3.text")); // NOI18N jBWAPR3.setName("jBWAPR3"); // NOI18N jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N jLabel7.setName("jLabel7"); // NOI18N jCounterRotating.setText(resourceMap.getString("jCounterRotating.text")); // NOI18N jCounterRotating.setName("jCounterRotating"); // NOI18N jYP.setName("jYP"); // NOI18N jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N jLabel13.setName("jLabel13"); // NOI18N javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addGroup( jPanel2Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout .createSequentialGroup() .addComponent( jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED, 42, Short.MAX_VALUE)) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, jPanel2Layout .createSequentialGroup() .addComponent( jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED, 45, Short.MAX_VALUE)) .addComponent( jLabel10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jLabel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jLabel13, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jLabel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( jPanel2Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.CENTER) .addComponent( jBWAPR3, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE) .addComponent( jBWAPR6, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE) .addComponent( jBWAPR9, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE) .addComponent( jNOPBPE, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE) .addComponent( jBAPR75, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE) .addComponent( jYP, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE)) .addContainerGap()) .addGroup( jPanel2Layout .createSequentialGroup() .addComponent( jCounterRotating, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE) .addGap(15, 15, 15))))); jPanel2Layout.setVerticalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7) .addComponent( jBWAPR3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent( jBWAPR6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent( jBWAPR9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jNOPBPE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10)) .addGap(18, 18, 18) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jBAPR75, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel11)) .addGap(18, 18, 18) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jYP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jCounterRotating) .addContainerGap(20, Short.MAX_VALUE))); jPanel4.setName("jPanel4"); // NOI18N javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 568, Short.MAX_VALUE)); jPanel4Layout.setVerticalGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 148, Short.MAX_VALUE)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup() .addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent( jPanel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(18, 18, 18) .addComponent( jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); } // </editor-fold>//GEN-END:initComponents
/** * A convenient static getter for the application instance. * * @return the instance of MinecraftErrorApp */ public static MinecraftErrorApp getApplication() { return Application.getInstance(MinecraftErrorApp.class); }
/** * Main start method for running this application Called from IDE * * @param args arguments for application */ public static void main(String[] args) { Application.launch(TestApp.class, args); // starts the application - calls startup() internally }
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { closeButton = new javax.swing.JButton(); javax.swing.JLabel appTitleLabel = new javax.swing.JLabel(); javax.swing.JLabel versionLabel = new javax.swing.JLabel(); javax.swing.JLabel appVersionLabel = new javax.swing.JLabel(); javax.swing.JLabel vendorLabel = new javax.swing.JLabel(); javax.swing.JLabel appVendorLabel = new javax.swing.JLabel(); javax.swing.JLabel homepageLabel = new javax.swing.JLabel(); javax.swing.JLabel appHomepageLabel = new javax.swing.JLabel(); javax.swing.JLabel appDescLabel = new javax.swing.JLabel(); javax.swing.JLabel imageLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(httpbotnetclient.HTTPBotNetClientApp.class) .getContext() .getResourceMap(HTTPBotNetClientAboutBox.class); setTitle(resourceMap.getString("title")); // NOI18N setModal(true); setName("aboutBox"); // NOI18N setResizable(false); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(httpbotnetclient.HTTPBotNetClientApp.class) .getContext() .getActionMap(HTTPBotNetClientAboutBox.class, this); closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N closeButton.setName("closeButton"); // NOI18N appTitleLabel.setFont( appTitleLabel .getFont() .deriveFont( appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize() + 4)); appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N appTitleLabel.setName("appTitleLabel"); // NOI18N versionLabel.setFont( versionLabel.getFont().deriveFont(versionLabel.getFont().getStyle() | java.awt.Font.BOLD)); versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N versionLabel.setName("versionLabel"); // NOI18N appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N appVersionLabel.setName("appVersionLabel"); // NOI18N vendorLabel.setFont( vendorLabel.getFont().deriveFont(vendorLabel.getFont().getStyle() | java.awt.Font.BOLD)); vendorLabel.setText(resourceMap.getString("vendorLabel.text")); // NOI18N vendorLabel.setName("vendorLabel"); // NOI18N appVendorLabel.setText(resourceMap.getString("Application.vendor")); // NOI18N appVendorLabel.setName("appVendorLabel"); // NOI18N homepageLabel.setFont( homepageLabel .getFont() .deriveFont(homepageLabel.getFont().getStyle() | java.awt.Font.BOLD)); homepageLabel.setText(resourceMap.getString("homepageLabel.text")); // NOI18N homepageLabel.setName("homepageLabel"); // NOI18N appHomepageLabel.setText(resourceMap.getString("Application.homepage")); // NOI18N appHomepageLabel.setName("appHomepageLabel"); // NOI18N appDescLabel.setText(resourceMap.getString("appDescLabel.text")); // NOI18N appDescLabel.setName("appDescLabel"); // NOI18N imageLabel.setIcon(resourceMap.getIcon("imageLabel.icon")); // NOI18N imageLabel.setName("imageLabel"); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent(imageLabel) .addGap(18, 18, 18) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, layout .createSequentialGroup() .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(versionLabel) .addComponent(vendorLabel) .addComponent(homepageLabel)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(appVersionLabel) .addComponent(appVendorLabel) .addComponent(appHomepageLabel))) .addComponent(appTitleLabel, javax.swing.GroupLayout.Alignment.LEADING) .addComponent( appDescLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE) .addComponent(closeButton)) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent(appTitleLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( appDescLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(versionLabel) .addComponent(appVersionLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(vendorLabel) .addComponent(appVendorLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(homepageLabel) .addComponent(appHomepageLabel)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE) .addComponent(closeButton) .addContainerGap())); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method fis called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { cmbUsuarios = new javax.swing.JComboBox(); btnGuardar = new javax.swing.JButton(); btnMostrar = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jideTabbedPane1 = new com.jidesoft.swing.JideTabbedPane(); jPanel2 = new javax.swing.JPanel(); chkPermisos = new javax.swing.JCheckBox(); chkCreacionUsuario = new javax.swing.JCheckBox(); chkAuditoria = new javax.swing.JCheckBox(); jPanel1 = new javax.swing.JPanel(); chkAbrirCaja = new javax.swing.JCheckBox(); chkCerrarCaja = new javax.swing.JCheckBox(); chkFacturar = new javax.swing.JCheckBox(); chkPagos = new javax.swing.JCheckBox(); chkAnularFacturas = new javax.swing.JCheckBox(); chkFlujo = new javax.swing.JCheckBox(); chkEliminarPagos = new javax.swing.JCheckBox(); chkNotasEntrega = new javax.swing.JCheckBox(); chkPagoNuevo = new javax.swing.JCheckBox(); chkPagoRecibo = new javax.swing.JCheckBox(); chkReimpresion = new javax.swing.JCheckBox(); jPanel3 = new javax.swing.JPanel(); chkPagosHistorico = new javax.swing.JCheckBox(); chkFactHistorico = new javax.swing.JCheckBox(); jPanel4 = new javax.swing.JPanel(); chkModificarProductos = new javax.swing.JCheckBox(); chkEliminarProductos = new javax.swing.JCheckBox(); chkKardex = new javax.swing.JCheckBox(); chkRecibir = new javax.swing.JCheckBox(); chkRetirar = new javax.swing.JCheckBox(); chkListProductosDel = new javax.swing.JCheckBox(); chkChequear = new javax.swing.JCheckBox(); chkInventario = new javax.swing.JCheckBox(); chkRecibirCompras = new javax.swing.JCheckBox(); jPanel5 = new javax.swing.JPanel(); chkMantenimientoGrupo = new javax.swing.JCheckBox(); jPanel7 = new javax.swing.JPanel(); chkVentaCaja = new javax.swing.JCheckBox(); chkVentasNE = new javax.swing.JCheckBox(); chkVentasNEVendedores = new javax.swing.JCheckBox(); chkDescuentos = new javax.swing.JCheckBox(); chkRepPagos = new javax.swing.JCheckBox(); jPanel6 = new javax.swing.JPanel(); chkModClientes = new javax.swing.JCheckBox(); chkClienteDel = new javax.swing.JCheckBox(); chkAddCliente = new javax.swing.JCheckBox(); jPanel8 = new javax.swing.JPanel(); chkProveedorMod = new javax.swing.JCheckBox(); chkProveedorDel = new javax.swing.JCheckBox(); setClosable(true); setIconifiable(true); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(stinventario.STInventarioApp.class) .getContext() .getResourceMap(frmUsuarioPermisos.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setName("Form"); // NOI18N cmbUsuarios.setName("cmbUsuarios"); // NOI18N cmbUsuarios.addItemListener( new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { cmbUsuariosItemStateChanged(evt); } }); btnGuardar.setText(resourceMap.getString("btnGuardar.text")); // NOI18N btnGuardar.setEnabled(false); btnGuardar.setName("btnGuardar"); // NOI18N btnGuardar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnGuardarActionPerformed(evt); } }); btnMostrar.setText(resourceMap.getString("btnMostrar.text")); // NOI18N btnMostrar.setName("btnMostrar"); // NOI18N btnMostrar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnMostrarActionPerformed(evt); } }); jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jideTabbedPane1.setBorder(null); jideTabbedPane1.setName("jideTabbedPane1"); // NOI18N jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanel2.setEnabled(false); jPanel2.setName("jPanel2"); // NOI18N chkPermisos.setText(resourceMap.getString("chkPermisos.text")); // NOI18N chkPermisos.setEnabled(false); chkPermisos.setName("chkPermisos"); // NOI18N chkCreacionUsuario.setText(resourceMap.getString("chkCreacionUsuario.text")); // NOI18N chkCreacionUsuario.setEnabled(false); chkCreacionUsuario.setName("chkCreacionUsuario"); // NOI18N chkAuditoria.setText(resourceMap.getString("chkAuditoria.text")); // NOI18N chkAuditoria.setEnabled(false); chkAuditoria.setName("chkAuditoria"); // NOI18N javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkPermisos) .addComponent(chkCreacionUsuario) .addComponent(chkAuditoria)) .addContainerGap(492, Short.MAX_VALUE))); jPanel2Layout.setVerticalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addComponent(chkPermisos) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkCreacionUsuario) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chkAuditoria) .addContainerGap(82, Short.MAX_VALUE))); jideTabbedPane1.addTab( resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanel1.setName("jPanel1"); // NOI18N chkAbrirCaja.setText(resourceMap.getString("chkAbrirCaja.text")); // NOI18N chkAbrirCaja.setName("chkAbrirCaja"); // NOI18N chkCerrarCaja.setText(resourceMap.getString("chkCerrarCaja.text")); // NOI18N chkCerrarCaja.setName("chkCerrarCaja"); // NOI18N chkFacturar.setText(resourceMap.getString("chkFacturar.text")); // NOI18N chkFacturar.setName("chkFacturar"); // NOI18N chkPagos.setText(resourceMap.getString("chkPagos.text")); // NOI18N chkPagos.setName("chkPagos"); // NOI18N chkPagos.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkPagosActionPerformed(evt); } }); chkAnularFacturas.setText(resourceMap.getString("chkAnularFacturas.text")); // NOI18N chkAnularFacturas.setName("chkAnularFacturas"); // NOI18N chkFlujo.setText(resourceMap.getString("chkFlujo.text")); // NOI18N chkFlujo.setName("chkFlujo"); // NOI18N chkEliminarPagos.setText(resourceMap.getString("chkEliminarPagos.text")); // NOI18N chkEliminarPagos.setName("chkEliminarPagos"); // NOI18N chkNotasEntrega.setText(resourceMap.getString("chkNotasEntrega.text")); // NOI18N chkNotasEntrega.setName("chkNotasEntrega"); // NOI18N chkPagoNuevo.setText(resourceMap.getString("chkPagoNuevo.text")); // NOI18N chkPagoNuevo.setName("chkPagoNuevo"); // NOI18N chkPagoRecibo.setText(resourceMap.getString("chkPagoRecibo.text")); // NOI18N chkPagoRecibo.setName("chkPagoRecibo"); // NOI18N chkReimpresion.setText(resourceMap.getString("chkReimpresion.text")); // NOI18N chkReimpresion.setName("chkReimpresion"); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(16, 16, 16) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkAbrirCaja) .addComponent(chkCerrarCaja) .addComponent(chkFacturar) .addComponent(chkPagos) .addComponent(chkPagoNuevo)) .addGap(32, 32, 32) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkPagoRecibo) .addComponent(chkNotasEntrega) .addComponent(chkEliminarPagos) .addComponent(chkFlujo) .addGroup( jPanel1Layout .createSequentialGroup() .addComponent(chkAnularFacturas) .addGap(108, 108, 108) .addComponent(chkReimpresion))) .addContainerGap(52, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkAbrirCaja) .addComponent(chkAnularFacturas) .addComponent(chkReimpresion)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkCerrarCaja) .addComponent(chkFlujo)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkFacturar) .addComponent(chkEliminarPagos)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkPagos) .addComponent(chkNotasEntrega)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkPagoNuevo) .addComponent(chkPagoRecibo)) .addContainerGap(36, Short.MAX_VALUE))); jideTabbedPane1.addTab( resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N jPanel3.setName("jPanel3"); // NOI18N chkPagosHistorico.setText(resourceMap.getString("chkPagosHistorico.text")); // NOI18N chkPagosHistorico.setName("chkPagosHistorico"); // NOI18N chkFactHistorico.setText(resourceMap.getString("chkFactHistorico.text")); // NOI18N chkFactHistorico.setName("chkFactHistorico"); // NOI18N javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel3Layout .createSequentialGroup() .addGap(19, 19, 19) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkFactHistorico) .addComponent(chkPagosHistorico)) .addContainerGap(447, Short.MAX_VALUE))); jPanel3Layout.setVerticalGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel3Layout .createSequentialGroup() .addGap(14, 14, 14) .addComponent(chkFactHistorico) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkPagosHistorico) .addContainerGap(102, Short.MAX_VALUE))); jideTabbedPane1.addTab( resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N jPanel4.setName("jPanel4"); // NOI18N chkModificarProductos.setText(resourceMap.getString("chkModificarProductos.text")); // NOI18N chkModificarProductos.setName("chkModificarProductos"); // NOI18N chkEliminarProductos.setText(resourceMap.getString("chkEliminarProductos.text")); // NOI18N chkEliminarProductos.setName("chkEliminarProductos"); // NOI18N chkKardex.setText(resourceMap.getString("chkKardex.text")); // NOI18N chkKardex.setName("chkKardex"); // NOI18N chkKardex.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkKardexActionPerformed(evt); } }); chkRecibir.setText(resourceMap.getString("chkRecibir.text")); // NOI18N chkRecibir.setName("chkRecibir"); // NOI18N chkRetirar.setText(resourceMap.getString("chkRetirar.text")); // NOI18N chkRetirar.setName("chkRetirar"); // NOI18N chkListProductosDel.setText(resourceMap.getString("chkListProductosDel.text")); // NOI18N chkListProductosDel.setName("chkListProductosDel"); // NOI18N chkChequear.setText(resourceMap.getString("chkChequear.text")); // NOI18N chkChequear.setName("chkChequear"); // NOI18N chkInventario.setText(resourceMap.getString("chkInventario.text")); // NOI18N chkInventario.setName("chkInventario"); // NOI18N chkRecibirCompras.setText(resourceMap.getString("chkRecibirCompras.text")); // NOI18N chkRecibirCompras.setName("chkRecibirCompras"); // NOI18N javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel4Layout .createSequentialGroup() .addGap(16, 16, 16) .addGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkRetirar) .addGroup( jPanel4Layout .createSequentialGroup() .addGroup( jPanel4Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkModificarProductos) .addComponent(chkEliminarProductos) .addComponent(chkKardex) .addComponent(chkRecibir)) .addGap(55, 55, 55) .addGroup( jPanel4Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkRecibirCompras) .addComponent(chkInventario) .addComponent(chkChequear) .addComponent(chkListProductosDel)))) .addContainerGap(152, Short.MAX_VALUE))); jPanel4Layout.setVerticalGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel4Layout .createSequentialGroup() .addGap(26, 26, 26) .addGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkModificarProductos) .addComponent(chkListProductosDel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkEliminarProductos) .addComponent(chkChequear)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkKardex) .addComponent(chkInventario)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkRecibir) .addComponent(chkRecibirCompras)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chkRetirar) .addContainerGap(24, Short.MAX_VALUE))); jideTabbedPane1.addTab( resourceMap.getString("jPanel4.TabConstraints.tabTitle"), jPanel4); // NOI18N jPanel5.setName("jPanel5"); // NOI18N chkMantenimientoGrupo.setText(resourceMap.getString("chkMantenimientoGrupo.text")); // NOI18N chkMantenimientoGrupo.setName("chkMantenimientoGrupo"); // NOI18N javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel5Layout .createSequentialGroup() .addGap(20, 20, 20) .addComponent(chkMantenimientoGrupo) .addContainerGap(392, Short.MAX_VALUE))); jPanel5Layout.setVerticalGroup( jPanel5Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel5Layout .createSequentialGroup() .addGap(20, 20, 20) .addComponent(chkMantenimientoGrupo) .addContainerGap(122, Short.MAX_VALUE))); jideTabbedPane1.addTab( resourceMap.getString("jPanel5.TabConstraints.tabTitle"), jPanel5); // NOI18N jPanel7.setName("jPanel7"); // NOI18N chkVentaCaja.setText(resourceMap.getString("chkVentaCaja.text")); // NOI18N chkVentaCaja.setName("chkVentaCaja"); // NOI18N chkVentasNE.setText(resourceMap.getString("chkVentasNE.text")); // NOI18N chkVentasNE.setName("chkVentasNE"); // NOI18N chkVentasNEVendedores.setText(resourceMap.getString("chkVentasNEVendedores.text")); // NOI18N chkVentasNEVendedores.setName("chkVentasNEVendedores"); // NOI18N chkDescuentos.setText(resourceMap.getString("chkDescuentos.text")); // NOI18N chkDescuentos.setName("chkDescuentos"); // NOI18N chkRepPagos.setText(resourceMap.getString("chkRepPagos.text")); // NOI18N chkRepPagos.setName("chkRepPagos"); // NOI18N javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup( jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel7Layout .createSequentialGroup() .addGap(35, 35, 35) .addGroup( jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel7Layout .createSequentialGroup() .addComponent(chkVentaCaja) .addGap(69, 69, 69) .addComponent(chkRepPagos)) .addComponent(chkVentasNEVendedores) .addComponent(chkVentasNE) .addComponent(chkDescuentos)) .addContainerGap(251, Short.MAX_VALUE))); jPanel7Layout.setVerticalGroup( jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel7Layout .createSequentialGroup() .addGap(31, 31, 31) .addGroup( jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkVentaCaja) .addComponent(chkRepPagos)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chkVentasNE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chkVentasNEVendedores) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(chkDescuentos) .addContainerGap(42, Short.MAX_VALUE))); jideTabbedPane1.addTab( resourceMap.getString("jPanel7.TabConstraints.tabTitle"), jPanel7); // NOI18N jPanel6.setName("jPanel6"); // NOI18N chkModClientes.setText(resourceMap.getString("chkModClientes.text")); // NOI18N chkModClientes.setName("chkModClientes"); // NOI18N chkClienteDel.setText(resourceMap.getString("chkClienteDel.text")); // NOI18N chkClienteDel.setName("chkClienteDel"); // NOI18N chkAddCliente.setText(resourceMap.getString("chkAddCliente.text")); // NOI18N chkAddCliente.setName("chkAddCliente"); // NOI18N javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup( jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel6Layout .createSequentialGroup() .addGap(28, 28, 28) .addGroup( jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkAddCliente) .addComponent(chkClienteDel) .addComponent(chkModClientes)) .addContainerGap(490, Short.MAX_VALUE))); jPanel6Layout.setVerticalGroup( jPanel6Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel6Layout .createSequentialGroup() .addGap(18, 18, 18) .addComponent(chkModClientes) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkClienteDel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkAddCliente) .addContainerGap(72, Short.MAX_VALUE))); jideTabbedPane1.addTab( resourceMap.getString("jPanel6.TabConstraints.tabTitle"), jPanel6); // NOI18N jPanel8.setName("jPanel8"); // NOI18N chkProveedorMod.setText(resourceMap.getString("chkProveedorMod.text")); // NOI18N chkProveedorMod.setName("chkProveedorMod"); // NOI18N chkProveedorDel.setText(resourceMap.getString("chkProveedorDel.text")); // NOI18N chkProveedorDel.setName("chkProveedorDel"); // NOI18N javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup( jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel8Layout .createSequentialGroup() .addGap(18, 18, 18) .addGroup( jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(chkProveedorDel) .addComponent(chkProveedorMod)) .addContainerGap(488, Short.MAX_VALUE))); jPanel8Layout.setVerticalGroup( jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel8Layout .createSequentialGroup() .addGap(19, 19, 19) .addComponent(chkProveedorMod) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkProveedorDel) .addContainerGap(97, Short.MAX_VALUE))); jideTabbedPane1.addTab( resourceMap.getString("jPanel8.TabConstraints.tabTitle"), jPanel8); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(210, 210, 210) .addComponent(btnGuardar)) .addGroup( layout .createSequentialGroup() .addGap(21, 21, 21) .addComponent(jLabel1) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( cmbUsuarios, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(btnMostrar)) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jideTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 633, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(21, Short.MAX_VALUE))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addGap(31, 31, 31) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( cmbUsuarios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1) .addComponent(btnMostrar)) .addGap(30, 30, 30) .addComponent( jideTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnGuardar) .addGap(15, 15, 15))); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); searchTxt = new javax.swing.JTextField(); searchButton = new org.jdesktop.swingx.JXButton(); newButton = new org.jdesktop.swingx.JXButton(); deleteButton = new org.jdesktop.swingx.JXButton(); jScrollPane1 = new javax.swing.JScrollPane(); masterTable = new org.jdesktop.swingx.JXTable(); datosPanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); txtId = new org.jdesktop.swingx.JXTextField(); txtCosto = new javax.swing.JFormattedTextField(); jLabel3 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); txtDescripcion = new javax.swing.JTextField(); newLabel = new javax.swing.JLabel(); txtNombre = new EntityJTextField(); saveButton = new org.jdesktop.swingx.JXButton(); jPanel2 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); sesionesTable = new javax.swing.JTable(); addSesionButton = new javax.swing.JButton(); removeSesionButton = new javax.swing.JButton(); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.jstore.JStoreApp.class) .getContext() .getResourceMap(CitasView.class); setBorder( javax.swing.BorderFactory.createTitledBorder( resourceMap.getString("Form.border.title"))); // NOI18N setName("Form"); // NOI18N jPanel1.setBorder( javax.swing.BorderFactory.createTitledBorder( resourceMap.getString("jPanel1.border.title"))); // NOI18N jPanel1.setName("jPanel1"); // NOI18N searchTxt.setName("searchTxt"); // NOI18N searchTxt.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchTxtActionPerformed(evt); } }); searchButton.setIcon(resourceMap.getIcon("searchButton.icon")); // NOI18N searchButton.setText(resourceMap.getString("searchButton.text")); // NOI18N searchButton.setName("searchButton"); // NOI18N searchButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchButtonActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addComponent( searchTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent( searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( searchTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(6, Short.MAX_VALUE))); newButton.setIcon(resourceMap.getIcon("newButton.icon")); // NOI18N newButton.setText(resourceMap.getString("newButton.text")); // NOI18N newButton.setName("newButton"); // NOI18N newButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newButtonActionPerformed(evt); } }); deleteButton.setIcon(resourceMap.getIcon("deleteButton.icon")); // NOI18N deleteButton.setText(resourceMap.getString("deleteButton.text")); // NOI18N deleteButton.setName("deleteButton"); // NOI18N deleteButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); jScrollPane1.setName("jScrollPane1"); // NOI18N masterTable.setModel( new javax.swing.table.DefaultTableModel( new Object[][] {}, new String[] {"Id", "Nombre", "Descripcion", "Minutos Maquina", "Costo"})); masterTable.setName("masterTable"); // NOI18N jScrollPane1.setViewportView(masterTable); masterTable .getColumnModel() .getColumn(0) .setHeaderValue(resourceMap.getString("masterTable.columnModel.title0")); // NOI18N masterTable .getColumnModel() .getColumn(1) .setHeaderValue(resourceMap.getString("masterTable.columnModel.title1")); // NOI18N masterTable .getColumnModel() .getColumn(2) .setHeaderValue(resourceMap.getString("masterTable.columnModel.title2")); // NOI18N masterTable .getColumnModel() .getColumn(3) .setHeaderValue(resourceMap.getString("masterTable.columnModel.title3")); // NOI18N masterTable .getColumnModel() .getColumn(4) .setHeaderValue(resourceMap.getString("masterTable.columnModel.title4")); // NOI18N datosPanel.setBorder( javax.swing.BorderFactory.createTitledBorder( resourceMap.getString("datosPanel.border.title"))); // NOI18N datosPanel.setName("datosPanel"); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N txtId.setEditable(false); txtId.setName("txtId"); // NOI18N txtCosto.setFormatterFactory( new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter())); txtCosto.setText(resourceMap.getString("txtCosto.text")); // NOI18N txtCosto.setName("txtCosto"); // NOI18N jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N jLabel5.setName("jLabel5"); // NOI18N jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N jLabel7.setName("jLabel7"); // NOI18N txtDescripcion.setText(resourceMap.getString("txtDescripcion.text")); // NOI18N txtDescripcion.setName("txtDescripcion"); // NOI18N newLabel.setBackground(resourceMap.getColor("newLabel.background")); // NOI18N newLabel.setForeground(resourceMap.getColor("newLabel.foreground")); // NOI18N newLabel.setText(resourceMap.getString("newLabel.text")); // NOI18N newLabel.setName("newLabel"); // NOI18N newLabel.setOpaque(true); txtNombre.setText(resourceMap.getString("txtNombre.text")); // NOI18N txtNombre.setName("txtNombre"); // NOI18N javax.swing.GroupLayout datosPanelLayout = new javax.swing.GroupLayout(datosPanel); datosPanel.setLayout(datosPanelLayout); datosPanelLayout.setHorizontalGroup( datosPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( datosPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( datosPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent(jLabel1) .addComponent(jLabel7) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( datosPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup( datosPanelLayout .createSequentialGroup() .addComponent( txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(4, 4, 4) .addComponent(newLabel)) .addComponent(txtDescripcion) .addComponent( txtCosto, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( txtNombre, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); datosPanelLayout.setVerticalGroup( datosPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( datosPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( datosPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3) .addComponent( txtId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(newLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( datosPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent( txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( datosPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7) .addComponent( txtDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( datosPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent( txtCosto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(45, Short.MAX_VALUE))); saveButton.setIcon(resourceMap.getIcon("saveButton.icon")); // NOI18N saveButton.setText(resourceMap.getString("saveButton.text")); // NOI18N saveButton.setName("saveButton"); // NOI18N saveButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveButtonActionPerformed(evt); } }); jPanel2.setBorder( javax.swing.BorderFactory.createTitledBorder( resourceMap.getString("jPanel2.border.title"))); // NOI18N jPanel2.setName("jPanel2"); // NOI18N jScrollPane2.setName("jScrollPane2"); // NOI18N sesionesTable.setModel( new javax.swing.table.DefaultTableModel( new Object[][] {{null, null}}, new String[] {"Sesion", "# de Sesiones"}) { Class[] types = new Class[] {java.lang.Object.class, java.lang.Double.class}; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }); sesionesTable.setName("sesionesTable"); // NOI18N jScrollPane2.setViewportView(sesionesTable); addSesionButton.setIcon(resourceMap.getIcon("addSesionButton.icon")); // NOI18N addSesionButton.setText(resourceMap.getString("addSesionButton.text")); // NOI18N addSesionButton.setName("addSesionButton"); // NOI18N removeSesionButton.setIcon(resourceMap.getIcon("removeSesionButton.icon")); // NOI18N removeSesionButton.setName("removeSesionButton"); // NOI18N javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addComponent( addSesionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( removeSesionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 451, Short.MAX_VALUE)) .addContainerGap())); jPanel2Layout.setVerticalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( addSesionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( removeSesionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE) .addContainerGap())); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( layout .createSequentialGroup() .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 650, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(saveButton, 0, 0, Short.MAX_VALUE) .addComponent( newButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup( layout .createSequentialGroup() .addComponent( datosPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent( deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( newButton, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( saveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( datosPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); } // </editor-fold>//GEN-END:initComponents
// Build the form public PackagesFrame() { super("Packages", true, true, true, true); // Hide the frame when closed, don't destroy it as it is only created // once setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); getContentPane().setLayout(null); getContentPane().setSize(800, 550); // Add CRUD buttons // Add all panels to form getContentPane().add(new JLabel("Viewing Packages"), "North"); getContentPane().add(pnlCrudPanel, "South"); pnlCrudPanel.setBounds(0, 496, 756, 31); pnlCrudPanel.add(btnDelete); pnlCrudPanel.add(btnSave); pnlCrudPanel.add(btnEdit); { jScrollPane1 = new JScrollPane(); getContentPane().add(jScrollPane1); jScrollPane1.setBounds(12, 34, 774, 223); btnNew.setBounds(304, 415, 35, 21); btnNew.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { addNewRow(); } }); btnEdit.setBounds(350, 415, 32, 21); pnlCrudPanel.add(btnNew); btnEdit.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnEditMouseClicked(e); } }); btnSave.setBounds(393, 415, 38, 21); btnSave.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSaveMouseClicked(e); } }); btnDelete.setBounds(442, 415, 45, 21); btnDelete.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnDeleteMouseClicked(e); } }); { tblPackages = new JTable(); jScrollPane1.setViewportView(tblPackages); tblPackages.setRowHeight(25); // initialize package table with result set pkgTblModel = new PackagesTableModel(); tblPackages.setSurrendersFocusOnKeystroke(true); tblPackages.setBorder(BorderFactory.createBevelBorder(1)); tblPackages.addMouseListener( new MouseAdapter() { public void mousePressed(MouseEvent evt) {} public void mouseClicked(java.awt.event.MouseEvent e) { int clicked = e.getClickCount(); if (clicked == 2) { Point pt = e.getPoint(); int i = tblPackages.rowAtPoint(pt); int j = tblPackages.columnAtPoint(pt); // System.out.println("<" + i + "," + j + ">"); if (j == PackagesTableModel.START_DATE || j == PackagesTableModel.END_DATE) { // show calendar if (JOptionPane.showConfirmDialog(null, calStartDate) == JOptionPane.OK_OPTION) { java.sql.Date d = new java.sql.Date(calStartDate.getCalendar().getTimeInMillis()); pkgTblModel.setValueAt(d, i, j); } } } } }); tblPackages .getSelectionModel() .addListSelectionListener( new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { // if (e.getValueIsAdjusting() // && (e.getFirstIndex() != e // .getLastIndex())) listSelectionChaged(e); } }); tblPackages.setModel(pkgTblModel); initTable(pkgTblModel, -1); // sorter = new TableRowSorter<PackagesTableModel>(pkgTblModel); // sorter confuses my table model // tblPackages.setRowSorter(sorter); tblPackages.setDefaultRenderer(Object.class, new EvenOddRenderer()); // final NumericTextField ntf = new NumericTextField(currency); final NumericTextField ntf = new NumericTextField(); tblPackages .getColumnModel() .getColumn(PackagesTableModel.COMMISSION) .setCellEditor(new DefaultCellEditor(ntf)); tblPackages .getColumnModel() .getColumn(PackagesTableModel.PRICE) .setCellEditor(new DefaultCellEditor(ntf)); ntf.addFocusListener( new FocusListener() { @Override public void focusGained(FocusEvent e) { eraseNonNumeric(e); NumberFormat currency = NumberFormat.getCurrencyInstance(Locale.CANADA); try { Double dblValue = currency.parse(((JTextField) e.getComponent()).getText()).doubleValue(); ((JTextField) e.getComponent()).setText(dblValue.toString()); } catch (ParseException e1) { e1.printStackTrace(); } } @Override public void focusLost(FocusEvent e) {} }); ntf.addKeyListener( new KeyAdapter() { public void keyTyped(KeyEvent e) { TXLogger.logger.debug("NumericTextFiled: " + e.getKeyCode()); // System.out.println("NumericTextFiled: " // + e.getKeyChar()); String txtOld = ((JTextField) e.getComponent()).getText(); if (e.getKeyChar() >= KeyEvent.VK_0 && e.getKeyChar() <= KeyEvent.VK_9) { if (txtOld.indexOf('.') == -1 && txtOld.length() >= 15) { e.consume(); return; } return; } else if (e.getKeyChar() == '.') { if (((JTextField) e.getComponent()).getText().indexOf('.') > -1) e.consume(); TXLogger.logger.debug( "index of ." + ((JTextField) e.getComponent()).getText().indexOf('.')); // System.out.println("index of ." // + ((JTextField) e.getComponent()).getText() // .indexOf('.')); } else if (e.getKeyCode() != '\n') { e.consume(); } } }); JTextField cellNotNull = new JTextField(); tblPackages .getColumnModel() .getColumn(PackagesTableModel.PACKAGE_NAME) .setCellEditor(new DefaultCellEditor(cellNotNull)); tblPackages .getColumnModel() .getColumn(PackagesTableModel.DESCRIPTION) .setCellEditor(new DefaultCellEditor(cellNotNull)); cellNotNull.addFocusListener( new FocusListener() { @Override public void focusGained(FocusEvent e) { String txt = ((JTextField) (e.getComponent())).getText(); if ((txt.indexOf((VALUE_REQUIRED)) >= 0)) { ((JTextField) (e.getComponent())).setText(""); } } @Override public void focusLost(FocusEvent e) {} }); // Column 5 and 6 only accept numeric input cellNotNull.addKeyListener( new KeyAdapter() { public void keyTyped(KeyEvent e) { TXLogger.logger.debug(e.getKeyChar()); // System.out.println(e.getKeyChar()); if (((JTextField) e.getComponent()).getText().length() >= 100) { e.consume(); return; } } }); // popup memu tblPackages.addMouseListener( new MouseAdapter() { public void mousePressed(MouseEvent evt) { if (tblPackages.getSelectedRow() >= 0 && evt.getButton() == MouseEvent.BUTTON3) { popupMenu.show(evt.getComponent(), evt.getX(), evt.getY()); } } }); cellNotNull.addFocusListener( new FocusListener() { @Override public void focusGained(FocusEvent e) { if (((JTextField) e.getComponent()).getText().trim().equals(VALUE_REQUIRED)) { ((JTextField) e.getComponent()).setText(""); } ((JTextField) e.getComponent()).setBackground(Color.RED); } @Override public void focusLost(FocusEvent e) {} }); tblPackages.setBounds(32, 12, 700, 203); tblPackages.setPreferredSize(new java.awt.Dimension(756, 422)); popupMenu = new JPopupMenu(); copyItem = new JMenuItem("Copy and create a new package"); copyItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { copyAndCreate(tblPackages.getSelectedRow()); } }); JMenuItem deleteItem = new JMenuItem("Delete"); deleteItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnDeleteMouseClicked(null); } }); JMenuItem newItem = new JMenuItem("New"); newItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { addNewRow(); } }); JMenuItem editItem = new JMenuItem("Edit"); editItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnEditMouseClicked(null); } }); JMenuItem saveItem = new JMenuItem("Save"); saveItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSaveMouseClicked(null); } }); JMenuItem printItem = new JMenuItem("Print"); printItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub try { // openURL("http://google.com"); openURL("http://localhost:8081/CrystalWeb2/PackageList.rpt-viewer.jsp"); } catch (RuntimeException e1) { TXLogger.logger.error(e1.getMessage()); // e1.printStackTrace(); } catch (IOException e2) { TXLogger.logger.error(e2.getMessage()); // e2.printStackTrace(); } } }); popupMenu.add(copyItem); popupMenu.addSeparator(); popupMenu.add(deleteItem); popupMenu.add(saveItem); popupMenu.add(editItem); popupMenu.add(newItem); popupMenu.addSeparator(); popupMenu.add(printItem); } } { cmbProdFilterModel = new DefaultComboBoxModel(); cmbProdFilter = new JComboBox(); getContentPane().add(cmbProdFilter); cmbProdFilter.setModel(cmbProdFilterModel); cmbProdFilter.setBounds(436, 283, 204, 21); cmbProdFilter.setEditable(true); cmbProdFilter.addItemListener( new ItemListener() { public void itemStateChanged(ItemEvent evt) { cmbProdFilterItemStateChanged(evt); } }); } { jLabel1 = new JLabel(); getContentPane().add(jLabel1); jLabel1.setBounds(33, 9, 129, 14); jLabel1.setName("jLabel1"); } { jLabel2 = new JLabel(); getContentPane().add(jLabel2); jLabel2.setBounds(34, 248, 94, 14); jLabel2.setName("jLabel2"); } { jLabel3 = new JLabel(); getContentPane().add(jLabel3); jLabel3.setBounds(436, 248, 119, 14); jLabel3.setName("jLabel3"); } { btnInc = new JButton("<"); getContentPane().add(btnInc); btnInc.setBounds(351, 327, 52, 21); btnInc.setName("btnInc"); btnInc.addMouseListener( new MouseAdapter() { public void mouseClicked(MouseEvent evt) { TXLogger.logger.debug("btnInc.mouseClicked, event"); // System.out.println("btnInc.mouseClicked, event=" + evt); btnIncMouseClicked(evt); } }); } { btnIncAll = new JButton("<<"); getContentPane().add(btnIncAll); btnIncAll.setBounds(351, 362, 52, 21); btnIncAll.setName("btnIncAll"); btnIncAll.addMouseListener( new MouseAdapter() { public void mouseClicked(MouseEvent evt) { btnIncAllMouseClicked(evt); } }); } { btnExc = new JButton(">"); getContentPane().add(btnExc); btnExc.setBounds(351, 394, 52, 21); btnExc.setName("btnExc"); btnExc.addMouseListener( new MouseAdapter() { public void mouseClicked(MouseEvent evt) { btnExcMouseClicked(evt); } }); } { btnExcAll = new JButton(">>"); getContentPane().add(btnExcAll); btnExcAll.setBounds(351, 426, 52, 21); btnExcAll.setName("btnExcAll"); btnExcAll.addMouseListener( new MouseAdapter() { public void mouseClicked(MouseEvent evt) { btnExcAllMouseClicked(evt); } }); } { jScrollPane3 = new JScrollPane(); getContentPane().add(jScrollPane3); jScrollPane3.setBounds(437, 306, 286, 169); { ListModel jList1Model = new DefaultComboBoxModel(new String[] {"Item One", "Item Two"}); lstProdAvi = new JList(new Object[] {"First Class Flight", "Car Rental", "Scuba Diving Adventure"}); jScrollPane3.setViewportView(lstProdAvi); lstProdAvi.setModel(jList1Model); lstProdAvi.setBorder( BorderFactory.createTitledBorder( BorderFactory.createBevelBorder(1), "Product--Supplier")); lstProdAvi.setBounds(436, 284, 286, 169); dlmAvi = new DefaultListModel(); lstProdAvi.setModel(dlmAvi); } } { jScrollPane2 = new JScrollPane(); getContentPane().add(jScrollPane2); getContentPane().add(getJLabel4()); getContentPane().add(getJLabel5()); getContentPane().add(getJLabel7()); getContentPane().add(getCmbPkgFilter()); getContentPane().add(getJLabel8()); getContentPane().add(getJLabel6()); getContentPane().add(getCmbOrderBy()); jScrollPane2.setBounds(34, 303, 286, 166); jScrollPane2.setViewportView(lstProdInc); } // Draw fancy border for the list lstProdInc.setBorder( BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(1), "Product--Supplier")); lstProdInc.setBounds(33, 281, 286, 166); lstProdInc.setModel(dlmInc); validate(); pack(); Application.getInstance().getContext().getResourceMap(getClass()).injectComponents(this); getAllProdList(""); initCboProdFilter(); tblPackages.getColumn(pkgTblModel.getColumnName(0)).setPreferredWidth(15); tblPackages.getColumn(pkgTblModel.getColumnName(1)).setPreferredWidth(100); tblPackages.getColumn(pkgTblModel.getColumnName(2)).setPreferredWidth(40); tblPackages.getColumn(pkgTblModel.getColumnName(3)).setPreferredWidth(40); tblPackages.getColumn(pkgTblModel.getColumnName(4)).setPreferredWidth(200); tblPackages.getColumn(pkgTblModel.getColumnName(5)).setPreferredWidth(40); tblPackages.getColumn(pkgTblModel.getColumnName(6)).setPreferredWidth(40); tblPackages.setName("tblPackages"); setButtonState(false); }
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); usernameLabel = new javax.swing.JLabel(); usernameTextField = new javax.swing.JTextField(); oldPasswordLabel = new javax.swing.JLabel(); oldPasswordField = new javax.swing.JPasswordField(); newPasswordLabel = new javax.swing.JLabel(); newPasswordField = new javax.swing.JPasswordField(); confirmPasswordLabel = new javax.swing.JLabel(); confirmPasswordField = new javax.swing.JPasswordField(); okButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(ke.go.moh.oec.reception.gui.App.class) .getContext() .getResourceMap(ChangePasswordDialog.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setName("Form"); // NOI18N setResizable(false); jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanel1.setName("jPanel1"); // NOI18N usernameLabel.setText(resourceMap.getString("usernameLabel.text")); // NOI18N usernameLabel.setName("usernameLabel"); // NOI18N usernameTextField.setEditable(false); usernameTextField.setName("usernameTextField"); // NOI18N oldPasswordLabel.setText(resourceMap.getString("oldPasswordLabel.text")); // NOI18N oldPasswordLabel.setName("oldPasswordLabel"); // NOI18N oldPasswordField.setName("oldPasswordField"); // NOI18N newPasswordLabel.setText(resourceMap.getString("newPasswordLabel.text")); // NOI18N newPasswordLabel.setName("newPasswordLabel"); // NOI18N newPasswordField.setName("newPasswordField"); // NOI18N confirmPasswordLabel.setText(resourceMap.getString("confirmPasswordLabel.text")); // NOI18N confirmPasswordLabel.setName("confirmPasswordLabel"); // NOI18N confirmPasswordField.setName("confirmPasswordField"); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(confirmPasswordLabel) .addComponent(newPasswordLabel) .addComponent(oldPasswordLabel) .addComponent(usernameLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( usernameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE) .addComponent( oldPasswordField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE) .addComponent( newPasswordField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE) .addComponent( confirmPasswordField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)) .addContainerGap())); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(usernameLabel) .addComponent( usernameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(oldPasswordLabel) .addComponent( oldPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(newPasswordLabel) .addComponent( newPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(confirmPasswordLabel) .addComponent( confirmPasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(ke.go.moh.oec.reception.gui.App.class) .getContext() .getActionMap(ChangePasswordDialog.class, this); okButton.setAction(actionMap.get("changePasword")); // NOI18N okButton.setText(resourceMap.getString("okButton.text")); // NOI18N okButton.setName("okButton"); // NOI18N cancelButton.setAction(actionMap.get("cancel")); // NOI18N cancelButton.setText(resourceMap.getString("cancelButton.text")); // NOI18N cancelButton.setName("cancelButton"); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addComponent(okButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelButton))) .addContainerGap())); layout.linkSize( javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cancelButton, okButton}); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelButton) .addComponent(okButton)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); pack(); } // </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { transaction1 = new com.pks.gms.domain.Transaction(); jScrollPane1 = new javax.swing.JScrollPane(); transactionTable = new javax.swing.JTable(); userField = new javax.swing.JComboBox(); userLabel = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.pks.gms.GmsApp.class) .getContext() .getResourceMap(ListTransaction.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setName("Form"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N transactionTable.setModel( new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] {"Title 1"}) { boolean[] canEdit = new boolean[] {false}; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); transactionTable.setName("transactionTable"); // NOI18N jScrollPane1.setViewportView(transactionTable); userField.setModel(new javax.swing.DefaultComboBoxModel(new String[] {"Pankaj"})); userField.setName("userField"); // NOI18N userLabel.setText(resourceMap.getString("userLabel.text")); // NOI18N userLabel.setName("userLabel"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(com.pks.gms.GmsApp.class) .getContext() .getActionMap(ListTransaction.class, this); jButton1.setAction(actionMap.get("refresh")); // NOI18N jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N jButton1.setName("jButton1"); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 352, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(184, Short.MAX_VALUE)) .addGroup( layout .createSequentialGroup() .addGap(56, 56, 56) .addComponent(userLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(userField, 0, 144, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(jButton1) .addGap(243, 243, 243))); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addGap(32, 32, 32) .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(userLabel) .addComponent( userField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(19, 19, 19))); pack(); } // </editor-fold>//GEN-END:initComponents