/* WARNING: THIS METHOD WILL BE REGENERATED. */ private javax.swing.JMenu getTestMenu() { if (ivjTestMenu == null) { try { ivjTestMenu = new javax.swing.JMenu(); ivjTestMenu.setName("TestMenu"); ivjTestMenu.setText("Test"); ivjTestMenu.setBackground(java.awt.SystemColor.control); ivjTestMenu.setActionCommand("FileMenu"); ivjTestMenu.add(getRunMenuItem()); ivjTestMenu.add(getSetupMenuItem()); ivjTestMenu.add(getResetMenuItem()); ivjTestMenu.add(getJSeparator1()); ivjTestMenu.add(getKillMenuItem()); ivjTestMenu.add(getStopMenuItem()); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } } return ivjTestMenu; }
/** * Updates menu configuration * * @param menu * @param prefix (in properties file) */ public void configureMenu(JMenu menu, String prefix) { menu.setName(prefix); String text = bundle.getString(prefix + ".text"); menu.setText(text); try { String mnemonic = bundle.getString(prefix + ".mnemonic"); menu.setMnemonic(mnemonic.charAt(0)); } catch (MissingResourceException exception) { // ok not to set mnemonic } try { String tooltip = bundle.getString(prefix + ".tooltip"); menu.setToolTipText(tooltip); } catch (MissingResourceException exception) { // ok not to set tooltip } try { String iconPath = bundle.getString(prefix + ".icon"); if (iconPath != null) { ImageIcon icon = new ImageIcon(this.referenceClass.getResource(iconPath)); menu.setIcon(icon); } } catch (MissingResourceException exception) { // ok not to set tooltip } }
/* WARNING: THIS METHOD WILL BE REGENERATED. */ private javax.swing.JMenu getLoadBuildMenu() { if (ivjLoadBuildMenu == null) { try { ivjLoadBuildMenu = new javax.swing.JMenu(); ivjLoadBuildMenu.setName("LoadBuildMenu"); ivjLoadBuildMenu.setText("Test Results"); ivjLoadBuildMenu.setBackground(java.awt.SystemColor.control); ivjLoadBuildMenu.setActionCommand("FileMenu"); ivjLoadBuildMenu.add(getRebuildTestsMenuItem()); ivjLoadBuildMenu.add(getResetModelsMenuItem()); ivjLoadBuildMenu.add(getJSeparator11()); ivjLoadBuildMenu.add(getLogResultsMenuItem()); ivjLoadBuildMenu.add(getJSeparator2()); ivjLoadBuildMenu.add(getSaveResultsMenuItem()); ivjLoadBuildMenu.add(getQueryResultsMenuItem()); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } } return ivjLoadBuildMenu; }
private JMenu createMenu(final String menuName, final String[] actionNames) { final JMenu menu = new JMenu(); menu.setName(menuName); for (final String actionName : actionNames) if (actionName.equals("---")) menu.add(new JSeparator()); else { final JMenuItem menuItem = new JMenuItem(); menuItem.setAction(findAction(actionName)); menuItem.setIcon(null); menu.add(menuItem); } return menu; }
/* WARNING: THIS METHOD WILL BE REGENERATED. */ private javax.swing.JMenu getFile() { if (ivjFile == null) { try { ivjFile = new javax.swing.JMenu(); ivjFile.setName("File"); ivjFile.setText("File"); ivjFile.setBackground(java.awt.SystemColor.control); ivjFile.setActionCommand("FileMenu"); ivjFile.add(getExitMenuItem()); // user code begin {1} // user code end } catch (java.lang.Throwable ivjExc) { // user code begin {2} // user code end handleException(ivjExc); } } return ivjFile; }
/** * 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(); jScrollPane1 = new javax.swing.JScrollPane(); txt_chat = new javax.swing.JTextArea(); txt_enviar = new javax.swing.JTextField(); bt_enviar = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); lista_jogadores = new javax.swing.JList(); jLabel1 = new javax.swing.JLabel(); bt_rolar_dados = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); txt_modificador = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); txt_num_dados = new javax.swing.JTextField(); bt_limpar = new javax.swing.JButton(); bt_ve_ficha = new javax.swing.JButton(); bt_editar_ficha = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); menu_metrar = new javax.swing.JMenuItem(); menu_jogar = new javax.swing.JMenuItem(); javax.swing.JMenuItem exitMenuItem = 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 jScrollPane1.setName("jScrollPane1"); // NOI18N txt_chat.setColumns(20); txt_chat.setRows(5); txt_chat.setName("txt_chat"); // NOI18N jScrollPane1.setViewportView(txt_chat); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(rpg.RPG.class) .getContext() .getResourceMap(RPG_Janela_Prinicpal.class); txt_enviar.setText(resourceMap.getString("txt_enviar.text")); // NOI18N txt_enviar.setName("txt_enviar"); // NOI18N txt_enviar.addKeyListener( new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { txt_enviarKeyReleased(evt); } }); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(rpg.RPG.class) .getContext() .getActionMap(RPG_Janela_Prinicpal.class, this); bt_enviar.setAction(actionMap.get("bt_enviar")); // NOI18N bt_enviar.setText(resourceMap.getString("bt_enviar.text")); // NOI18N bt_enviar.setName("bt_enviar"); // NOI18N bt_enviar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bt_enviarActionPerformed(evt); } }); jScrollPane2.setName("jScrollPane2"); // NOI18N lista_jogadores.setModel( new javax.swing.AbstractListModel() { String[] strings = {"Item 1", "Item 2", "Item 3", "Item 4", "Item 5"}; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); lista_jogadores.setName("lista_jogadores"); // NOI18N jScrollPane2.setViewportView(lista_jogadores); jLabel1.setName("jLabel1"); // NOI18N bt_rolar_dados.setAction(actionMap.get("bt_rolar_dado")); // NOI18N bt_rolar_dados.setText(resourceMap.getString("bt_rolar_dados.text")); // NOI18N bt_rolar_dados.setName("bt_rolar_dados"); // NOI18N jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N txt_modificador.setText(resourceMap.getString("txt_modificador.text")); // NOI18N txt_modificador.setName("txt_modificador"); // NOI18N jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N txt_num_dados.setText(resourceMap.getString("txt_num_dados.text")); // NOI18N txt_num_dados.setName("txt_num_dados"); // NOI18N bt_limpar.setAction(actionMap.get("bt_Limpar")); // NOI18N bt_limpar.setText(resourceMap.getString("bt_limpar.text")); // NOI18N bt_limpar.setName("bt_limpar"); // NOI18N bt_ve_ficha.setAction(actionMap.get("bt_ver_ficha")); // NOI18N bt_ve_ficha.setText(resourceMap.getString("bt_ve_ficha.text")); // NOI18N bt_ve_ficha.setName("bt_ve_ficha"); // NOI18N bt_ve_ficha.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bt_ve_fichaActionPerformed(evt); } }); bt_editar_ficha.setAction(actionMap.get("bt_editar_ficha")); // NOI18N bt_editar_ficha.setText(resourceMap.getString("bt_editar_ficha.text")); // NOI18N bt_editar_ficha.setName("bt_editar_ficha"); // NOI18N jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N jLabel4.setName("jLabel4"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout .createSequentialGroup() .addComponent( txt_enviar, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(bt_enviar)) .addGroup( mainPanelLayout .createSequentialGroup() .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(jLabel4)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( txt_modificador, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel3) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( txt_num_dados, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE) .addComponent(bt_rolar_dados) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(bt_limpar)) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 562, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE) .addComponent( bt_ve_ficha, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( bt_editar_ficha, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)) .addGap(468, 468, 468) .addComponent( jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGap(69, 69, 69) .addComponent(jLabel1)) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane2)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( txt_enviar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(bt_enviar) .addComponent(bt_ve_ficha)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent( txt_modificador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3) .addComponent( txt_num_dados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(bt_limpar) .addComponent(bt_rolar_dados) .addComponent(bt_editar_ficha)))) .addContainerGap(23, Short.MAX_VALUE)) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout .createSequentialGroup() .addContainerGap(346, Short.MAX_VALUE) .addComponent(jLabel4) .addContainerGap())); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N menu_metrar.setAction(actionMap.get("mestrar")); // NOI18N menu_metrar.setText(resourceMap.getString("menu_metrar.text")); // NOI18N menu_metrar.setName("menu_metrar"); // NOI18N fileMenu.add(menu_metrar); menu_jogar.setAction(actionMap.get("jogar")); // NOI18N menu_jogar.setText(resourceMap.getString("menu_jogar.text")); // NOI18N menu_jogar.setName("menu_jogar"); // NOI18N fileMenu.add(menu_jogar); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // 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, 1243, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1059, 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
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { mainPanel = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jTextField1 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = 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 jScrollPane1.setName("jScrollPane1"); // NOI18N jTextArea1.setColumns(20); jTextArea1.setLineWrap(true); jTextArea1.setRows(5); jTextArea1.setName("jTextArea1"); // NOI18N jScrollPane1.setViewportView(jTextArea1); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(albatross.AlbatrossApp.class) .getContext() .getResourceMap(AlbatrossView.class); jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N jTextField1.setName("jTextField1"); // NOI18N jButton1.setLabel(resourceMap.getString("jButton1.label")); // NOI18N jButton1.setName("jButton1"); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 466, Short.MAX_VALUE) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap())); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout .createSequentialGroup() .addContainerGap(302, Short.MAX_VALUE) .addGroup( mainPanelLayout .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)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1) .addGap(5, 5, 5))); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(albatross.AlbatrossApp.class) .getContext() .getActionMap(AlbatrossView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // 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, 490, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 306, 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
/** * Generate the "tools" menu. This is imperative, it is written to field {@code toolsMenu}. Reason * being, when we add (TODO remove) a new tool, we need to refresh just this menu */ void refreshToolsMenu() { List<JComponent> menuItems = new ArrayList<JComponent>(10); // batch script MenuAction menuAction = new RunScriptMenuAction("Run Batch Script...", KeyEvent.VK_X, igv); menuItems.add(MenuAndToolbarUtils.createMenuItem(menuAction)); // igvtools // menuItems.add(new JSeparator()); menuAction = new SortTracksMenuAction("Run igvtools...", KeyEvent.VK_T, igv) { @Override public void actionPerformed(ActionEvent e) { IgvToolsGui.launch(false, igv.getGenomeManager().getGenomeId()); } }; menuItems.add(MenuAndToolbarUtils.createMenuItem(menuAction)); List<JComponent> otherToolMenus = igv.getOtherToolMenus(); if (otherToolMenus.size() > 0) { for (JComponent entry : otherToolMenus) { menuItems.add(entry); } } // menuItems.add(new JSeparator()); // -------------------------------------// // "Add tool" option, for loading cli_plugin from someplace else JMenuItem addTool = new JMenuItem("Add Tool..."); addTool.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { File pluginFi = FileDialogUtils.chooseFile("Select cli_plugin .xml spec"); if (pluginFi == null) return; try { PluginSpecReader.addCustomPlugin(pluginFi.getAbsolutePath()); refreshToolsMenu(); } catch (IOException e1) { MessageUtils.showErrorMessage("Error loading custom cli_plugin", e1); } } }); // menuItems.add(addTool); // menuItems.add(new JSeparator()); // -------------------------------------// for (final PluginSpecReader pluginSpecReader : PluginSpecReader.getPlugins()) { for (final PluginSpecReader.Tool tool : pluginSpecReader.getTools()) { final String toolName = tool.name; boolean toolVisible = tool.visible; JMenuItem toolMenu; if (toolVisible) { final String toolPath = pluginSpecReader.getToolPath(tool); final String tool_url = tool.toolUrl; boolean isValid = PluginSpecReader.isToolPathValid(toolPath); ActionListener invalidActionListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { String msg = String.format("%s executable not found at %s", toolName, toolPath); if (tool_url != null) { msg += "<br/>See " + tool_url + " to install"; } MessageUtils.showMessage(msg); } }; toolMenu = new JMenu(toolName); // Kind of overlaps with the side-pull menu, doesn't look great // toolMenu.setToolTipText(tool.getAttribute("description")); for (final PluginSpecReader.Command command : tool.commandList) { final String cmdName = command.name; JMenuItem cmdItem = new JMenuItem(cmdName); toolMenu.add(cmdItem); if (isValid || toolPath == null) { cmdItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { RunPlugin runPlugin = null; try { runPlugin = new RunPlugin(IGV.getMainFrame(), pluginSpecReader, tool, command); } catch (IllegalStateException e1) { MessageUtils.showErrorMessage(e1.getMessage(), e1); return; } runPlugin.setVisible(true); } }); cmdItem.setEnabled(true); } else { cmdItem.setEnabled(false); } } // Hack so we can have a tool which is just general command line stuff // Don't let the user change the path in that case if (tool.defaultPath != null) { JMenuItem setPathItem = new JMenuItem(String.format("Set path to %s...", toolName)); setPathItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { (new SetPluginPathDialog(IGV.getMainFrame(), pluginSpecReader, tool)) .setVisible(true); refreshToolsMenu(); } }); toolMenu.add(setPathItem); } menuItems.add(toolMenu); } } } // -------------------------------------// // -----------SQL DB Tools--------------// boolean showDBEditor = Globals.isDevelopment(); if (showDBEditor) { JMenu sqlDBProfileEditor = new JMenu("SQL DB Profile Editor"); JMenuItem createNewProfile = new JMenuItem("Create New Profile"); createNewProfile.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { File file = FileDialogUtils.chooseFile( "Save DB Profile", DirectoryManager.getUserDirectory(), FileDialogUtils.SAVE); if (file != null) { DBProfileEditor editor = new DBProfileEditor(IGV.getMainFrame(), file.getAbsolutePath()); editor.setVisible(true); } } }); JMenuItem editExistingProfile = new JMenuItem("Edit Existing Profile"); editExistingProfile.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { File file = FileDialogUtils.chooseFile("Select .dbxml database profile"); if (file != null) { if (!file.exists()) {} DBProfileEditor editor = new DBProfileEditor(IGV.getMainFrame(), file.getAbsolutePath()); editor.setVisible(true); } } }); sqlDBProfileEditor.add(createNewProfile); sqlDBProfileEditor.add(editExistingProfile); menuItems.add(sqlDBProfileEditor); } // -------------------------------------// // DataTrack Math------------------------// if (Globals.isDevelopment()) { JMenuItem combineDataItem = new JMenuItem("Combine Data Tracks"); combineDataItem.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { CombinedDataSourceDialog dialog = new CombinedDataSourceDialog(IGV.getMainFrame()); dialog.setVisible(true); } }); menuItems.add(combineDataItem); } // -------------------------------------// MenuAction toolsMenuAction = new MenuAction("Tools", null); if (toolsMenu == null) { toolsMenu = MenuAndToolbarUtils.createMenu(menuItems, toolsMenuAction); toolsMenu.setName("Tools"); } else { toolsMenu.removeAll(); for (JComponent item : menuItems) { toolsMenu.add(item); } } }
/** * 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(); laberinto1 = new comecocos.Laberinto(); panelPuntuaciones1 = new comecocos.PanelPuntuaciones(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); jMenuItem2 = 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(); jMenuItem3 = new javax.swing.JMenuItem(); 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 mainPanel.setPreferredSize(new java.awt.Dimension(100, 100)); mainPanel.setLayout(new java.awt.BorderLayout()); laberinto1.setName("laberinto1"); // NOI18N laberinto1.setPreferredSize(new java.awt.Dimension(590, 200)); javax.swing.GroupLayout laberinto1Layout = new javax.swing.GroupLayout(laberinto1); laberinto1.setLayout(laberinto1Layout); laberinto1Layout.setHorizontalGroup( laberinto1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 591, Short.MAX_VALUE)); laberinto1Layout.setVerticalGroup( laberinto1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 433, Short.MAX_VALUE)); mainPanel.add(laberinto1, java.awt.BorderLayout.CENTER); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(comecocos.ComeCocosApp.class) .getContext() .getResourceMap(ComeCocosView.class); panelPuntuaciones1.setBackground( resourceMap.getColor("panelPuntuaciones1.background")); // NOI18N panelPuntuaciones1.setName("panelPuntuaciones1"); // NOI18N javax.swing.GroupLayout panelPuntuaciones1Layout = new javax.swing.GroupLayout(panelPuntuaciones1); panelPuntuaciones1.setLayout(panelPuntuaciones1Layout); panelPuntuaciones1Layout.setHorizontalGroup( panelPuntuaciones1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 591, Short.MAX_VALUE)); panelPuntuaciones1Layout.setVerticalGroup( panelPuntuaciones1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 60, Short.MAX_VALUE)); mainPanel.add(panelPuntuaciones1, java.awt.BorderLayout.SOUTH); menuBar.setName("menuBar"); // 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); jMenuItem2.setAccelerator( javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_SPACE, 0)); jMenuItem2.setText(resourceMap.getString("jMenuItem2.text")); // NOI18N jMenuItem2.setName("jMenuItem2"); // NOI18N jMenuItem2.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); fileMenu.add(jMenuItem2); jSeparator1.setName("jSeparator1"); // NOI18N fileMenu.add(jSeparator1); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(comecocos.ComeCocosApp.class) .getContext() .getActionMap(ComeCocosView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0)); jMenuItem3.setText(resourceMap.getString("jMenuItem3.text")); // NOI18N jMenuItem3.setName("jMenuItem3"); // NOI18N helpMenu.add(jMenuItem3); aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // 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, 591, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 421, 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() { 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
/** * 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(); jScrollPane1 = new javax.swing.JScrollPane(); jList1 = new javax.swing.JList(); jRadioButton1 = new javax.swing.JRadioButton(); jRadioButton2 = new javax.swing.JRadioButton(); jRadioButton3 = new javax.swing.JRadioButton(); jRadioButton4 = new javax.swing.JRadioButton(); jSeparator1 = new javax.swing.JSeparator(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLayeredPane1 = new javax.swing.JLayeredPane(); scrollPanel1 = new automaticclickutility.ScrollPanel(); movePanel1 = new automaticclickutility.MovePanel(); dragPanel1 = new automaticclickutility.DragPanel(); clickPanel1 = new automaticclickutility.ClickPanel(); jButton3 = new javax.swing.JButton(); jCheckBox1 = new javax.swing.JCheckBox(); jSpinner1 = new javax.swing.JSpinner(); jLabel1 = new javax.swing.JLabel(); jSpinner2 = new javax.swing.JSpinner(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); 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(); buttonGroup1 = new javax.swing.ButtonGroup(); mainPanel.setName("mainPanel"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N jList1.setListData(mouseActions); jList1.setName("jList1"); // NOI18N jScrollPane1.setViewportView(jList1); buttonGroup1.add(jRadioButton1); jRadioButton1.setSelected(true); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance( automaticclickutility.AutomaticClickUtilityApp.class) .getContext() .getResourceMap(AutomaticClickUtilityView.class); jRadioButton1.setText(resourceMap.getString("jRadioButton1.text")); // NOI18N jRadioButton1.setName("jRadioButton1"); // NOI18N jRadioButton1.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton1ActionPerformed(evt); } }); buttonGroup1.add(jRadioButton2); jRadioButton2.setText(resourceMap.getString("jRadioButton2.text")); // NOI18N jRadioButton2.setName("jRadioButton2"); // NOI18N jRadioButton2.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton2ActionPerformed(evt); } }); buttonGroup1.add(jRadioButton3); jRadioButton3.setText(resourceMap.getString("jRadioButton3.text")); // NOI18N jRadioButton3.setName("jRadioButton3"); // NOI18N jRadioButton3.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton3ActionPerformed(evt); } }); buttonGroup1.add(jRadioButton4); jRadioButton4.setText(resourceMap.getString("jRadioButton4.text")); // NOI18N jRadioButton4.setName("jRadioButton4"); // NOI18N jRadioButton4.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRadioButton4ActionPerformed(evt); } }); jSeparator1.setName("jSeparator1"); // NOI18N 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); } }); jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N jButton2.setName("jButton2"); // NOI18N jButton2.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jLayeredPane1.setName("jLayeredPane1"); // NOI18N scrollPanel1.setName("scrollPanel1"); // NOI18N scrollPanel1.setBounds(0, 0, 300, 140); jLayeredPane1.add(scrollPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER); movePanel1.setName("movePanel1"); // NOI18N movePanel1.setBounds(5, 10, 260, 84); jLayeredPane1.add(movePanel1, javax.swing.JLayeredPane.DEFAULT_LAYER); dragPanel1.setName("dragPanel1"); // NOI18N dragPanel1.setBounds(5, 10, 270, 84); jLayeredPane1.add(dragPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER); clickPanel1.setName("clickPanel1"); // NOI18N clickPanel1.setBounds(5, 10, 260, 84); jLayeredPane1.add(clickPanel1, javax.swing.JLayeredPane.DEFAULT_LAYER); 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); } }); jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N jCheckBox1.setName("jCheckBox1"); // NOI18N jSpinner1.setModel( new javax.swing.SpinnerNumberModel( Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1))); jSpinner1.setName("jSpinner1"); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jSpinner2.setModel( new javax.swing.SpinnerNumberModel( Integer.valueOf(1), Integer.valueOf(1), null, Integer.valueOf(1))); jSpinner2.setName("jSpinner2"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE) .addComponent( jButton3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent(jCheckBox1) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jLayeredPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE) .addComponent( jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 306, Short.MAX_VALUE) .addGroup( mainPanelLayout .createSequentialGroup() .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jRadioButton1) .addComponent(jRadioButton2)) .addGap(14, 14, 14) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jRadioButton4) .addComponent(jRadioButton3))) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout .createSequentialGroup() .addComponent( jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jButton1))) .addContainerGap())); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButton1) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jRadioButton1) .addComponent(jRadioButton4)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jRadioButton2) .addComponent(jRadioButton3))) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent(jButton3) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jCheckBox1) .addComponent( jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2))) .addContainerGap())); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance( automaticclickutility.AutomaticClickUtilityApp.class) .getContext() .getActionMap(AutomaticClickUtilityView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N 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); } }); helpMenu.add(jMenuItem1); aboutMenuItem.setAction(actionMap.get("showAboutBox")); // 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, 524, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 354, 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() { mainPanel = new javax.swing.JPanel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = 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 javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE)); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 252, Short.MAX_VALUE)); menuBar.setName("menuBar"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(GUI.MINOR_PROJECTApp.class) .getContext() .getResourceMap(MINOR_PROJECTView.class); fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(GUI.MINOR_PROJECTApp.class) .getContext() .getActionMap(MINOR_PROJECTView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // 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, 226, 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() { mainPanel = new javax.swing.JPanel(); pnButton = new javax.swing.JPanel(); btnVertex = new javax.swing.JButton(); btnEdge = new javax.swing.JButton(); btnStart = new javax.swing.JButton(); btnEnd = new javax.swing.JButton(); btnStep = new javax.swing.JButton(); btnSolve = new javax.swing.JButton(); btnClear = new javax.swing.JButton(); /* pnGraph = new javax.swing.JPanel(); */ this.pnGraph = new jGraphPanel(); jTextStatus = new javax.swing.JTextField(); jRandomCheck = new javax.swing.JCheckBox(); /* pnHeap = new javax.swing.JPanel(); */ this.pnHeap = new jHeapPanel(); jTextHeap = new javax.swing.JLabel(); pnSolution = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jSolution = new javax.swing.JTextArea(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); openMenuItem = new javax.swing.JMenuItem(); saveMenuItem = new javax.swing.JMenuItem(); jSeparator = 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(); jOpenFileChooser = new javax.swing.JFileChooser(); jSaveFileChooser = new javax.swing.JFileChooser(); mainPanel.setMinimumSize(new java.awt.Dimension(715, 600)); mainPanel.setName("mainPanel"); // NOI18N mainPanel.setPreferredSize(new java.awt.Dimension(715, 600)); pnButton.setMinimumSize(new java.awt.Dimension(90, 300)); pnButton.setName("pnButton"); // NOI18N pnButton.setPreferredSize(new java.awt.Dimension(90, 300)); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(dijkstra.DijkstraApp.class) .getContext() .getResourceMap(DijkstraView.class); btnVertex.setText(resourceMap.getString("btnVertex.text")); // NOI18N btnVertex.setToolTipText(resourceMap.getString("btnVertex.toolTipText")); // NOI18N btnVertex.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnVertex.setMinimumSize(new java.awt.Dimension(70, 30)); btnVertex.setName("btnVertex"); // NOI18N btnVertex.setPreferredSize(new java.awt.Dimension(70, 30)); btnVertex.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnVertexMouseClicked(evt); } }); btnEdge.setText(resourceMap.getString("btnEdge.text")); // NOI18N btnEdge.setToolTipText(resourceMap.getString("btnEdge.toolTipText")); // NOI18N btnEdge.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnEdge.setMinimumSize(new java.awt.Dimension(70, 30)); btnEdge.setName("btnEdge"); // NOI18N btnEdge.setPreferredSize(new java.awt.Dimension(70, 30)); btnEdge.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnEdgeMouseClicked(evt); } }); btnStart.setText(resourceMap.getString("btnStart.text")); // NOI18N btnStart.setToolTipText(resourceMap.getString("btnStart.toolTipText")); // NOI18N btnStart.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnStart.setMinimumSize(new java.awt.Dimension(70, 30)); btnStart.setName("btnStart"); // NOI18N btnStart.setPreferredSize(new java.awt.Dimension(70, 30)); btnStart.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnStartMouseClicked(evt); } }); btnEnd.setText(resourceMap.getString("btnEnd.text")); // NOI18N btnEnd.setToolTipText(resourceMap.getString("btnEnd.toolTipText")); // NOI18N btnEnd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnEnd.setMinimumSize(new java.awt.Dimension(70, 30)); btnEnd.setName("btnEnd"); // NOI18N btnEnd.setPreferredSize(new java.awt.Dimension(70, 30)); btnEnd.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnEndMouseClicked(evt); } }); btnStep.setText(resourceMap.getString("btnStep.text")); // NOI18N btnStep.setToolTipText(resourceMap.getString("btnStep.toolTipText")); // NOI18N btnStep.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnStep.setMinimumSize(new java.awt.Dimension(70, 30)); btnStep.setName("btnStep"); // NOI18N btnStep.setPreferredSize(new java.awt.Dimension(70, 30)); btnStep.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnStepMouseClicked(evt); } }); btnSolve.setText(resourceMap.getString("btnSolve.text")); // NOI18N btnSolve.setToolTipText(resourceMap.getString("btnSolve.toolTipText")); // NOI18N btnSolve.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnSolve.setMinimumSize(new java.awt.Dimension(70, 30)); btnSolve.setName("btnSolve"); // NOI18N btnSolve.setPreferredSize(new java.awt.Dimension(70, 30)); btnSolve.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnSolveMouseClicked(evt); } }); btnClear.setText(resourceMap.getString("btnClear.text")); // NOI18N btnClear.setToolTipText(resourceMap.getString("btnClear.toolTipText")); // NOI18N btnClear.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnClear.setMaximumSize(new java.awt.Dimension(50, 50)); btnClear.setMinimumSize(new java.awt.Dimension(70, 30)); btnClear.setName("btnClear"); // NOI18N btnClear.setPreferredSize(new java.awt.Dimension(70, 30)); btnClear.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnClearMouseClicked(evt); } }); javax.swing.GroupLayout pnButtonLayout = new javax.swing.GroupLayout(pnButton); pnButton.setLayout(pnButtonLayout); pnButtonLayout.setHorizontalGroup( pnButtonLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( pnButtonLayout .createSequentialGroup() .addContainerGap() .addGroup( pnButtonLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( pnButtonLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( btnVertex, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( btnEdge, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( btnStart, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE) .addComponent( btnEnd, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE) .addComponent( btnSolve, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.DEFAULT_SIZE, 70, Short.MAX_VALUE) .addComponent( btnStep, javax.swing.GroupLayout.Alignment.CENTER, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( btnClear, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); pnButtonLayout.linkSize( javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { btnClear, btnEdge, btnEnd, btnSolve, btnStart, btnStep, btnVertex }); pnButtonLayout.setVerticalGroup( pnButtonLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( pnButtonLayout .createSequentialGroup() .addContainerGap() .addComponent( btnVertex, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( btnEdge, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( btnStart, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(btnEnd, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( btnSolve, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( btnStep, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( btnClear, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE) .addGap(13, 13, 13))); btnVertex .getAccessibleContext() .setAccessibleDescription( resourceMap.getString("btnNode.AccessibleContext.accessibleDescription")); // NOI18N pnGraph.setBorder( javax.swing.BorderFactory.createTitledBorder( null, resourceMap.getString("pnGraph.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("pnGraph.border.titleFont"))); // NOI18N pnGraph.setToolTipText(resourceMap.getString("pnGraph.toolTipText")); // NOI18N pnGraph.setFont(resourceMap.getFont("pnGraph.font")); // NOI18N pnGraph.setMinimumSize(new java.awt.Dimension(600, 300)); pnGraph.setName("pnGraph"); // NOI18N pnGraph.setPreferredSize(new java.awt.Dimension(600, 300)); pnGraph.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { pnGraphMouseReleased(evt); } }); pnGraph.addMouseMotionListener( new java.awt.event.MouseMotionAdapter() { public void mouseMoved(java.awt.event.MouseEvent evt) { pnGraphMouseMoved(evt); } }); jTextStatus.setEditable(false); jTextStatus.setFont(resourceMap.getFont("jTextStatus.font")); // NOI18N jTextStatus.setHorizontalAlignment(javax.swing.JTextField.RIGHT); jTextStatus.setText(resourceMap.getString("jTextStatus.text")); // NOI18N jTextStatus.setAutoscrolls(false); jTextStatus.setBorder(null); jTextStatus.setName("jTextStatus"); // NOI18N jRandomCheck.setFont(resourceMap.getFont("jRandomCheck.font")); // NOI18N jRandomCheck.setSelected(true); jRandomCheck.setText(resourceMap.getString("jRandomCheck.text")); // NOI18N jRandomCheck.setToolTipText(resourceMap.getString("jRandomCheck.toolTipText")); // NOI18N jRandomCheck.setEnabled(false); jRandomCheck.setName("jRandomCheck"); // NOI18N javax.swing.GroupLayout pnGraphLayout = new javax.swing.GroupLayout(pnGraph); pnGraph.setLayout(pnGraphLayout); pnGraphLayout.setHorizontalGroup( pnGraphLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( pnGraphLayout .createSequentialGroup() .addContainerGap(327, Short.MAX_VALUE) .addGroup( pnGraphLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, pnGraphLayout .createSequentialGroup() .addComponent(jRandomCheck) .addContainerGap()) .addComponent( jTextStatus, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 261, javax.swing.GroupLayout.PREFERRED_SIZE)))); pnGraphLayout.setVerticalGroup( pnGraphLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, pnGraphLayout .createSequentialGroup() .addComponent( jTextStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 225, Short.MAX_VALUE) .addComponent(jRandomCheck) .addContainerGap())); pnHeap.setBorder( javax.swing.BorderFactory.createTitledBorder( null, resourceMap.getString("pnHeap.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("pnHeap.border.titleFont"))); // NOI18N pnHeap.setToolTipText(resourceMap.getString("pnHeap.toolTipText")); // NOI18N pnHeap.setFont(resourceMap.getFont("pnHeap.font")); // NOI18N pnHeap.setMinimumSize(new java.awt.Dimension(400, 250)); pnHeap.setName("pnHeap"); // NOI18N pnHeap.setPreferredSize(new java.awt.Dimension(400, 250)); jTextHeap.setFont(resourceMap.getFont("jTextHeap.font")); // NOI18N jTextHeap.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jTextHeap.setText(resourceMap.getString("jTextHeap.text")); // NOI18N jTextHeap.setName("jTextHeap"); // NOI18N javax.swing.GroupLayout pnHeapLayout = new javax.swing.GroupLayout(pnHeap); pnHeap.setLayout(pnHeapLayout); pnHeapLayout.setHorizontalGroup( pnHeapLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( pnHeapLayout .createSequentialGroup() .addContainerGap() .addComponent( jTextHeap, javax.swing.GroupLayout.DEFAULT_SIZE, 368, Short.MAX_VALUE) .addContainerGap())); pnHeapLayout.setVerticalGroup( pnHeapLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( pnHeapLayout .createSequentialGroup() .addComponent( jTextHeap, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(204, Short.MAX_VALUE))); jTextHeap .getAccessibleContext() .setAccessibleName( resourceMap.getString("jTextHeap.AccessibleContext.accessibleName")); // NOI18N pnSolution.setBorder( javax.swing.BorderFactory.createTitledBorder( null, resourceMap.getString("pnSolution.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("pnSolution.border.titleFont"))); // NOI18N pnSolution.setToolTipText(resourceMap.getString("pnSolution.toolTipText")); // NOI18N pnSolution.setMinimumSize(new java.awt.Dimension(290, 250)); pnSolution.setName("pnSolution"); // NOI18N pnSolution.setPreferredSize(new java.awt.Dimension(290, 250)); jScrollPane1.setName("jScrollPane1"); // NOI18N jSolution.setColumns(20); jSolution.setEditable(false); jSolution.setFont(resourceMap.getFont("jSolution.font")); // NOI18N jSolution.setLineWrap(true); jSolution.setRows(4); jSolution.setToolTipText(resourceMap.getString("jSolution.toolTipText")); // NOI18N jSolution.setWrapStyleWord(true); jSolution.setBorder(null); jSolution.setEnabled(false); jSolution.setFocusable(false); jSolution.setName("jSolution"); // NOI18N jScrollPane1.setViewportView(jSolution); javax.swing.GroupLayout pnSolutionLayout = new javax.swing.GroupLayout(pnSolution); pnSolution.setLayout(pnSolutionLayout); pnSolutionLayout.setHorizontalGroup( pnSolutionLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE)); pnSolutionLayout.setVerticalGroup( pnSolutionLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE)); javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( pnButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( pnGraph, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( pnHeap, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( pnSolution, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(9, 9, 9))); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( pnButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( pnGraph, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( pnHeap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( pnSolution, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15))); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N openMenuItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); openMenuItem.setText(resourceMap.getString("openMenuItem.text")); // NOI18N openMenuItem.setToolTipText(resourceMap.getString("openMenuItem.toolTipText")); // NOI18N openMenuItem.setActionCommand(resourceMap.getString("openMenuItem.actionCommand")); // NOI18N openMenuItem.setName("openMenuItem"); // NOI18N openMenuItem.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openMenuItemActionPerformed(evt); } }); fileMenu.add(openMenuItem); saveMenuItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); saveMenuItem.setText(resourceMap.getString("saveMenuItem.text")); // NOI18N saveMenuItem.setToolTipText(resourceMap.getString("saveMenuItem.toolTipText")); // NOI18N saveMenuItem.setName("saveMenuItem"); // NOI18N saveMenuItem.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveMenuItemActionPerformed(evt); } }); fileMenu.add(saveMenuItem); jSeparator.setName("jSeparator"); // NOI18N fileMenu.add(jSeparator); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(dijkstra.DijkstraApp.class) .getContext() .getActionMap(DijkstraView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); jOpenFileChooser.setFileFilter(new AppFilter()); jOpenFileChooser.setName("jOpenFileChooser"); // NOI18N jSaveFileChooser.setDialogType(javax.swing.JFileChooser.SAVE_DIALOG); jSaveFileChooser.setFileFilter(new AppFilter()); jSaveFileChooser.setName("jSaveFileChooser"); // NOI18N setComponent(mainPanel); setMenuBar(menuBar); } // </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() { mainPanel = new javax.swing.JPanel(); channelPanel = new javax.swing.JPanel(); channelTitleLabel = new javax.swing.JLabel(); channelTitleTextField = new javax.swing.JTextField(); channelLinkLabel = new javax.swing.JLabel(); channelLinkTextField = new javax.swing.JTextField(); channelDescriptionLabel = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); channelDescriptionTextArea = new javax.swing.JTextArea(); itemPanel = new javax.swing.JPanel(); createItemButton = new javax.swing.JButton(); itemTitleLabel = new javax.swing.JLabel(); itemTitleTextField = new javax.swing.JTextField(); itemDescriptionLabel = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); itemDescriptionTextArea = new javax.swing.JTextArea(); itemListScrollPane = new javax.swing.JScrollPane(); itemList = new javax.swing.JList<Item>(); deleteItemButton = new javax.swing.JButton(); generateFeedButton = new javax.swing.JButton(); arduinoPanel = new javax.swing.JPanel(); arduinoAddressLabel = new javax.swing.JLabel(); arduinoAddressTextField = new javax.swing.JTextField(); arduinoPortLabel = new javax.swing.JLabel(); arduinoPortTextField = new javax.swing.JTextField(); fileNameTextField = new javax.swing.JTextField(); fileNameLabel = new javax.swing.JLabel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(rssbuilder.RssBuilderApp.class) .getContext() .getResourceMap(RssBuilderView.class); mainPanel.setBackground(resourceMap.getColor("mainPanel.background")); // NOI18N mainPanel.setName("mainPanel"); // NOI18N mainPanel.setPreferredSize(new java.awt.Dimension(620, 737)); channelPanel.setBackground( resourceMap.getColor("channelDescriptionTextField.background")); // NOI18N channelPanel.setBorder( javax.swing.BorderFactory.createTitledBorder( null, resourceMap.getString("channelDescriptionTextField.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, resourceMap.getFont("channelDescriptionTextField.border.titleFont"))); // NOI18N channelPanel.setMinimumSize(new java.awt.Dimension(80, 100)); channelPanel.setName("channelDescriptionTextField"); // NOI18N channelTitleLabel.setFont(resourceMap.getFont("channelNameLabel.font")); // NOI18N channelTitleLabel.setText(resourceMap.getString("channelNameLabel.text")); // NOI18N channelTitleLabel.setToolTipText( resourceMap.getString("channelNameLabel.toolTipText")); // NOI18N channelTitleLabel.setName("channelNameLabel"); // NOI18N channelTitleTextField.setFont(resourceMap.getFont("channelTitleTextField.font")); // NOI18N channelTitleTextField.setForeground( resourceMap.getColor("channelTitleTextField.foreground")); // NOI18N channelTitleTextField.setText(resourceMap.getString("channelTitleTextField.text")); // NOI18N channelTitleTextField.setToolTipText( resourceMap.getString("channelTitleTextField.toolTipText")); // NOI18N channelTitleTextField.setName("channelTitleTextField"); // NOI18N channelLinkLabel.setFont(resourceMap.getFont("channelLinkLabel.font")); // NOI18N channelLinkLabel.setText(resourceMap.getString("channelLinkLabel.text")); // NOI18N channelLinkLabel.setToolTipText( resourceMap.getString("channelLinkLabel.toolTipText")); // NOI18N channelLinkLabel.setName("channelLinkLabel"); // NOI18N channelLinkTextField.setFont(resourceMap.getFont("channelLinkTextField.font")); // NOI18N channelLinkTextField.setForeground( resourceMap.getColor("channelLinkTextField.foreground")); // NOI18N channelLinkTextField.setText(resourceMap.getString("channelLinkTextField.text")); // NOI18N channelLinkTextField.setToolTipText( resourceMap.getString("channelLinkTextField.toolTipText")); // NOI18N channelLinkTextField.setName("channelLinkTextField"); // NOI18N channelDescriptionLabel.setFont(resourceMap.getFont("channelDescriptionLabel.font")); // NOI18N channelDescriptionLabel.setLabelFor(channelDescriptionTextArea); channelDescriptionLabel.setText( resourceMap.getString("channelDescriptionLabel.text")); // NOI18N channelDescriptionLabel.setToolTipText( resourceMap.getString("channelDescriptionLabel.toolTipText")); // NOI18N channelDescriptionLabel.setName("channelDescriptionLabel"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N channelDescriptionTextArea.setColumns(20); channelDescriptionTextArea.setForeground( resourceMap.getColor("channelDescriptionTextArea.foreground")); // NOI18N channelDescriptionTextArea.setRows(5); channelDescriptionTextArea.setText( resourceMap.getString("channelDescriptionTextArea.text")); // NOI18N channelDescriptionTextArea.setName("channelDescriptionTextArea"); // NOI18N jScrollPane1.setViewportView(channelDescriptionTextArea); javax.swing.GroupLayout channelPanelLayout = new javax.swing.GroupLayout(channelPanel); channelPanel.setLayout(channelPanelLayout); channelPanelLayout.setHorizontalGroup( channelPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( channelPanelLayout .createSequentialGroup() .addGroup( channelPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( channelPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(channelDescriptionLabel)) .addGroup( channelPanelLayout .createSequentialGroup() .addGap(39, 39, 39) .addGroup( channelPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(channelLinkLabel) .addComponent(channelTitleLabel)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( channelPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE) .addComponent( channelTitleTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE) .addComponent( channelLinkTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE)) .addGap(29, 29, 29))); channelPanelLayout.setVerticalGroup( channelPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( channelPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( channelPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(channelTitleLabel) .addComponent( channelTitleTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(14, 14, 14) .addGroup( channelPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(channelLinkLabel) .addComponent( channelLinkTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( channelPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(channelDescriptionLabel) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); itemPanel.setBackground(resourceMap.getColor("itemPanel.background")); // NOI18N itemPanel.setBorder( javax.swing.BorderFactory.createTitledBorder( null, resourceMap.getString("itemPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.TOP, resourceMap.getFont("itemPanel.border.titleFont"), resourceMap.getColor("itemPanel.border.titleColor"))); // NOI18N itemPanel.setToolTipText(resourceMap.getString("itemPanel.toolTipText")); // NOI18N itemPanel.setName("itemPanel"); // NOI18N createItemButton.setText(resourceMap.getString("createItemButton.text")); // NOI18N createItemButton.setName("createItemButton"); // NOI18N createItemButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { createMessage(evt); } }); itemTitleLabel.setFont(resourceMap.getFont("itemTitleLabel.font")); // NOI18N itemTitleLabel.setText(resourceMap.getString("itemTitleLabel.text")); // NOI18N itemTitleLabel.setName("itemTitleLabel"); // NOI18N itemTitleTextField.setForeground( resourceMap.getColor("itemTitleTextField.foreground")); // NOI18N itemTitleTextField.setText(resourceMap.getString("itemTitleTextField.text")); // NOI18N itemTitleTextField.setToolTipText( resourceMap.getString("itemTitleTextField.toolTipText")); // NOI18N itemTitleTextField.setName("itemTitleTextField"); // NOI18N itemDescriptionLabel.setFont(resourceMap.getFont("itemDescriptionLabel.font")); // NOI18N itemDescriptionLabel.setText(resourceMap.getString("itemDescriptionLabel.text")); // NOI18N itemDescriptionLabel.setToolTipText( resourceMap.getString("itemDescriptionLabel.toolTipText")); // NOI18N itemDescriptionLabel.setName("itemDescriptionLabel"); // NOI18N jScrollPane2.setName("jScrollPane2"); // NOI18N itemDescriptionTextArea.setColumns(20); itemDescriptionTextArea.setForeground( resourceMap.getColor("itemDescriptionTextArea.foreground")); // NOI18N itemDescriptionTextArea.setRows(5); itemDescriptionTextArea.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1)); itemDescriptionTextArea.setName("itemDescriptionTextArea"); // NOI18N jScrollPane2.setViewportView(itemDescriptionTextArea); itemListScrollPane.setBorder(null); itemListScrollPane.setName("itemListScrollPane"); // NOI18N itemList.setBackground(resourceMap.getColor("itemList.background")); // NOI18N itemList.setBorder( javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("itemList.border.title"))); // NOI18N itemList.setFont(resourceMap.getFont("itemList.font")); // NOI18N itemList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); itemList.setToolTipText(resourceMap.getString("itemList.toolTipText")); // NOI18N itemList.setName("itemList"); // NOI18N itemList.setValueIsAdjusting(true); itemList.setVisibleRowCount(4); itemList.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { itemSelected(evt); } }); itemListScrollPane.setViewportView(itemList); deleteItemButton.setText(resourceMap.getString("deleteItemButton.text")); // NOI18N deleteItemButton.setEnabled(false); deleteItemButton.setName("deleteItemButton"); // NOI18N deleteItemButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteItem(evt); } }); javax.swing.GroupLayout itemPanelLayout = new javax.swing.GroupLayout(itemPanel); itemPanel.setLayout(itemPanelLayout); itemPanelLayout.setHorizontalGroup( itemPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( itemPanelLayout .createSequentialGroup() .addGap(12, 12, 12) .addGroup( itemPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(createItemButton) .addGroup( itemPanelLayout .createSequentialGroup() .addGroup( itemPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(itemDescriptionLabel) .addGroup( itemPanelLayout .createSequentialGroup() .addGap(56, 56, 56) .addComponent(itemTitleLabel))) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( itemPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( itemTitleTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE) .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(45, 45, 45) .addGroup( itemPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(deleteItemButton) .addComponent( itemListScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 313, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); itemPanelLayout.setVerticalGroup( itemPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( itemPanelLayout .createSequentialGroup() .addGap(13, 13, 13) .addGroup( itemPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( itemPanelLayout .createSequentialGroup() .addGroup( itemPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(itemTitleLabel) .addComponent( itemTitleTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( itemPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(itemDescriptionLabel) .addComponent( jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent( itemListScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( itemPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(createItemButton) .addComponent(deleteItemButton)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); generateFeedButton.setFont(resourceMap.getFont("generateFeedButton.font")); // NOI18N generateFeedButton.setText(resourceMap.getString("generateFeedButton.text")); // NOI18N generateFeedButton.setToolTipText( resourceMap.getString("generateFeedButton.toolTipText")); // NOI18N generateFeedButton.setName("generateFeedButton"); // NOI18N generateFeedButton.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { generateFeed(evt); } }); arduinoPanel.setBackground(resourceMap.getColor("arduinoPanel.background")); // NOI18N arduinoPanel.setBorder( javax.swing.BorderFactory.createTitledBorder( null, resourceMap.getString("arduinoPanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("arduinoPanel.border.titleFont"))); // NOI18N arduinoPanel.setName("arduinoPanel"); // NOI18N arduinoAddressLabel.setFont(resourceMap.getFont("arduinoAddressLabel.font")); // NOI18N arduinoAddressLabel.setText(resourceMap.getString("arduinoAddressLabel.text")); // NOI18N arduinoAddressLabel.setName("arduinoAddressLabel"); // NOI18N arduinoAddressTextField.setFont(resourceMap.getFont("arduinoAddressTextField.font")); // NOI18N arduinoAddressTextField.setForeground( resourceMap.getColor("arduinoAddressTextField.foreground")); // NOI18N arduinoAddressTextField.setText( resourceMap.getString("arduinoAddressTextField.text")); // NOI18N arduinoAddressTextField.setToolTipText( resourceMap.getString("arduinoAddressTextField.toolTipText")); // NOI18N arduinoAddressTextField.setName("arduinoAddressTextField"); // NOI18N arduinoPortLabel.setFont(resourceMap.getFont("arduinoPortLabel.font")); // NOI18N arduinoPortLabel.setText(resourceMap.getString("arduinoPortLabel.text")); // NOI18N arduinoPortLabel.setName("arduinoPortLabel"); // NOI18N arduinoPortTextField.setFont(resourceMap.getFont("arduinoPortTextField.font")); // NOI18N arduinoPortTextField.setForeground( resourceMap.getColor("arduinoPortTextField.foreground")); // NOI18N arduinoPortTextField.setText(resourceMap.getString("arduinoPortTextField.text")); // NOI18N arduinoPortTextField.setToolTipText( resourceMap.getString("arduinoPortTextField.toolTipText")); // NOI18N arduinoPortTextField.setName("arduinoPortTextField"); // NOI18N javax.swing.GroupLayout arduinoPanelLayout = new javax.swing.GroupLayout(arduinoPanel); arduinoPanel.setLayout(arduinoPanelLayout); arduinoPanelLayout.setHorizontalGroup( arduinoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( arduinoPanelLayout .createSequentialGroup() .addGap(48, 48, 48) .addGroup( arduinoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(arduinoPortLabel) .addComponent(arduinoAddressLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( arduinoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( arduinoPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( arduinoAddressTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 237, Short.MAX_VALUE)) .addContainerGap(96, Short.MAX_VALUE))); arduinoPanelLayout.setVerticalGroup( arduinoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, arduinoPanelLayout .createSequentialGroup() .addContainerGap(25, Short.MAX_VALUE) .addGroup( arduinoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(arduinoAddressLabel) .addComponent( arduinoAddressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( arduinoPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(arduinoPortLabel) .addComponent( arduinoPortTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(21, 21, 21))); fileNameTextField.setText(resourceMap.getString("fileNameTextField.text")); // NOI18N fileNameTextField.setName("fileNameTextField"); // NOI18N fileNameLabel.setFont(resourceMap.getFont("fileNameLabel.font")); // NOI18N fileNameLabel.setText(resourceMap.getString("fileNameLabel.text")); // NOI18N fileNameLabel.setToolTipText(resourceMap.getString("fileNameLabel.toolTipText")); // NOI18N fileNameLabel.setName("fileNameLabel"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( itemPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( mainPanelLayout .createSequentialGroup() .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( channelPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( javax.swing.GroupLayout.Alignment.LEADING, mainPanelLayout .createSequentialGroup() .addComponent(fileNameLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement .RELATED) .addComponent( fileNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( arduinoPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 221, Short.MAX_VALUE) .addComponent(generateFeedButton) .addGap(18, 18, 18))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(fileNameLabel) .addComponent( fileNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(generateFeedButton)) .addGap(18, 18, 18) .addComponent( arduinoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent( channelPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( itemPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(rssbuilder.RssBuilderApp.class) .getContext() .getActionMap(RssBuilderView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); setComponent(mainPanel); setMenuBar(menuBar); } // </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() { mainPanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); playBtn = new javax.swing.JButton(); settingsBtn = new javax.swing.JButton(); highScoresBtn = new javax.swing.JButton(); exitBtn = new javax.swing.JButton(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = 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 org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance( edu.luc.tictactoe.gui.controller.TicTacToeUIApp.class) .getContext() .getResourceMap(TicTacToeUIView.class); jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N playBtn.setText(resourceMap.getString("playBtn.text")); // NOI18N playBtn.setName("playBtn"); // NOI18N playBtn.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { playBtnMouseReleased(evt); } }); settingsBtn.setText(resourceMap.getString("settingsBtn.text")); // NOI18N settingsBtn.setName("settingsBtn"); // NOI18N settingsBtn.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { settingsBtnMouseReleased(evt); } }); highScoresBtn.setText(resourceMap.getString("highScoresBtn.text")); // NOI18N highScoresBtn.setName("highScoresBtn"); // NOI18N highScoresBtn.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { highScoresBtnMouseReleased(evt); } }); exitBtn.setText(resourceMap.getString("exitBtn.text")); // NOI18N exitBtn.setName("exitBtn"); // NOI18N exitBtn.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { exitBtnMouseReleased(evt); } }); javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGap(133, 133, 133) .addComponent(jLabel1)) .addGroup( mainPanelLayout .createSequentialGroup() .addGap(111, 111, 111) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent( settingsBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( highScoresBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( exitBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( playBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jLabel2)))) .addContainerGap(118, Short.MAX_VALUE))); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGap(60, 60, 60) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 225, Short.MAX_VALUE) .addComponent(playBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(settingsBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(highScoresBtn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(exitBtn) .addContainerGap())); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance( edu.luc.tictactoe.gui.controller.TicTacToeUIApp.class) .getContext() .getActionMap(TicTacToeUIView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // 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, 320, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 150, 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); settingsBtn.setVisible(false); } // </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() { mainPanel = new JPanel(); panelSimulación1 = new Simulación.PanelSimulación(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); openMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem exitMenuItem = 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(); uxPausa = new javax.swing.JToggleButton(); uxMensajes = new javax.swing.JLabel(); mainPanel.setFocusTraversalPolicyProvider(true); mainPanel.setMinimumSize(new java.awt.Dimension(500, 500)); mainPanel.setName("mainPanel"); // NOI18N mainPanel.setPreferredSize(new java.awt.Dimension(500, 500)); mainPanel.setLayout(new java.awt.BorderLayout()); panelSimulación1.setMinimumSize(new java.awt.Dimension(100, 100)); panelSimulación1.setName("panelSimulación1"); // NOI18N panelSimulación1.setPreferredSize(new java.awt.Dimension(500, 500)); panelSimulación1.setLayout(null); mainPanel.add(panelSimulación1, java.awt.BorderLayout.CENTER); menuBar.setName("menuBar"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(Simevac.SimEvacApp.class) .getContext() .getResourceMap(SimEvacView.class); fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N openMenuItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK)); openMenuItem.setText(resourceMap.getString("openMenuItem.text")); // NOI18N openMenuItem.setName("openMenuItem"); // NOI18N openMenuItem.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { openMenuItemActionPerformed(evt); } }); fileMenu.add(openMenuItem); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(Simevac.SimEvacApp.class) .getContext() .getActionMap(SimEvacView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N exitMenuItem.setToolTipText(resourceMap.getString("exitMenuItem.toolTipText")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // 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 uxPausa.setSelected(true); uxPausa.setActionCommand(resourceMap.getString("uxPausa.actionCommand")); // NOI18N uxPausa.setLabel(resourceMap.getString("uxPausa.label")); // NOI18N uxPausa.setName("uxPausa"); // NOI18N uxPausa.addItemListener( new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { uxPausaItemStateChanged(evt); } }); uxMensajes.setText(resourceMap.getString("uxMensajes.text")); // NOI18N uxMensajes.setName("uxMensajes"); // 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, 604, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 418, 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()) .addGroup( statusPanelLayout .createSequentialGroup() .addComponent(uxPausa) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(uxMensajes) .addGap(294, 294, 294))); 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, 12, 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)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( statusPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(uxPausa) .addComponent(uxMensajes)))); 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() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); mainPanel = new javax.swing.JPanel(); masterScrollPane = new javax.swing.JScrollPane(); masterTable = new javax.swing.JTable(); idLabel = new javax.swing.JLabel(); imeLabel = new javax.swing.JLabel(); prezimeLabel = new javax.swing.JLabel(); adresaLabel = new javax.swing.JLabel(); brojlicneLabel = new javax.swing.JLabel(); sifraotiskaLabel = new javax.swing.JLabel(); idField = new javax.swing.JTextField(); imeField = new javax.swing.JTextField(); prezimeField = new javax.swing.JTextField(); adresaField = new javax.swing.JTextField(); brojlicneField = new javax.swing.JTextField(); sifraotiskaField = new javax.swing.JTextField(); saveButton = new javax.swing.JButton(); refreshButton = new javax.swing.JButton(); newButton = new javax.swing.JButton(); deleteButton = new javax.swing.JButton(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem newRecordMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem deleteRecordMenuItem = new javax.swing.JMenuItem(); jSeparator1 = new javax.swing.JSeparator(); javax.swing.JMenuItem saveMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem refreshMenuItem = new javax.swing.JMenuItem(); jSeparator2 = new javax.swing.JSeparator(); javax.swing.JMenuItem exitMenuItem = 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(); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance( fingerprintapplication.FingerprintApplication.class) .getContext() .getResourceMap(FingerprintView.class); entityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory( resourceMap.getString("entityManager.persistenceUnit")) .createEntityManager(); // NOI18N query = java.beans.Beans.isDesignTime() ? null : entityManager.createQuery(resourceMap.getString("query.query")); // NOI18N list = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList( query.getResultList()); mainPanel.setName("mainPanel"); // NOI18N masterScrollPane.setName("masterScrollPane"); // NOI18N masterTable.setName("masterTable"); // NOI18N org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, list, masterTable); org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${id}")); columnBinding.setColumnName("Id"); columnBinding.setColumnClass(Integer.class); columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${ime}")); columnBinding.setColumnName("Ime"); columnBinding.setColumnClass(String.class); columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${prezime}")); columnBinding.setColumnName("Prezime"); columnBinding.setColumnClass(String.class); columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${adresa}")); columnBinding.setColumnName("Adresa"); columnBinding.setColumnClass(String.class); columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${brojlicne}")); columnBinding.setColumnName("Brojlicne"); columnBinding.setColumnClass(String.class); columnBinding = jTableBinding.addColumnBinding( org.jdesktop.beansbinding.ELProperty.create("${sifraotiska}")); columnBinding.setColumnName("Sifraotiska"); columnBinding.setColumnClass(String.class); bindingGroup.addBinding(jTableBinding); masterScrollPane.setViewportView(masterTable); idLabel.setText(resourceMap.getString("idLabel.text")); // NOI18N idLabel.setName("idLabel"); // NOI18N imeLabel.setText(resourceMap.getString("imeLabel.text")); // NOI18N imeLabel.setName("imeLabel"); // NOI18N prezimeLabel.setText(resourceMap.getString("prezimeLabel.text")); // NOI18N prezimeLabel.setName("prezimeLabel"); // NOI18N adresaLabel.setText(resourceMap.getString("adresaLabel.text")); // NOI18N adresaLabel.setName("adresaLabel"); // NOI18N brojlicneLabel.setText(resourceMap.getString("brojlicneLabel.text")); // NOI18N brojlicneLabel.setName("brojlicneLabel"); // NOI18N sifraotiskaLabel.setText(resourceMap.getString("sifraotiskaLabel.text")); // NOI18N sifraotiskaLabel.setName("sifraotiskaLabel"); // NOI18N idField.setName("idField"); // NOI18N org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.id}"), idField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue(null); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), idField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); imeField.setName("imeField"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.ime}"), imeField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue(null); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), imeField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); prezimeField.setName("prezimeField"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.prezime}"), prezimeField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue(null); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), prezimeField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); adresaField.setName("adresaField"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.adresa}"), adresaField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue(null); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), adresaField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); brojlicneField.setName("brojlicneField"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.brojlicne}"), brojlicneField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue(null); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), brojlicneField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); sifraotiskaField.setName("sifraotiskaField"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.sifraotiska}"), sifraotiskaField, org.jdesktop.beansbinding.BeanProperty.create("text")); binding.setSourceUnreadableValue(null); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, masterTable, org.jdesktop.beansbinding.ELProperty.create("${selectedElement != null}"), sifraotiskaField, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance( fingerprintapplication.FingerprintApplication.class) .getContext() .getActionMap(FingerprintView.class, this); saveButton.setAction(actionMap.get("save")); // NOI18N saveButton.setText(resourceMap.getString("saveButton.text")); // NOI18N saveButton.setName("saveButton"); // NOI18N refreshButton.setAction(actionMap.get("refresh")); // NOI18N refreshButton.setText(resourceMap.getString("refreshButton.text")); // NOI18N refreshButton.setName("refreshButton"); // NOI18N newButton.setAction(actionMap.get("newRecord")); // NOI18N newButton.setText(resourceMap.getString("newButton.text")); // NOI18N newButton.setName("newButton"); // NOI18N deleteButton.setAction(actionMap.get("deleteRecord")); // NOI18N deleteButton.setText(resourceMap.getString("deleteButton.text")); // NOI18N deleteButton.setName("deleteButton"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout .createSequentialGroup() .addComponent(newButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(deleteButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(refreshButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(saveButton)) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(idLabel) .addComponent(imeLabel) .addComponent(prezimeLabel) .addComponent(adresaLabel) .addComponent(brojlicneLabel) .addComponent(sifraotiskaLabel)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( idField, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE) .addComponent( imeField, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE) .addComponent( prezimeField, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE) .addComponent( adresaField, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE) .addComponent( brojlicneField, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE) .addComponent( sifraotiskaField, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE))) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addComponent( masterScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 427, Short.MAX_VALUE))) .addContainerGap())); mainPanelLayout.linkSize( javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {deleteButton, newButton, refreshButton, saveButton}); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addComponent( masterScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(idLabel) .addComponent( idField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(imeLabel) .addComponent( imeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(prezimeLabel) .addComponent( prezimeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(adresaLabel) .addComponent( adresaField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(brojlicneLabel) .addComponent( brojlicneField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sifraotiskaLabel) .addComponent( sifraotiskaField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(saveButton) .addComponent(refreshButton) .addComponent(deleteButton) .addComponent(newButton)) .addContainerGap())); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N newRecordMenuItem.setAction(actionMap.get("newRecord")); // NOI18N newRecordMenuItem.setText(resourceMap.getString("newRecordMenuItem.text")); // NOI18N newRecordMenuItem.setName("newRecordMenuItem"); // NOI18N fileMenu.add(newRecordMenuItem); deleteRecordMenuItem.setAction(actionMap.get("deleteRecord")); // NOI18N deleteRecordMenuItem.setText(resourceMap.getString("deleteRecordMenuItem.text")); // NOI18N deleteRecordMenuItem.setName("deleteRecordMenuItem"); // NOI18N fileMenu.add(deleteRecordMenuItem); jSeparator1.setName("jSeparator1"); // NOI18N fileMenu.add(jSeparator1); saveMenuItem.setAction(actionMap.get("save")); // NOI18N saveMenuItem.setText(resourceMap.getString("saveMenuItem.text")); // NOI18N saveMenuItem.setName("saveMenuItem"); // NOI18N fileMenu.add(saveMenuItem); refreshMenuItem.setAction(actionMap.get("refresh")); // NOI18N refreshMenuItem.setText(resourceMap.getString("refreshMenuItem.text")); // NOI18N refreshMenuItem.setName("refreshMenuItem"); // NOI18N fileMenu.add(refreshMenuItem); jSeparator2.setName("jSeparator2"); // NOI18N fileMenu.add(jSeparator2); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); 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, 447, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 277, 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); bindingGroup.bind(); } // </editor-fold>//GEN-END:initComponents
private JMenu menu(JMenuItem menuItem) { JMenu menu = new JMenu("Menu"); menu.setName("menu"); menu.add(menuItem); return menu; }
/** * 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(); jPanel1 = new javax.swing.JPanel(); jlMensajeCliente = new javax.swing.JLabel(); jspMensajeCliente = new javax.swing.JScrollPane(); jtfMensajeCliente = new javax.swing.JTextArea(); jlMensajesClientes = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jtaMensajesCliente = new javax.swing.JTextArea(); jtfIPServidor = new javax.swing.JTextField(); jpIP = new javax.swing.JLabel(); jlTunnel = new javax.swing.JLabel(); jtfTunnel = new javax.swing.JTextField(); jPanel2 = new javax.swing.JPanel(); jbLimpiar = new javax.swing.JButton(); jbDesconectar = new javax.swing.JButton(); jbEnviar = new javax.swing.JButton(); jlPalabras = new javax.swing.JLabel(); jlLineas = new javax.swing.JLabel(); jlCantPalabras = new javax.swing.JLabel(); jlCantLineas = new javax.swing.JLabel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); 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(skcliente.SkClienteApp.class) .getContext() .getResourceMap(SkClienteView.class); jPanel1.setBackground(resourceMap.getColor("jPanel1.background")); // NOI18N jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanel1.setName("jPanel1"); // NOI18N jlMensajeCliente.setText(resourceMap.getString("jlMensajeCliente.text")); // NOI18N jlMensajeCliente.setName("jlMensajeCliente"); // NOI18N jspMensajeCliente.setName("jspMensajeCliente"); // NOI18N jtfMensajeCliente.setColumns(20); jtfMensajeCliente.setRows(5); jtfMensajeCliente.setName("jtfMensajeCliente"); // NOI18N jspMensajeCliente.setViewportView(jtfMensajeCliente); 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( jspMensajeCliente, javax.swing.GroupLayout.DEFAULT_SIZE, 475, Short.MAX_VALUE) .addComponent(jlMensajeCliente)) .addContainerGap())); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addGap(11, 11, 11) .addComponent(jlMensajeCliente) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jspMensajeCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jlMensajesClientes.setText(resourceMap.getString("jlMensajesClientes.text")); // NOI18N jlMensajesClientes.setName("jlMensajesClientes"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N jtaMensajesCliente.setColumns(20); jtaMensajesCliente.setLineWrap(true); jtaMensajesCliente.setRows(5); jtaMensajesCliente.setWrapStyleWord(true); jtaMensajesCliente.setFocusable(false); jtaMensajesCliente.setName("jtaMensajesCliente"); // NOI18N jScrollPane1.setViewportView(jtaMensajesCliente); jtfIPServidor.setText(resourceMap.getString("jtfIPServidor.text")); // NOI18N jtfIPServidor.setName("jtfIPServidor"); // NOI18N jpIP.setText(resourceMap.getString("jpIP.text")); // NOI18N jpIP.setName("jpIP"); // NOI18N jlTunnel.setText(resourceMap.getString("jlTunnel.text")); // NOI18N jlTunnel.setName("jlTunnel"); // NOI18N jtfTunnel.setText(resourceMap.getString("jtfTunnel.text")); // NOI18N jtfTunnel.setName("jtfTunnel"); // NOI18N jPanel2.setName("jPanel2"); // NOI18N jbLimpiar.setIcon(resourceMap.getIcon("jbLimpiar.icon")); // NOI18N jbLimpiar.setText(resourceMap.getString("jbLimpiar.text")); // NOI18N jbLimpiar.setName("jbLimpiar"); // NOI18N jbLimpiar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbLimpiarActionPerformed(evt); } }); jbDesconectar.setIcon(resourceMap.getIcon("jbDesconectar.icon")); // NOI18N jbDesconectar.setText(resourceMap.getString("jbDesconectar.text")); // NOI18N jbDesconectar.setName("jbDesconectar"); // NOI18N jbDesconectar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbDesconectarActionPerformed(evt); } }); jbEnviar.setIcon(resourceMap.getIcon("jbEnviar.icon")); // NOI18N jbEnviar.setText(resourceMap.getString("jbEnviar.text")); // NOI18N jbEnviar.setEnabled(false); jbEnviar.setName("jbEnviar"); // NOI18N jbEnviar.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbEnviarActionPerformed(evt); } }); jlPalabras.setText(resourceMap.getString("jlPalabras.text")); // NOI18N jlPalabras.setToolTipText(resourceMap.getString("jlPalabras.toolTipText")); // NOI18N jlPalabras.setName("jlPalabras"); // NOI18N jlLineas.setText(resourceMap.getString("jlLineas.text")); // NOI18N jlLineas.setToolTipText(resourceMap.getString("jlLineas.toolTipText")); // NOI18N jlLineas.setName("jlLineas"); // NOI18N jlCantPalabras.setText(resourceMap.getString("jlCantPalabras.text")); // NOI18N jlCantPalabras.setName("jlCantPalabras"); // NOI18N jlCantLineas.setText(resourceMap.getString("jlCantLineas.text")); // NOI18N jlCantLineas.setName("jlCantLineas"); // 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() .addComponent( jbEnviar, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jbDesconectar, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jbLimpiar, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent( jlLineas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jlPalabras, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jlCantPalabras) .addComponent(jlCantLineas)) .addContainerGap(81, Short.MAX_VALUE))); jPanel2Layout.setVerticalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jbEnviar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jbDesconectar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jbLimpiar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup( jPanel2Layout .createSequentialGroup() .addGroup( jPanel2Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlPalabras) .addComponent(jlCantPalabras)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel2Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlLineas) .addComponent(jlCantLineas)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .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) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(jlMensajesClientes) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 88, Short.MAX_VALUE) .addComponent(jpIP) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jtfIPServidor, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(10, 10, 10) .addComponent(jlTunnel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jtfTunnel, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 479, Short.MAX_VALUE) .addContainerGap())); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlMensajesClientes) .addComponent(jlTunnel) .addComponent( jtfTunnel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jtfIPServidor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jpIP)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(skcliente.SkClienteApp.class) .getContext() .getActionMap(SkClienteView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); setComponent(mainPanel); setMenuBar(menuBar); } // </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() { mainPanel = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); PhilosophersNumberField = new javax.swing.JTextField(); StatesField = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); 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 javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance( diningphilosophers.DiningPhilosophersApp.class) .getContext() .getActionMap(DiningPhilosophersView.class, this); jButton1.setAction(actionMap.get("OnSimulateClick")); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance( diningphilosophers.DiningPhilosophersApp.class) .getContext() .getResourceMap(DiningPhilosophersView.class); jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N jButton1.setName("jButton1"); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N PhilosophersNumberField.setText( resourceMap.getString("PhilosophersNumberField.text")); // NOI18N PhilosophersNumberField.setAction(actionMap.get("OnSimulateClick")); // NOI18N PhilosophersNumberField.setName("PhilosophersNumberField"); // NOI18N StatesField.setText(resourceMap.getString("StatesField.text")); // NOI18N StatesField.setName("StatesField"); // NOI18N jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( StatesField, javax.swing.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent(jLabel1) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( PhilosophersNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 42, Short.MAX_VALUE) .addComponent(jButton1)) .addComponent(jLabel2)) .addContainerGap())); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent( PhilosophersNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( StatesField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setMnemonic('S'); exitMenuItem.setText(resourceMap.getString("exitMenuItem.text")); // NOI18N exitMenuItem.setToolTipText(resourceMap.getString("exitMenuItem.toolTipText")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setMnemonic('b'); aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); setComponent(mainPanel); setMenuBar(menuBar); } // </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() { mainPanel = new javax.swing.JPanel(); gamesPane = new jchess.display.windows.JChessTabbedPane(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); newGameItem = new javax.swing.JMenuItem(); // loadGameItem = new javax.swing.JMenuItem(); // saveGameItem = new javax.swing.JMenuItem(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); gameMenu = new javax.swing.JMenu(); moveBackItem = new javax.swing.JMenuItem(); moveForwardItem = new javax.swing.JMenuItem(); rewindToBegin = new javax.swing.JMenuItem(); rewindToEnd = new javax.swing.JMenuItem(); // optionsMenu = new javax.swing.JMenu(); // themeSettingsMenu = 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.setMaximumSize(new java.awt.Dimension(800, 600)); mainPanel.setMinimumSize(new java.awt.Dimension(800, 600)); mainPanel.setName("mainPanel"); // NOI18N mainPanel.setPreferredSize(new java.awt.Dimension(800, 600)); gamesPane.setName("gamesPane"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addComponent( gamesPane, javax.swing.GroupLayout.DEFAULT_SIZE, 776, Short.MAX_VALUE) .addContainerGap())); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addComponent( gamesPane, javax.swing.GroupLayout.DEFAULT_SIZE, 580, Short.MAX_VALUE))); menuBar.setName("menuBar"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(jchess.JChessApp.class) .getContext() .getResourceMap(JChessView.class); fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N newGameItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK)); newGameItem.setText(resourceMap.getString("newGameItem.text")); // NOI18N newGameItem.setName("newGameItem"); // NOI18N fileMenu.add(newGameItem); newGameItem.addActionListener(this); /* loadGameItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK)); loadGameItem.setText(resourceMap.getString("loadGameItem.text")); // NOI18N loadGameItem.setName("loadGameItem"); // NOI18N fileMenu.add(loadGameItem); loadGameItem.addActionListener(this); */ /* saveGameItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK)); saveGameItem.setText(resourceMap.getString("saveGameItem.text")); // NOI18N saveGameItem.setName("saveGameItem"); // NOI18N fileMenu.add(saveGameItem); saveGameItem.addActionListener(this); */ javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(jchess.JChessApp.class) .getContext() .getActionMap(JChessView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); gameMenu.setText(resourceMap.getString("gameMenu.text")); // NOI18N gameMenu.setName("gameMenu"); // NOI18N moveBackItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK)); moveBackItem.setText(resourceMap.getString("moveBackItem.text")); // NOI18N moveBackItem.setName("moveBackItem"); // NOI18N moveBackItem.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { moveBackItemMouseClicked(evt); } }); moveBackItem.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { moveBackItemActionPerformed(evt); } }); gameMenu.add(moveBackItem); moveForwardItem.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.CTRL_MASK)); moveForwardItem.setText(resourceMap.getString("moveForwardItem.text")); // NOI18N moveForwardItem.setName("moveForwardItem"); // NOI18N moveForwardItem.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { moveForwardItemMouseClicked(evt); } }); moveForwardItem.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { moveForwardItemActionPerformed(evt); } }); gameMenu.add(moveForwardItem); rewindToBegin.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); rewindToBegin.setText(resourceMap.getString("rewindToBegin.text")); // NOI18N rewindToBegin.setName("rewindToBegin"); // NOI18N rewindToBegin.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rewindToBeginActionPerformed(evt); } }); gameMenu.add(rewindToBegin); rewindToEnd.setAccelerator( javax.swing.KeyStroke.getKeyStroke( java.awt.event.KeyEvent.VK_Y, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); rewindToEnd.setText(resourceMap.getString("rewindToEnd.text")); // NOI18N rewindToEnd.setName("rewindToEnd"); // NOI18N rewindToEnd.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rewindToEndActionPerformed(evt); } }); gameMenu.add(rewindToEnd); menuBar.add(gameMenu); /* optionsMenu.setText(resourceMap.getString("optionsMenu.text")); // NOI18N optionsMenu.setName("optionsMenu"); // NOI18N themeSettingsMenu.setText(resourceMap.getString("themeSettingsMenu.text")); // NOI18N themeSettingsMenu.setName("themeSettingsMenu"); // NOI18N optionsMenu.add(themeSettingsMenu); themeSettingsMenu.addActionListener(this); menuBar.add(optionsMenu);*/ /* helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // 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, 800, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 616, 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() { mainPanel = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); btnGo = new javax.swing.JButton(); txtTenCaSi = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); btnDownload = new javax.swing.JButton(); jScrollPane3 = new javax.swing.JScrollPane(); tableDanhSachBaiHat = new javax.swing.JTable(); jPanel3 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); txtTenBaiHat = new javax.swing.JTextField(); jTextField3 = new javax.swing.JTextField(); jTextField4 = new javax.swing.JTextField(); jTextField5 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); txtLinkDownload = new javax.swing.JTextArea(); btnXemLinkDownload = new javax.swing.JButton(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = 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 org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance( zingmp3downloader.ZingMp3DownloaderApp.class) .getContext() .getResourceMap(ZingMp3DownloaderView.class); jPanel1.setBorder( javax.swing.BorderFactory.createTitledBorder( resourceMap.getString("jPanel1.border.title"))); // NOI18N jPanel1.setName("jPanel1"); // NOI18N btnGo.setText(resourceMap.getString("btnGo.text")); // NOI18N btnGo.setName("btnGo"); // NOI18N btnGo.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnGoActionPerformed(evt); } }); txtTenCaSi.setText(resourceMap.getString("txtTenCaSi.text")); // NOI18N txtTenCaSi.setName("txtTenCaSi"); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jLabel8.setForeground(resourceMap.getColor("jLabel8.foreground")); // NOI18N jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N jLabel8.setName("jLabel8"); // 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(jLabel1) .addGap(114, 114, 114) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel8) .addGroup( jPanel1Layout .createSequentialGroup() .addComponent( txtTenCaSi, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(107, 107, 107) .addComponent( btnGo, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(406, 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(jLabel1) .addComponent( txtTenCaSi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnGo)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel8) .addContainerGap(20, Short.MAX_VALUE))); jPanel2.setBorder( javax.swing.BorderFactory.createTitledBorder( resourceMap.getString("jPanel2.border.title"))); // NOI18N jPanel2.setName("jPanel2"); // NOI18N btnDownload.setText(resourceMap.getString("btnDownload.text")); // NOI18N btnDownload.setName("btnDownload"); // NOI18N btnDownload.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDownloadActionPerformed(evt); } }); jScrollPane3.setName("jScrollPane3"); // NOI18N tableDanhSachBaiHat.setFont(resourceMap.getFont("tableDanhSachBaiHat.font")); // NOI18N tableDanhSachBaiHat.setModel( new javax.swing.table.DefaultTableModel( new Object[][] {{null, null}}, new String[] {"STT", "Tên bài hát"})); tableDanhSachBaiHat.setName("tableDanhSachBaiHat"); // NOI18N tableDanhSachBaiHat.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tableDanhSachBaiHatMouseClicked(evt); } }); jScrollPane3.setViewportView(tableDanhSachBaiHat); jPanel3.setBorder( javax.swing.BorderFactory.createTitledBorder( resourceMap.getString("jPanel3.border.title"))); // NOI18N jPanel3.setName("jPanel3"); // NOI18N jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N jLabel4.setName("jLabel4"); // NOI18N jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N jLabel5.setName("jLabel5"); // NOI18N jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N jLabel6.setName("jLabel6"); // NOI18N jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N jTextField1.setName("jTextField1"); // NOI18N txtTenBaiHat.setText(resourceMap.getString("txtTenBaiHat.text")); // NOI18N txtTenBaiHat.setName("txtTenBaiHat"); // NOI18N jTextField3.setText(resourceMap.getString("jTextField3.text")); // NOI18N jTextField3.setName("jTextField3"); // NOI18N jTextField4.setText(resourceMap.getString("jTextField4.text")); // NOI18N jTextField4.setName("jTextField4"); // NOI18N jTextField5.setText(resourceMap.getString("jTextField5.text")); // NOI18N jTextField5.setName("jTextField5"); // NOI18N jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N jButton1.setName("jButton1"); // NOI18N jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N jButton2.setName("jButton2"); // NOI18N jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N jLabel7.setName("jLabel7"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N txtLinkDownload.setColumns(20); txtLinkDownload.setRows(5); txtLinkDownload.setName("txtLinkDownload"); // NOI18N jScrollPane1.setViewportView(txtLinkDownload); 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(33, 33, 33) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel3) .addComponent(jLabel2) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addGroup( jPanel3Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel4) .addGroup( jPanel3Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7) .addComponent(jLabel6))))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel3Layout .createSequentialGroup() .addGroup( jPanel3Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE) .addComponent( jTextField5, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout .createSequentialGroup() .addComponent( jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent( jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( txtTenBaiHat, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE) .addComponent( jTextField3, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE) .addComponent( jTextField1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)) .addGap(113, 113, 113)) .addGroup( jPanel3Layout .createSequentialGroup() .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())))); jPanel3Layout.setVerticalGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel3Layout .createSequentialGroup() .addContainerGap() .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2) .addComponent( txtTenBaiHat, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel3Layout .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)) .addGap(28, 28, 28) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4) .addComponent( jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5)) .addGap(18, 18, 18) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6) .addComponent( jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( jPanel3Layout .createSequentialGroup() .addComponent(jLabel7) .addGap(65, 65, 65)) .addGroup( jPanel3Layout .createSequentialGroup() .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18))) .addGroup( jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addContainerGap(42, Short.MAX_VALUE))); btnXemLinkDownload.setText(resourceMap.getString("btnXemLinkDownload.text")); // NOI18N btnXemLinkDownload.setName("btnXemLinkDownload"); // NOI18N btnXemLinkDownload.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnXemLinkDownloadActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 452, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup( jPanel2Layout .createSequentialGroup() .addGap(37, 37, 37) .addComponent(btnDownload) .addGap(64, 64, 64) .addComponent(btnXemLinkDownload))) .addGap(42, 42, 42) .addComponent( jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); jPanel2Layout.setVerticalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addComponent( jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 402, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel2Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnDownload) .addComponent(btnXemLinkDownload))) .addComponent( jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(119, 119, 119))))); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGap(26, 26, 26) .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent( jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance( zingmp3downloader.ZingMp3DownloaderApp.class) .getContext() .getActionMap(ZingMp3DownloaderView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // 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, 1177, Short.MAX_VALUE) .addGroup( statusPanelLayout .createSequentialGroup() .addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 991, 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() { mainPanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jList1 = new javax.swing.JList(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jTextField2 = new javax.swing.JTextField(); jTextField3 = new javax.swing.JTextField(); jTextField4 = new javax.swing.JTextField(); jSeparator1 = new javax.swing.JSeparator(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jScrollBar1 = new javax.swing.JScrollBar(); jLabel2 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox(); jComboBox2 = new javax.swing.JComboBox(); jTextField1 = new javax.swing.JTextField(); jTextField5 = new javax.swing.JTextField(); jTextField6 = new javax.swing.JTextField(); jComboBox3 = new javax.swing.JComboBox(); jTextField7 = new javax.swing.JTextField(); jComboBox4 = new javax.swing.JComboBox(); jPanel2 = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); jScrollBar2 = new javax.swing.JScrollBar(); jLabel7 = new javax.swing.JLabel(); jTextField8 = new javax.swing.JTextField(); jTextField9 = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); jMenu1 = new javax.swing.JMenu(); jMenu3 = new javax.swing.JMenu(); jMenu4 = new javax.swing.JMenu(); jMenu5 = new javax.swing.JMenu(); mainPanel.setName("mainPanel"); // NOI18N org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(edu.calpoly.testtool.TestToolApp.class) .getContext() .getResourceMap(TestGeneratorView2.class); jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N jList1.setModel( new javax.swing.AbstractListModel() { String[] strings = {"MAX LAZY", "LESS LAZY", "MANUAL"}; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); jList1.setName("jList1"); // NOI18N jScrollPane1.setViewportView(jList1); jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N jLabel4.setName("jLabel4"); // NOI18N jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N jLabel5.setName("jLabel5"); // NOI18N jTextField2.setName("jTextField2"); // NOI18N jTextField3.setName("jTextField3"); // NOI18N jTextField4.setName("jTextField4"); // NOI18N jSeparator1.setName("jSeparator1"); // NOI18N jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N jButton1.setName("jButton1"); // NOI18N jButton1.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jButton1MouseClicked(evt); } }); jButton1.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N jButton2.setName("jButton2"); // NOI18N jButton2.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jButton2MouseClicked(evt); } }); jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N jButton3.setName("jButton3"); // NOI18N jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanel1.setName("jPanel1"); // NOI18N jScrollBar1.setName("jScrollBar1"); // NOI18N jLabel2.setName("jLabel2"); // NOI18N jLabel6.setName("jLabel6"); // NOI18N jComboBox1.setModel( new javax.swing.DefaultComboBoxModel(new String[] {"1", "2", "3", "4", "5"})); jComboBox1.setName("jComboBox1"); // NOI18N jComboBox1.addMouseListener( new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jComboBox1MouseClicked(evt); } }); jComboBox2.setModel( new javax.swing.DefaultComboBoxModel(new String[] {"1", "2", "3", "4", "5"})); jComboBox2.setName("jComboBox2"); // NOI18N jTextField1.setName("jTextField1"); // NOI18N jTextField5.setName("jTextField5"); // NOI18N jTextField6.setName("jTextField6"); // NOI18N jComboBox3.setModel( new javax.swing.DefaultComboBoxModel(new String[] {"1", "2", "3", "4", "5"})); jComboBox3.setName("jComboBox3"); // NOI18N jTextField7.setName("jTextField7"); // NOI18N jComboBox4.setModel( new javax.swing.DefaultComboBoxModel(new String[] {"1", "2", "3", "4", "5"})); jComboBox4.setName("jComboBox4"); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout .createSequentialGroup() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout .createSequentialGroup() .addComponent( jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 72, Short.MAX_VALUE) .addGap(38, 38, 38)) .addComponent( jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE) .addComponent( jTextField7, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE) .addComponent( jTextField6, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE) .addComponent( jTextField5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)) .addGap(38, 38, 38) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jComboBox2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jComboBox3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jComboBox4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( jComboBox1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))); jPanel1Layout.setVerticalGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( jPanel1Layout .createSequentialGroup() .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jTextField1, 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( jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jTextField5, 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( jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jComboBox3, 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( jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))); jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanel2.setName("jPanel2"); // NOI18N jLabel9.setName("jLabel9"); // NOI18N jScrollBar2.setName("jScrollBar2"); // 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() .addComponent(jLabel9) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 419, Short.MAX_VALUE) .addComponent( jScrollBar2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); jPanel2Layout.setVerticalGroup( jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel2Layout .createSequentialGroup() .addComponent(jLabel9) .addContainerGap(173, Short.MAX_VALUE)) .addComponent(jScrollBar2, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)); jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N jLabel7.setName("jLabel7"); // NOI18N jTextField8.setName("jTextField8"); // NOI18N jTextField9.setName("jTextField9"); // NOI18N jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N jLabel8.setName("jLabel8"); // NOI18N jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N jLabel10.setName("jLabel10"); // NOI18N jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N jLabel11.setName("jLabel11"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addContainerGap() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent(jLabel10) .addGap(40, 40, 40) .addComponent(jLabel11))) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 317, Short.MAX_VALUE) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent(jLabel4) .addGap(10, 10, 10) .addComponent( jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1) .addComponent( jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1) .addComponent( jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(197, 197, 197) .addComponent( jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 132, Short.MAX_VALUE)) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent(jButton1) .addGap(206, 206, 206) .addComponent(jButton3) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 213, Short.MAX_VALUE) .addComponent(jButton2) .addGap(20, 20, 20)) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent(jLabel3) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(137, Short.MAX_VALUE)) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(177, Short.MAX_VALUE)) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent(jLabel8) .addContainerGap(504, Short.MAX_VALUE)) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(395, Short.MAX_VALUE))))); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(31, 31, 31) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10) .addComponent(jLabel11)) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(29, 29, 29) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent( jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5) .addComponent( jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7) .addComponent( jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(36, 36, 36) .addGroup( mainPanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent( jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(37, 37, 37) .addComponent(jLabel8) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(31, 31, 31) .addComponent( jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(51, 51, 51) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent( jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent( jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(20, Short.MAX_VALUE))); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(edu.calpoly.testtool.TestToolApp.class) .getContext() .getActionMap(TestGeneratorView2.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N jMenu1.setName("jMenu1"); // NOI18N menuBar.add(jMenu1); jMenu3.setText(resourceMap.getString("jMenu3.text")); // NOI18N jMenu3.setName("jMenu3"); // NOI18N menuBar.add(jMenu3); jMenu4.setText(resourceMap.getString("jMenu4.text")); // NOI18N jMenu4.setName("jMenu4"); // NOI18N menuBar.add(jMenu4); jMenu5.setText(resourceMap.getString("jMenu5.text")); // NOI18N jMenu5.setName("jMenu5"); // NOI18N menuBar.add(jMenu5); setComponent(mainPanel); setMenuBar(menuBar); } // </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() { 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() { mainPanel = new javax.swing.JPanel(); browsePanel1 = new imat.browse.BrowsePanel(); basket1 = new imat.Basket(); featurePanel1 = new imat.feature.FeaturePanel(); homeHeader1 = new imat.HomeHeader(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem(); jMenu1 = new javax.swing.JMenu(); jMenuItem2 = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem(); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(imat.IMatApp.class) .getContext() .getResourceMap(IMatView.class); mainPanel.setBackground(resourceMap.getColor("mainPanel.background")); // NOI18N mainPanel.setName("mainPanel"); // NOI18N mainPanel.setPreferredSize(new java.awt.Dimension(1360, 654)); browsePanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); browsePanel1.setMinimumSize(new java.awt.Dimension(250, 419)); browsePanel1.setName("browsePanel1"); // NOI18N browsePanel1.setPreferredSize(new java.awt.Dimension(250, 450)); basket1.setBackground(resourceMap.getColor("basket1.background")); // NOI18N basket1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); basket1.setMaximumSize(new java.awt.Dimension(370, 450)); basket1.setMinimumSize(new java.awt.Dimension(350, 450)); basket1.setName("basket1"); // NOI18N basket1.setPreferredSize(new java.awt.Dimension(350, 450)); featurePanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); featurePanel1.setName("featurePanel1"); // NOI18N featurePanel1.setPreferredSize(new java.awt.Dimension(630, 450)); homeHeader1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); homeHeader1.setName("homeHeader1"); // NOI18N javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, mainPanelLayout .createSequentialGroup() .addGap(0, 0, 0) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( homeHeader1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 1360, Short.MAX_VALUE) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( browsePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent( featurePanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 750, Short.MAX_VALUE) .addGap(0, 0, 0) .addComponent( basket1, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(10, 10, 10))); mainPanelLayout.setVerticalGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( mainPanelLayout .createSequentialGroup() .addComponent( homeHeader1, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addGroup( mainPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( featurePanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE) .addComponent( browsePanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE) .addComponent( basket1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE)))); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(imat.IMatApp.class) .getContext() .getActionMap(IMatView.class, this); exitMenuItem.setAction(actionMap.get("quit")); // NOI18N exitMenuItem.setName("exitMenuItem"); // NOI18N fileMenu.add(exitMenuItem); menuBar.add(fileMenu); jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N jMenu1.setName("jMenu1"); // NOI18N jMenuItem2.setText(resourceMap.getString("jMenuItem2.text")); // NOI18N jMenuItem2.setName("jMenuItem2"); // NOI18N jMenuItem2.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jMenu1.add(jMenuItem2); menuBar.add(jMenu1); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0)); 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); } }); helpMenu.add(jMenuItem1); aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // NOI18N aboutMenuItem.setName("aboutMenuItem"); // NOI18N helpMenu.add(aboutMenuItem); menuBar.add(helpMenu); setComponent(mainPanel); setMenuBar(menuBar); } // </editor-fold>//GEN-END:initComponents