List of usage examples for java.awt Cursor DEFAULT_CURSOR
int DEFAULT_CURSOR
To view the source code for java.awt Cursor DEFAULT_CURSOR.
Click Source Link
From source file:org.yccheok.jstock.gui.portfolio.DividendSummaryJDialog.java
private void jLabel2MouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel2MouseExited this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
From source file:com.wet.wired.jsr.player.JPlayer.java
public void endWaitForBackgroundProcesses() { this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
From source file:eu.ggnet.dwoss.receipt.unit.UnitView.java
/** * 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// w ww. j a v a2s. c om * Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; manufacturerButtonGroup = new javax.swing.ButtonGroup(); jPanel1 = new javax.swing.JPanel(); unitSplitPane = new javax.swing.JSplitPane(); unitWritePanel = new javax.swing.JPanel(); internalCommentAreaScrollPane = new javax.swing.JScrollPane(); internalCommentArea = new javax.swing.JTextArea(); commentAreaScrollPane = new javax.swing.JScrollPane(); commentArea = new javax.swing.JTextArea(); unitItemLabel = new javax.swing.JLabel(); unitStatusLabel = new javax.swing.JLabel(); unitStateBox = new javax.swing.JComboBox(); editProductButton = new javax.swing.JButton(); partNoField = new javax.swing.JTextField(); refurbishedIdField = new javax.swing.JTextField(); unitSnLabel = new javax.swing.JLabel(); unitNumberLabel = new javax.swing.JLabel(); serialField = new javax.swing.JTextField(); editRefurbishedIdButton = new javax.swing.JButton(); mfgLabel = new javax.swing.JLabel(); mfgDateChooser = new com.toedter.calendar.JDateChooser(); jLabel3 = new javax.swing.JLabel(); warrantyTillChooser = new com.toedter.calendar.JDateChooser(); jLabel4 = new javax.swing.JLabel(); warrantyTypeChooser = new javax.swing.JComboBox(); manufacturerPanel = new javax.swing.JPanel(); contractorBox = new javax.swing.JComboBox(); jScrollPane3 = new javax.swing.JScrollPane(); equipmentTable = new javax.swing.JTable(); jScrollPane4 = new javax.swing.JScrollPane(); commentTable = new javax.swing.JTable(); jScrollPane5 = new javax.swing.JScrollPane(); internalCommentTable = new javax.swing.JTable(); unitReadPanel = new javax.swing.JPanel(); unitShipLabel = new javax.swing.JLabel(); unitShipField = new javax.swing.JTextField(); unitOwnerLabel = new javax.swing.JLabel(); unitOwnerField = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); detailArea = new javax.swing.JEditorPane(); messagesButton = new javax.swing.JButton(); operationButtonPanel = new javax.swing.JPanel(); cancelButton = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Gert bearbeiten/aufnehmen"); setMinimumSize(new java.awt.Dimension(1080, 700)); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); unitSplitPane.setDividerLocation(600); unitSplitPane.setResizeWeight(1.0); unitSplitPane.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); unitSplitPane.setDoubleBuffered(true); unitWritePanel.setBorder(javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED, new java.awt.Color(204, 204, 255), new java.awt.Color(51, 51, 51)))); unitWritePanel.setMinimumSize(new java.awt.Dimension(500, 400)); unitWritePanel.setPreferredSize(new java.awt.Dimension(500, 400)); unitWritePanel.setLayout(new java.awt.GridBagLayout()); internalCommentArea.setColumns(20); internalCommentArea.setLineWrap(true); internalCommentArea.setRows(5); internalCommentArea.setWrapStyleWord(true); internalCommentAreaScrollPane.setViewportView(internalCommentArea); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 10; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START; gridBagConstraints.weighty = 0.1; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(internalCommentAreaScrollPane, gridBagConstraints); commentArea.setColumns(20); commentArea.setLineWrap(true); commentArea.setRows(5); commentArea.setWrapStyleWord(true); commentAreaScrollPane.setViewportView(commentArea); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 10; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START; gridBagConstraints.weighty = 0.1; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(commentAreaScrollPane, gridBagConstraints); unitItemLabel.setText("ArtikelNr:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(unitItemLabel, gridBagConstraints); unitStatusLabel.setText("Zustand:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(unitStatusLabel, gridBagConstraints); unitStateBox.setNextFocusableComponent(warrantyTillChooser); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 5; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(unitStateBox, gridBagConstraints); editProductButton.setText("Edit"); editProductButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editProductButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; unitWritePanel.add(editProductButton, gridBagConstraints); partNoField.setName("partNo"); // NOI18N partNoField.setNextFocusableComponent(unitStateBox); partNoField.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { partNoFieldFocusLost(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(partNoField, gridBagConstraints); refurbishedIdField.setName("refurbishId"); // NOI18N refurbishedIdField.setNextFocusableComponent(serialField); refurbishedIdField.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { refurbishedIdFieldFocusLost(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 0.1; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(refurbishedIdField, gridBagConstraints); unitSnLabel.setText("SerienNr:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; gridBagConstraints.insets = new java.awt.Insets(5, 2, 2, 2); unitWritePanel.add(unitSnLabel, gridBagConstraints); unitNumberLabel.setText("SopoNr:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(unitNumberLabel, gridBagConstraints); serialField.setName("serial"); // NOI18N serialField.setNextFocusableComponent(partNoField); serialField.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { serialFieldFocusLost(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(serialField, gridBagConstraints); editRefurbishedIdButton.setText("Edit"); editRefurbishedIdButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { editRefurbishedIdButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; unitWritePanel.add(editRefurbishedIdButton, gridBagConstraints); mfgLabel.setText("MFG Date:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; unitWritePanel.add(mfgLabel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 4; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(mfgDateChooser, gridBagConstraints); jLabel3.setText("Garantie bis:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 7; gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_END; gridBagConstraints.insets = new java.awt.Insets(8, 0, 0, 0); unitWritePanel.add(jLabel3, gridBagConstraints); warrantyTillChooser.setEnabled(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 7; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(warrantyTillChooser, gridBagConstraints); jLabel4.setText("Garantietyp:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; unitWritePanel.add(jLabel4, gridBagConstraints); warrantyTypeChooser.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { warrantyTypeChooserActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 6; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.FIRST_LINE_START; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(warrantyTypeChooser, gridBagConstraints); manufacturerPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Hersteller Support")); contractorBox.setModel( new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); contractorBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { contractorBoxActionPerformed(evt); } }); javax.swing.GroupLayout manufacturerPanelLayout = new javax.swing.GroupLayout(manufacturerPanel); manufacturerPanel.setLayout(manufacturerPanelLayout); manufacturerPanelLayout.setHorizontalGroup( manufacturerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( contractorBox, javax.swing.GroupLayout.Alignment.TRAILING, 0, 333, Short.MAX_VALUE)); manufacturerPanelLayout.setVerticalGroup( manufacturerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(contractorBox, javax.swing.GroupLayout.Alignment.TRAILING)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; unitWritePanel.add(manufacturerPanel, gridBagConstraints); equipmentTable .setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { null, null, null, null }, { null, null, null, null }, { null, null, null, null }, { null, null, null, null } }, new String[] { "Title 1", "Title 2", "Title 3", "Title 4" })); jScrollPane3.setViewportView(equipmentTable); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; gridBagConstraints.gridheight = 9; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 0.1; gridBagConstraints.weighty = 0.2; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(jScrollPane3, gridBagConstraints); commentTable .setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { null, null, null, null }, { null, null, null, null }, { null, null, null, null }, { null, null, null, null } }, new String[] { "Title 1", "Title 2", "Title 3", "Title 4" })); jScrollPane4.setViewportView(commentTable); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; gridBagConstraints.gridwidth = 3; gridBagConstraints.gridheight = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 0.2; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(jScrollPane4, gridBagConstraints); internalCommentTable .setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { null, null, null, null }, { null, null, null, null }, { null, null, null, null }, { null, null, null, null } }, new String[] { "Title 1", "Title 2", "Title 3", "Title 4" })); jScrollPane5.setViewportView(internalCommentTable); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 9; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 0.1; gridBagConstraints.weighty = 0.2; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); unitWritePanel.add(jScrollPane5, gridBagConstraints); unitSplitPane.setLeftComponent(unitWritePanel); unitReadPanel.setBorder(javax.swing.BorderFactory.createTitledBorder( javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED, new java.awt.Color(204, 204, 255), java.awt.Color.black))); unitShipLabel.setText("Shipment ID:"); unitShipField.setEditable(false); unitShipField.setFocusable(false); unitOwnerLabel.setText("Besitzer:"); unitOwnerField.setEditable(false); unitOwnerField.setFocusable(false); jLabel1.setText("Details:"); jScrollPane2.setFocusable(false); detailArea.setContentType("text/html"); // NOI18N detailArea.setFocusable(false); jScrollPane2.setViewportView(detailArea); messagesButton.setText("Meldungen"); messagesButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { messagesButtonActionPerformed(evt); } }); javax.swing.GroupLayout unitReadPanelLayout = new javax.swing.GroupLayout(unitReadPanel); unitReadPanel.setLayout(unitReadPanelLayout); unitReadPanelLayout.setHorizontalGroup(unitReadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 393, Short.MAX_VALUE) .addGroup(unitReadPanelLayout.createSequentialGroup() .addGroup(unitReadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(unitShipLabel).addComponent(unitOwnerLabel)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(unitReadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(unitShipField, javax.swing.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE) .addComponent(unitOwnerField, javax.swing.GroupLayout.DEFAULT_SIZE, 308, Short.MAX_VALUE))) .addGroup(unitReadPanelLayout.createSequentialGroup().addComponent(jLabel1).addGap(0, 346, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, unitReadPanelLayout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE).addComponent(messagesButton))); unitReadPanelLayout.setVerticalGroup(unitReadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(unitReadPanelLayout.createSequentialGroup().addGroup(unitReadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(unitShipLabel) .addComponent(unitShipField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( unitReadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(unitOwnerLabel).addComponent(unitOwnerField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 414, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(messagesButton))); unitSplitPane.setRightComponent(unitReadPanel); 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(unitSplitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1008, Short.MAX_VALUE) .addContainerGap())); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(jPanel1Layout .createSequentialGroup().addContainerGap().addComponent(unitSplitPane).addContainerGap())); operationButtonPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); operationButtonPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT)); cancelButton.setText("Abbrechen"); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(cancelButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(operationButtonPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(operationButtonPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelButton).addContainerGap())))); pack(); }
From source file:com.josescalia.tumblr.app.MainFrame.java
private void executeMenu(final String beanName) { mainPanel.setCursor(new Cursor(Cursor.WAIT_CURSOR)); progressBar.setIndeterminate(true);/*www .j av a 2 s . com*/ new SwingWorker<BaseForm, BaseForm>() { @Override protected BaseForm doInBackground() throws Exception { return (BaseForm) context.getBean(beanName); } @Override protected void done() { BaseForm frm; try { removePanelFromMain(); frm = get(); frm.showForm(); frm.setVisible(true); mainPanel.setLayout(new BorderLayout()); mainPanel.add(frm); mainPanel.validate(); } catch (InterruptedException ex) { logger.error(ex.getMessage()); UIAlert.showError(mainPanel, "No Such Form Defined"); } catch (ExecutionException ex) { logger.error(ex.getMessage()); UIAlert.showError(mainPanel, "Something wrong with the system"); } progressBar.setIndeterminate(false); mainPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }.execute(); //this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); }
From source file:com.ssn.listener.SSNHiveAlbumSelectionListner.java
public void createCompontents(String mediaPath, SSNHomeForm ssnHomeForm, boolean fileShowFlag) { ssnHomeForm.getFileNamesToBeDeleted().clear(); SSNHelper.toggleDeleteAndShareImages(false, ssnHomeForm); // System.out.println("mediaPath-createCompontents::"+mediaPath); SSNHelper.toggleDeleteImage(true, ssnHomeForm); try {/*ww w.ja v a 2 s . co m*/ if (fileShowFlag) { ssnHomeForm.setCursor(new Cursor(Cursor.WAIT_CURSOR)); contentPane = new SSNGalleryHelper(mediaPath, ssnHomeForm, "ALL"); contentPane.setBackground(SSNConstants.SSN_BLACK_BACKGROUND_COLOR); ssnHomeForm.getSsnHomeCenterMainPanel().removeAll(); ssnHomeForm.getSsnHomeCenterPanel().removeAll(); ssnHomeForm.getSsnHomeCenterPanel().add(ssnHomeForm.getScrollPane(contentPane, SSNHelper.getAlbumNameFromPath(ssnHomeForm.ssnFileExplorer.m_display.getText()))); ssnHomeForm .getSsnHomeCenterMainPanel().add( ssnHomeForm.getSortPanel("Date", false, SSNHelper.getAlbumNameFromPath( ssnHomeForm.ssnFileExplorer.m_display.getText())), BorderLayout.NORTH); ssnHomeForm.getSsnHomeCenterMainPanel().add(ssnHomeForm.getSsnHomeCenterPanel(), BorderLayout.CENTER); ssnHomeForm.revalidate(); ssnHomeForm.repaint(); ssnHomeForm.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } else { if (contentPane != null) { ssnHomeForm.remove(contentPane); } addWelcomeIcons(); ssnHomeForm.revalidate(); } } catch (Exception ex) { ex.printStackTrace(); } }
From source file:br.ufrgs.enq.jcosmo.ui.COSMOSACDialog.java
private void rebuildChart() { if (listModel.getSize() < 2) { JOptionPane.showMessageDialog(this, "Select 2 compounds.", "Error", JOptionPane.OK_OPTION); err = true;/*w w w . j a va2s . c om*/ return; } if (listModel.getSize() > 2) { JOptionPane.showMessageDialog(this, "Select only 2 compounds.", "Error", JOptionPane.OK_OPTION); return; } double T = Double.parseDouble(temperature.getText()); if (T <= 0) { JOptionPane.showMessageDialog(this, "Invalid Temperature.", "Error", JOptionPane.OK_OPTION); return; } COSMOSAC cosmosac = (COSMOSAC) modelBox.getSelectedItem(); COSMOSACCompound comps[] = new COSMOSACCompound[2]; try { comps[0] = db.getComp((String) listModel.getElementAt(0)); comps[1] = db.getComp((String) listModel.getElementAt(1)); cosmosac.setComponents(comps); } catch (Exception e1) { e1.printStackTrace(); return; } if (comps[0] == null || comps[1] == null) return; cosmosac.setSigmaHB(Double.parseDouble(sigmaHB.getText())); cosmosac.setSigmaHB2(Double.parseDouble(sigmaHB2.getText())); cosmosac.setSigmaHB3(Double.parseDouble(sigmaHB3.getText())); // cosmosac.setSigmaHBUpper(Double.parseDouble(sigmaHBUpper.getText())); cosmosac.setCHB(Double.parseDouble(chargeHB.getText())); cosmosac.setSigmaDisp(Double.parseDouble(sigmaDisp.getText())); cosmosac.setCDisp(Double.parseDouble(chargeDisp.getText())); cosmosac.setBeta(Double.parseDouble(beta.getText())); cosmosac.setFpol(Double.parseDouble(fpol.getText())); cosmosac.setAnorm(Double.parseDouble(anorm.getText())); cosmosac.parametersChanged(); setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); // cosmosac.setParameters(cavityVolume, c1.charge, sigma); cosmosac.setTemperature(T); // testing several compositions XYSeriesCollection dataset = new XYSeriesCollection(); int n = 20; XYSeries lnGamma1 = new XYSeries(comps[0].name); XYSeries lnGamma2 = new XYSeries(comps[1].name); XYSeries ge_RT = new XYSeries("gE/RT"); for (int i = 0; i <= n; ++i) { z[0] = (double) i / n; z[1] = 1 - z[0]; cosmosac.setComposition(z); cosmosac.activityCoefficient(lnGamma); lnGamma1.add(z[0], lnGamma[0]); lnGamma2.add(z[0], lnGamma[1]); ge_RT.add(z[0], z[0] * lnGamma[0] + z[1] * lnGamma[1]); if (z[0] == 0) { lnGammaInf1Label.setText(String.format("%6.3g", lnGamma[0])); gammaInf1Label.setText(String.format("%6.3g", Math.exp(lnGamma[0]))); } if (z[1] == 0) { lnGammaInf2Label.setText(String.format("%6.3g", lnGamma[1])); gammaInf2Label.setText(String.format("%6.3g", Math.exp(lnGamma[1]))); } } dataset.addSeries(lnGamma1); dataset.addSeries(lnGamma2); dataset.addSeries(ge_RT); plot.setDataset(dataset); // now the segment gamma dataset = new XYSeriesCollection(); double[][] seggamma = cosmosac.getPureSegmentGamma(); n = comps[0].charge.length; XYSeries g1 = new XYSeries(comps[0].name); XYSeries g2 = new XYSeries(comps[1].name); XYSeries g1s = new XYSeries(comps[0].name + " * sigma"); XYSeries g2s = new XYSeries(comps[1].name + " * sigma"); for (int j = 0; j < n; ++j) { g1.add(comps[0].charge[j], Math.log(seggamma[0][j])); g2.add(comps[1].charge[j], Math.log(seggamma[1][j])); g1s.add(comps[0].charge[j], comps[0].area[j] * (Math.log(seggamma[1][j]) - Math.log(seggamma[0][j]))); g2s.add(comps[1].charge[j], comps[1].area[j] * (Math.log(seggamma[0][j]) - Math.log(seggamma[1][j]))); } dataset.addSeries(g1); dataset.addSeries(g2); dataset.addSeries(g1s); dataset.addSeries(g2s); plotSegGamma.setDataset(dataset); // adjust the plot properties plotSegGamma.getDomainAxis().setAutoRange(false); plotSegGamma.getDomainAxis().setRange(new Range(-0.025, 0.025)); XYLineAndShapeRenderer r = (XYLineAndShapeRenderer) plotSegGamma.getRenderer(); r.setSeriesStroke(0, new BasicStroke(2.5f)); r.setSeriesStroke(1, new BasicStroke(2.5f)); BasicStroke dashed = new BasicStroke(2.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] { 6.0f, 6.0f }, 0.0f); r.setSeriesStroke(2, dashed); r.setSeriesStroke(3, dashed); r.setSeriesPaint(0, Color.RED); r.setSeriesPaint(1, Color.BLUE); r.setSeriesPaint(2, Color.RED); r.setSeriesPaint(3, Color.BLUE); // plotSegGamma.setRenderer(stepRenderer); // plotSegGamma.setRenderer(3, stepRenderer); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
From source file:semgen.extraction.RadialGraph.Clusterer.java
public String clusterAndRecolor(AggregateLayout<String, Number> layout, int numEdgesToRemove, Color[] colors, boolean groupClusters) { setCursor(new Cursor(Cursor.WAIT_CURSOR)); String moduletable = ""; Graph<String, Number> g = layout.getGraph(); layout.removeAll();//from ww w. j a v a2 s . c o m EdgeBetweennessClusterer<String, Number> clusterer = new EdgeBetweennessClusterer<String, Number>( numEdgesToRemove); Set<Set<String>> clusterSet = clusterer.transform(g); List<Number> edges = clusterer.getEdgesRemoved(); sempanel.removeAll(); int i = 0; // Set the colors of each node so that each cluster's vertices have the same color extractor.clusterpanel.checkboxpanel.removeAll(); for (Iterator<Set<String>> cIt = clusterSet.iterator(); cIt.hasNext();) { moduletable = moduletable + "\nCLUSTER " + (i + 1); Set<String> vertices = cIt.next(); Color c = colors[i % colors.length]; Set<DataStructure> datastrs = new HashSet<DataStructure>(); for (String vertex : vertices) { datastrs.add(extractor.semsimmodel.getDataStructure(vertex)); } JLabel modulelabel = new JLabel("Cluster " + (i + 1)); modulelabel.setOpaque(true); modulelabel.setFont(SemGenFont.defaultBold()); modulelabel.setBackground(c); modulelabel.setAlignmentX(LEFT_ALIGNMENT); sempanel.add(modulelabel); // Update the semantics panel Set<String> addedterms = new HashSet<String>(); for (String ver : vertices) { if (extractor.semsimmodel.getDataStructure(ver).hasPhysicalProperty()) { if (extractor.semsimmodel.getDataStructure(ver).getPhysicalProperty() .getPhysicalPropertyOf() != null) { PhysicalModelComponent pmc = extractor.semsimmodel.getDataStructure(ver) .getPhysicalProperty().getPhysicalPropertyOf(); String name = null; if (pmc.hasRefersToAnnotation()) { name = pmc.getFirstRefersToReferenceOntologyAnnotation().getValueDescription(); } else { name = pmc.getName(); } if (!addedterms.contains(name)) { addedterms.add(name); JTextArea enttext = new JTextArea(name); enttext.setOpaque(true); enttext.setBackground(c); enttext.setFont(SemGenFont.defaultPlain(-2)); if (pmc instanceof PhysicalProcess) { enttext.setFont(SemGenFont.defaultItalic(-2)); name = "Process: " + name; } else name = "Entity: " + name; enttext.setWrapStyleWord(true); enttext.setLineWrap(true); enttext.setBorder(BorderFactory.createEmptyBorder(7, 7, 0, 0)); enttext.setAlignmentX(LEFT_ALIGNMENT); sempanel.add(enttext); moduletable = moduletable + "\n " + name; } } } } sempanel.validate(); sempanel.repaint(); semscroller.repaint(); semscroller.validate(); this.repaint(); this.validate(); colorCluster(vertices, c); ExtractorJCheckBox box = new ExtractorJCheckBox("Cluster " + (i + 1), datastrs); box.setBackground(c); box.setOpaque(true); box.addItemListener(extractor); extractor.clusterpanel.checkboxpanel.add(box); if (groupClusters == true) groupCluster(layout, vertices); i++; } refreshModulePanel(); for (Number e : g.getEdges()) { if (edges.contains(e)) edgePaints.put(e, Color.lightGray); else edgePaints.put(e, Color.black); } nummodules = i; setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); return moduletable; }
From source file:com.cmsoftware.keyron.vista.Login.java
private void panelContenidoMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_panelContenidoMouseReleased this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); }
From source file:es.mityc.firmaJava.libreria.pkcs7.ValidaTarjeta.java
private void validarTarjeta() { Runnable doWorkRunnable = new Runnable() { public void run() { ConexionTarjeta c = ConexionTarjeta.getInstance(); try { ks = c.conectar(jPinPasswordField.getPassword(), jLibreriaTextField.getText()); ValidaTarjeta.this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); dispose();/*from w w w .j a v a 2 s . c o m*/ } catch (ProviderException e1) { JOptionPane.showMessageDialog(jPanel, e1.getMessage(), I18n.getResource(LIBRERIAXADES_VALIDARTARJETA_TEXTO_23), JOptionPane.ERROR_MESSAGE); } catch (PKCS11Exception e1) { String mensajeError = mensajeErrorConexion(String.valueOf(e1.getErrorCode())); JOptionPane.showMessageDialog(jPanel, mensajeError, I18n.getResource(LIBRERIAXADES_VALIDARTARJETA_TEXTO_23), JOptionPane.ERROR_MESSAGE); } ValidaTarjeta.this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } }; ValidaTarjeta.this.setCursor(new Cursor(Cursor.WAIT_CURSOR)); SwingUtilities.invokeLater(doWorkRunnable); }
From source file:org.openmicroscopy.shoola.agents.dataBrowser.browser.BrowserModel.java
/** * Implemented as specified by the {@link Browser} interface. * @see Browser#resetChildDisplay()/*from w w w.ja v a 2 s . c o m*/ */ public void resetChildDisplay() { rootDisplay.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); Collection<ImageDisplay> rootChildren = rootDisplay.getChildrenDisplay(); JComponent desktop = rootDisplay.getInternalDesktop(); desktop.removeAll(); Iterator<ImageDisplay> i; switch (selectedLayout.getIndex()) { case LayoutFactory.SQUARY_LAYOUT: i = rootChildren.iterator(); ImageDisplay child; while (i.hasNext()) { child = i.next(); desktop.add(child); addToDesktop(child); } break; case LayoutFactory.FLAT_LAYOUT: i = getImageNodes().iterator(); while (i.hasNext()) desktop.add(i.next()); } rootDisplay.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }