List of usage examples for java.beans PropertyChangeEvent getPropertyName
public String getPropertyName()
From source file:org.talend.dataprofiler.core.ui.editor.analysis.AbstractFilterMetadataPage.java
public void propertyChange(PropertyChangeEvent evt) { if (PluginConstant.ISDIRTY_PROPERTY.equals(evt.getPropertyName())) { ((AnalysisEditor) this.getEditor()).firePropertyChange(IEditorPart.PROP_DIRTY); }//from www .j ava 2 s.co m }
From source file:org.apache.catalina.core.NamingContextListener.java
/** * Process property change events. Currently, only listens to such events * on the <code>NamingResources</code> instance for the global naming * resources.//from www . j av a2 s. c om * * @param event The property change event that has occurred */ public void propertyChange(PropertyChangeEvent event) { if (!initialized) return; Object source = event.getSource(); if (source == namingResources) { // Setting the context in read/write mode ContextAccessController.setWritable(getName(), container); processGlobalResourcesChange(event.getPropertyName(), event.getOldValue(), event.getNewValue()); // Setting the context in read only mode ContextAccessController.setReadOnly(getName()); } }
From source file:org.isatools.isacreator.spreadsheet.SpreadsheetFunctions.java
/** * Delete column given an index.//from ww w .j a v a2 s . c o m * * @param vColIndex - column to remove. */ protected void deleteColumn(int vColIndex) { spreadsheet.curColDelete = vColIndex; spreadsheet.currentState = Spreadsheet.DELETING_COLUMN; TableColumn col = spreadsheet.getTable().getColumnModel().getColumn(spreadsheet.curColDelete); if (!col.getHeaderValue().toString().equals(TableReferenceObject.ROW_NO_TEXT)) { if (spreadsheet.getTableReferenceObject().isRequired(col.getHeaderValue().toString()) && !areMultipleOccurences(col.getHeaderValue().toString())) { spreadsheet.optionPane = new JOptionPane( "<html>This column can not be deleted due to it being a required field in this assay!</html>", JOptionPane.OK_OPTION); spreadsheet.optionPane.setIcon(spreadsheet.requiredColumnWarningIcon); UIHelper.applyOptionPaneBackground(spreadsheet.optionPane, UIHelper.BG_COLOR); spreadsheet.optionPane.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getPropertyName().equals(JOptionPane.VALUE_PROPERTY)) { spreadsheet.getParentFrame().hideSheet(); } } }); spreadsheet.getParentFrame() .showJDialogAsSheet(spreadsheet.optionPane.createDialog(spreadsheet, "Can not delete")); } else { spreadsheet.optionPane = new JOptionPane( "<html>Are you sure you want to delete this column? <p>This Action can not be undone!</p></html>", JOptionPane.INFORMATION_MESSAGE, JOptionPane.YES_NO_OPTION, spreadsheet.confirmRemoveColumnIcon); UIHelper.applyOptionPaneBackground(spreadsheet.optionPane, UIHelper.BG_COLOR); spreadsheet.optionPane.addPropertyChangeListener(spreadsheet); spreadsheet.getParentFrame().showJDialogAsSheet( spreadsheet.optionPane.createDialog(spreadsheet, "Confirm Delete Column")); } } }
From source file:org.isatools.isacreatorconfigurator.configui.DataEntryPanel.java
private void showMessagePane(String message, int messageType) { final JOptionPane optionPane = new JOptionPane("<html>" + message + "</html>", JOptionPane.OK_OPTION); UIHelper.renderComponent(optionPane, UIHelper.VER_12_PLAIN, UIHelper.DARK_GREEN_COLOR, false); if (messageType == JOptionPane.ERROR_MESSAGE) { optionPane.setIcon(warningIcon); } else {//from w w w . j ava2 s. c o m optionPane.setIcon(informationIcon); } optionPane.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (event.getPropertyName().equals(JOptionPane.VALUE_PROPERTY)) { applicationContainer.hideSheet(); } } }); SwingUtilities.invokeLater(new Runnable() { public void run() { applicationContainer.showJDialogAsSheet(optionPane.createDialog(getThis(), "Message")); } }); }
From source file:ca.sqlpower.wabit.dao.session.WorkspacePersisterListener.java
public void propertyChanged(PropertyChangeEvent evt) { if (wouldEcho()) return;//from w w w . ja va 2 s . c om this.transactionStarted(TransactionEvent.createStartTransactionEvent(this, "Creating start transaction event from propertyChange on object " + evt.getSource().getClass().getSimpleName() + " and property name " + evt.getPropertyName())); SPObject source = (SPObject) evt.getSource(); String uuid = source.getUUID(); String propertyName = evt.getPropertyName(); Object oldValue = evt.getOldValue(); Object newValue = evt.getNewValue(); PropertyDescriptor propertyDescriptor; try { propertyDescriptor = PropertyUtils.getPropertyDescriptor(source, propertyName); } catch (Exception ex) { this.rollback(); throw new RuntimeException(ex); } //Not persisting non-settable properties if (propertyDescriptor == null || propertyDescriptor.getWriteMethod() == null) { this.transactionEnded(TransactionEvent.createEndTransactionEvent(this)); return; } for (PropertyToIgnore ignoreProperty : ignoreList) { if (ignoreProperty.getPropertyName().equals(propertyName) && ignoreProperty.getClassType().isAssignableFrom(source.getClass())) { this.transactionEnded(TransactionEvent.createEndTransactionEvent(this)); return; } } //XXX special case that I want to remove even though I'm implementing it List<Object> additionalParams = new ArrayList<Object>(); if (source instanceof OlapQuery && propertyName.equals("currentCube")) { additionalParams.add(((OlapQuery) source).getOlapDataSource()); } DataType typeForClass = PersisterUtils.getDataType(newValue == null ? Void.class : newValue.getClass()); Object oldBasicType; Object newBasicType; oldBasicType = converter.convertToBasicType(oldValue, additionalParams.toArray()); newBasicType = converter.convertToBasicType(newValue, additionalParams.toArray()); logger.debug("Calling persistProperty on propertyChange"); this.persistProperty(uuid, propertyName, typeForClass, oldBasicType, newBasicType); this.transactionEnded(TransactionEvent.createEndTransactionEvent(this)); }
From source file:cs.cirg.cida.CIDAView.java
public CIDAView(SingleFrameApplication app) { super(app);// w ww.j a va2s. c om exceptionController = new ExceptionController(); experimentController = new ExperimentController(this, new ExperimentAnalysisModel(((CIDAApplication) app).getStartupDirectory())); tableConstructionController = new TableConstructionController(this, experimentController.getModel()); userSelectedRows = new ArrayList<Integer>(); userSelectedColumns = new ArrayList<Integer>(); initComponents(); // status bar initialization - message timeout, idle icon and busy animation, etc ResourceMap resourceMap = getResourceMap(); int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout"); messageTimer = new Timer(messageTimeout, new ActionListener() { public void actionPerformed(ActionEvent e) { statusMessageLabel.setText(""); } }); messageTimer.setRepeats(false); int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate"); for (int i = 0; i < busyIcons.length; i++) { busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]"); } busyIconTimer = new Timer(busyAnimationRate, new ActionListener() { public void actionPerformed(ActionEvent e) { busyIconIndex = (busyIconIndex + 1) % busyIcons.length; statusAnimationLabel.setIcon(busyIcons[busyIconIndex]); } }); idleIcon = resourceMap.getIcon("StatusBar.idleIcon"); statusAnimationLabel.setIcon(idleIcon); progressBar.setVisible(false); // connecting action tasks to status bar via TaskMonitor TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext()); taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { String propertyName = evt.getPropertyName(); if ("started".equals(propertyName)) { if (!busyIconTimer.isRunning()) { statusAnimationLabel.setIcon(busyIcons[0]); busyIconIndex = 0; busyIconTimer.start(); } progressBar.setVisible(true); progressBar.setIndeterminate(true); } else if ("done".equals(propertyName)) { busyIconTimer.stop(); statusAnimationLabel.setIcon(idleIcon); progressBar.setVisible(false); progressBar.setValue(0); } else if ("message".equals(propertyName)) { String text = (String) (evt.getNewValue()); statusMessageLabel.setText((text == null) ? "" : text); messageTimer.restart(); } else if ("progress".equals(propertyName)) { int value = (Integer) (evt.getNewValue()); progressBar.setVisible(true); progressBar.setIndeterminate(false); progressBar.setValue(value); } } }); }
From source file:org.springsource.ide.eclipse.dashboard.internal.ui.editors.DashboardMainPage.java
public void propertyChange(PropertyChangeEvent event) { String propertyName = event.getPropertyName(); if (propertyName.equals(RESOURCE_DASHBOARD_FEEDS_BLOGS)) { refreshFeedsAction.run();//from www .j a va2s . c o m } else if (propertyName.equals(RESOURCE_DASHBOARD_FEEDS_UPDATE)) { refreshUpdatesAction.run(); } }
From source file:canreg.client.gui.management.CanReg4MigrationInternalFrame.java
@Action public void MigrationAction() { okButton.setEnabled(false);/*from ww w .j a v a 2 s . c o m*/ doneButton.setEnabled(false); cancelButton.setEnabled(true); jList1.setEnabled(false); EditDatabaseVariableTableAssociationInternalFrame edvif = new EditDatabaseVariableTableAssociationInternalFrame(); int addServer = JOptionPane.showInternalConfirmDialog( CanRegClientApp.getApplication().getMainFrame().getContentPane(), java.util.ResourceBundle .getBundle("canreg/client/gui/management/resources/CanReg4SystemConverterInternalFrame") .getString("SUCCESSFULLY_CREATED_XML: ") + "\'" + Globals.CANREG_SERVER_SYSTEM_CONFIG_FOLDER + Globals.FILE_SEPARATOR + regcode + "\'.\n" + java.util.ResourceBundle.getBundle( "canreg/client/gui/management/resources/CanReg4SystemConverterInternalFrame") .getString("ADD_IT_TO_FAV_SERVERS?"), "Success", JOptionPane.YES_NO_OPTION); if (addServer == JOptionPane.YES_OPTION) { localSettings = CanRegClientApp.getApplication().getLocalSettings(); localSettings.addServerToServerList(dlm.get(list.getSelectedIndex()), "localhost", Globals.DEFAULT_PORT, regcode); localSettings.writeSettings(); } try { edvif.setTitle("Variables and Tables for " + WordUtils.capitalize(dlm.get(list.getSelectedIndex()).toLowerCase())); edvif.loadSystemDefinition( Globals.CANREG_SERVER_SYSTEM_CONFIG_FOLDER + Globals.FILE_SEPARATOR + regcode + ".xml"); edvif.setDesktopPane(desktopPane); CanRegClientView.showAndPositionInternalFrame(desktopPane, edvif); } catch (IOException ex) { Logger.getLogger(CanReg4SystemConverterInternalFrame.class.getName()).log(Level.SEVERE, null, ex); } catch (ParserConfigurationException ex) { Logger.getLogger(CanReg4SystemConverterInternalFrame.class.getName()).log(Level.SEVERE, null, ex); } catch (SAXException ex) { Logger.getLogger(CanReg4SystemConverterInternalFrame.class.getName()).log(Level.SEVERE, null, ex); } edvif.saveButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { //logout from canreg system before conversion if (CanRegClientApp.getApplication().loggedIn) { try { CanRegClientApp.getApplication().logOut(); } catch (RemoteException ex) { Logger.getLogger(CanReg4MigrationInternalFrame.class.getName()).log(Level.SEVERE, null, ex); } } //check to see if there is a database already - rename it File databaseFolder = new File( Globals.CANREG_SERVER_DATABASE_FOLDER + Globals.FILE_SEPARATOR + regcode); if (databaseFolder.exists()) { int i = 0; File folder2 = databaseFolder; while (folder2.exists()) { i++; folder2 = new File( Globals.CANREG_SERVER_DATABASE_FOLDER + Globals.FILE_SEPARATOR + regcode + i); } databaseFolder.renameTo(folder2); debugOut("database: " + databaseFolder); try { canreg.common.Tools.fileCopy( Globals.CANREG_SERVER_SYSTEM_CONFIG_FOLDER + Globals.FILE_SEPARATOR + regcode + ".xml", Globals.CANREG_SERVER_SYSTEM_CONFIG_FOLDER + Globals.FILE_SEPARATOR + regcode + i + ".xml"); } catch (IOException ex) { Logger.getLogger(CanReg4MigrationInternalFrame.class.getName()).log(Level.SEVERE, null, ex); } } ProgressBar.setStringPainted(true); cTask = new ProgressTask( org.jdesktop.application.Application.getInstance(canreg.client.CanRegClientApp.class)); cTask.execute(); cTask.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if ("progress".equals(evt.getPropertyName())) { ProgressBar.setValue((Integer) evt.getNewValue()); ProgressBar.setString(evt.getNewValue().toString() + "%"); } } }); } }); }
From source file:org.jitsi.videobridge.Conference.java
/** * Notifies this instance that there was a change in the value of a property * of {@link #speechActivity}.// w w w. ja v a2 s . co m * * @param ev a <tt>PropertyChangeEvent</tt> which specifies the source of * the event/notification, the name of the property and the old and new * values of that property */ private void speechActivityPropertyChange(PropertyChangeEvent ev) { String propertyName = ev.getPropertyName(); if (ConferenceSpeechActivity.DOMINANT_ENDPOINT_PROPERTY_NAME.equals(propertyName)) { // The dominant speaker in this Conference has changed. We will // likely want to notify the Endpoints participating in this // Conference. dominantSpeakerChanged(); } else if (ConferenceSpeechActivity.ENDPOINTS_PROPERTY_NAME.equals(propertyName)) { speechActivityEndpointsChanged(); } }
From source file:ru.goodfil.catalog.ui.forms.OePanel.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - ????? ??????? panel1 = new JPanel(); panel2 = new JPanel(); btnCreateBrand = new JButton(); btnEditBrand = new JButton(); btnRemoveBrand = new JButton(); btnUnionBrand = new JButton(); hSpacer1 = new JPanel(null); tbSearchBrand = new JTextField(); btnSearchBrand = new JButton(); scrollPane1 = new JScrollPane(); lstBrands = new JList(); lLstBrandsStatus = new JLabel(); panel3 = new JPanel(); panel4 = new JPanel(); btnCreateOe = new JButton(); btnEditOe = new JButton(); btnRemoveOe = new JButton(); btnUnionOe = new JButton(); hSpacer2 = new JPanel(null); tbSearchOe = new JTextField(); btnSearchOe = new JButton(); scrollPane2 = new JScrollPane(); lstOes = new JList(); lLstOesStatus = new JLabel(); popupMenu1 = new JPopupMenu(); menuItem1 = new JMenuItem(); menuItem2 = new JMenuItem(); menuItem3 = new JMenuItem(); menuItem4 = new JMenuItem(); popupMenu2 = new JPopupMenu(); menu1 = new JMenu(); menuItem5 = new JMenuItem(); menuItem6 = new JMenuItem(); CellConstraints cc = new CellConstraints(); //======== this ======== // JFormDesigner evaluation mark setBorder(// ww w.j a v a 2 s .c om new javax.swing.border.CompoundBorder( new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red), getBorder())); addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if ("border".equals(e.getPropertyName())) throw new RuntimeException(); } }); setLayout(new FormLayout("default:grow, $lcgap, default:grow", "fill:default:grow")); //======== panel1 ======== { panel1.setBorder(new TitledBorder( "\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438")); panel1.setLayout( new FormLayout("default:grow", "fill:21dlu, $lgap, fill:default:grow, $lgap, default")); //======== panel2 ======== { panel2.setLayout(new FormLayout("4*(21dlu), default:grow, 100dlu, 21dlu", "fill:default:grow")); //---- btnCreateBrand ---- btnCreateBrand .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/add_24.png"))); btnCreateBrand.setToolTipText( "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnCreateBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCreateBrandActionPerformed(e); } }); panel2.add(btnCreateBrand, cc.xy(1, 1)); //---- btnEditBrand ---- btnEditBrand .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit_24.png"))); btnEditBrand.setToolTipText( "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnEditBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnEditBrandActionPerformed(e); } }); panel2.add(btnEditBrand, cc.xy(2, 1)); //---- btnRemoveBrand ---- btnRemoveBrand.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/delete_24.png"))); btnRemoveBrand.setToolTipText( "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnRemoveBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnRemoveBrandActionPerformed(e); } }); panel2.add(btnRemoveBrand, cc.xy(3, 1)); //---- btnUnionBrand ---- btnUnionBrand.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/recycle_24.png"))); btnUnionBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnUnionBrandActionPerformed(e); } }); panel2.add(btnUnionBrand, cc.xy(4, 1)); panel2.add(hSpacer1, cc.xy(5, 1)); //---- tbSearchBrand ---- tbSearchBrand.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { tbSearchBrandKeyTyped(e); } @Override public void keyReleased(KeyEvent e) { tbSearchBrandKeyTyped(e); } @Override public void keyTyped(KeyEvent e) { tbSearchBrandKeyTyped(e); } }); tbSearchBrand.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { tbSearchBrandFocusGained(e); } @Override public void focusLost(FocusEvent e) { tbSearchBrandFocusGained(e); } }); panel2.add(tbSearchBrand, cc.xy(6, 1)); //---- btnSearchBrand ---- btnSearchBrand.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/find_next_24.png"))); btnSearchBrand.setToolTipText( "\u041f\u043e\u0438\u0441\u043a \u043c\u043e\u0442\u043e\u0440\u043e\u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438\u0437 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438"); btnSearchBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSearchBrandActionPerformed(e); } }); panel2.add(btnSearchBrand, cc.xy(7, 1)); } panel1.add(panel2, cc.xy(1, 1)); //======== scrollPane1 ======== { //---- lstBrands ---- lstBrands.setToolTipText( "\u0415\u0441\u043b\u0438 \u0448\u0440\u0438\u0444\u0442 \u0411\u0440\u0435\u043d\u0434\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u043f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u043c, \u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u043d \u0432 \u043e\u0442\u0447\u0443\u0436\u0434\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043f\u0438\u0438, \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043e\u043a. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d, \u0442\u043e \u0432\u0438\u0434\u0435\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442."); lstBrands.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { lstBrandsValueChanged(e); } }); lstBrands.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { lstBrandsKeyPressed(e); } }); lstBrands.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lstBrandsMouseClicked(e); } }); scrollPane1.setViewportView(lstBrands); } panel1.add(scrollPane1, cc.xy(1, 3)); //---- lLstBrandsStatus ---- lLstBrandsStatus.setText("text"); panel1.add(lLstBrandsStatus, cc.xy(1, 5)); } add(panel1, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBorder(new TitledBorder("\u041d\u043e\u043c\u0435\u0440\u0430 \u041e\u0415")); panel3.setLayout(new FormLayout("default:grow", "default, $lgap, fill:default:grow, $lgap, default")); //======== panel4 ======== { panel4.setLayout(new FormLayout("4*(21dlu), default:grow, 100dlu, 21dlu", "fill:21dlu")); //---- btnCreateOe ---- btnCreateOe .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/add_24.png"))); btnCreateOe.setToolTipText( "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnCreateOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCreateOeActionPerformed(e); } }); panel4.add(btnCreateOe, cc.xy(1, 1)); //---- btnEditOe ---- btnEditOe .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit_24.png"))); btnEditOe.setToolTipText( "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnEditOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnEditOeActionPerformed(e); } }); panel4.add(btnEditOe, cc.xy(2, 1)); //---- btnRemoveOe ---- btnRemoveOe.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/delete_24.png"))); btnRemoveOe.setToolTipText( "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnRemoveOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnRemoveOeActionPerformed(e); } }); panel4.add(btnRemoveOe, cc.xy(3, 1)); //---- btnUnionOe ---- btnUnionOe.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/recycle_24.png"))); btnUnionOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnUnionOeActionPerformed(e); } }); panel4.add(btnUnionOe, cc.xy(4, 1)); panel4.add(hSpacer2, cc.xy(5, 1)); //---- tbSearchOe ---- tbSearchOe.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { tbSearchOeKeyPressed(e); } @Override public void keyReleased(KeyEvent e) { tbSearchOeKeyPressed(e); } }); tbSearchOe.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { tbSearchOeFocusGained(e); } @Override public void focusLost(FocusEvent e) { tbSearchOeFocusGained(e); } }); panel4.add(tbSearchOe, cc.xy(6, 1)); //---- btnSearchOe ---- btnSearchOe.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/find_next_24.png"))); btnSearchOe.setToolTipText( "\u041f\u043e\u0438\u0441\u043a \u043c\u043e\u0442\u043e\u0440\u043e\u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438\u0437 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438"); btnSearchOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSearchOeActionPerformed(e); } }); panel4.add(btnSearchOe, cc.xy(7, 1)); } panel3.add(panel4, cc.xy(1, 1)); //======== scrollPane2 ======== { //---- lstOes ---- lstOes.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { lstOesKeyPressed(e); } }); lstOes.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { lstOesValueChanged(e); } }); lstOes.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lstOesMouseClicked(e); } }); scrollPane2.setViewportView(lstOes); } panel3.add(scrollPane2, cc.xy(1, 3)); //---- lLstOesStatus ---- lLstOesStatus.setText("text"); panel3.add(lLstOesStatus, cc.xy(1, 5)); } add(panel3, cc.xy(3, 1)); //======== popupMenu1 ======== { popupMenu1.addPopupMenuListener(new PopupMenuListener() { @Override public void popupMenuCanceled(PopupMenuEvent e) { } @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { } @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { popupMenu1PopupMenuWillBecomeVisible(e); } }); //---- menuItem1 ---- menuItem1.setText( "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440"); menuItem1.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { copyToClipboard(e); } }); popupMenu1.add(menuItem1); //---- menuItem2 ---- menuItem2.setText( "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430"); menuItem2.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { pasteFromClipboard(e); } }); popupMenu1.add(menuItem2); popupMenu1.addSeparator(); //---- menuItem3 ---- menuItem3.setText( "\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 (\u0421 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c)"); menuItem3.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cutToClipboard(e); } }); popupMenu1.add(menuItem3); //---- menuItem4 ---- menuItem4.setText( "\u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430"); menuItem4.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { pasteFromClipboard(e); } }); popupMenu1.add(menuItem4); } //======== popupMenu2 ======== { //======== menu1 ======== { menu1.setText( "\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u043e\u0442\u0447\u0443\u0436\u0434\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043f\u0438\u0438"); //---- menuItem5 ---- menuItem5.setText("\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c"); menuItem5.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemReprezentInStandalone(e); } }); menu1.add(menuItem5); //---- menuItem6 ---- menuItem6.setText("\u041d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c"); menuItem6.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemDontReprezentInStandalone(e); } }); menu1.add(menuItem6); } popupMenu2.add(menu1); } // JFormDesigner - End of component initialization //GEN-END:initComponents }