Invoked when the target of the listener has changed its state. This
implementation assumes that the target is the FilePanel, and will update
the result collector for the new filename.

@param e the event that has occurred
511851
@Override
    public void stateChanged(ChangeEvent e) {
        log.debug("getting new collector");
        collector = (CorrectedResultCollector) createTestElement();
        if (collector instanceof CorrectedResultCollector) {
            setUpFiltering((CorrectedResultCollector) collector);
        }
        collector.loadExistingFile();
    }
1303473
public void handleThrowable(Throwable e, Object target) {
        try {
            ExceptionCallback exceptionCallback = (ExceptionCallback) target;
            if (e instanceof Exception) {
                exceptionCallback.exceptionThrown((Exception) e);
            } else {
                exceptionCallback.exceptionThrown(new RuntimeException(e));
            }
        } catch (IllegalArgumentException | ClassCastException e1) {
            log.fatal("unable to provide callback for: " + target.toString(), e);
        }
    }
1052191
public void actionPerformed(ActionEvent e)
    {
        if ((m_button != null) && (e.getSource() == m_button))
        {
            JCalendarPopup popup = JCalendarPopup.createCalendarPopup((Date)this.getControlValue(), m_button);
            popup.addPropertyChangeListener(this);
        }
        else if ((m_buttonTime != null) && (e.getSource() == m_buttonTime))
        {
            JTimePopup popup = JTimePopup.createTimePopup((Date)this.getControlValue(), m_buttonTime);
            popup.addPropertyChangeListener(this);
        }
    }
383597
protected void valueChanged()
	{
		String newValue = fViewer.getDocument().get();
		if (!newValue.equals(fOldValue))
		{
			fOldValue = newValue;

		}
		refreshValidState();
	}
442537
public void actionPerformed(ActionEvent e)
    {
        if (e.getSource() == this)
        {
            Date dateTarget = this.getTargetDate();
            JTimePopup popup = JTimePopup.createTimePopup(this.getTimeParam(), dateTarget, this, languageString);
            popup.addPropertyChangeListener(this);
        }
    }
433464
@Override
	public void actionPerformed(ActionEvent e)
	{
		if (e.getSource() == pcRadio ||
			e.getSource() == customFileRadio ||
			e.getSource() == customURLRadio)
		{
			pcCombo.setEnabled(pcRadio.isSelected());
			modelField.setEnabled(customFileRadio.isSelected());
			loadButton.setEnabled(customFileRadio.isSelected());
			urlField.setEnabled(customURLRadio.isSelected());
		}
		else if (e.getSource() == loadButton)
		{
			String current = modelField.getText();
			String initial = current.trim().length() > 0 ? current : ".";

			JFileChooser fc = new JFileChooser(initial);
			fc.setFileFilter(new FileNameExtensionFilter("BioPAX file (*.owl)", "owl"));
			if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
			{
				File file = fc.getSelectedFile();
				modelField.setText(file.getPath());
			}
		}
		else if (e.getSource() == patternCombo)
		{
			Miner m = (Miner) patternCombo.getSelectedItem();
			descArea.setText(m.getDescription());

			// Update output file name
			String text = outputField.getText();
			if (text.contains("/")) text = text.substring(0, text.lastIndexOf("/") + 1);
			else text = "";
			text += m.getName() + ".txt";
			outputField.setText(text);
		}
		else if (e.getSource() == runButton)
		{
			run();
		}

		checkRunButton();
	}
701375
public void actionChangeLinkTarget() throws JspException {

        try {
            // check the resource lock state
            checkLock(getParamResource());
            // change the link target
            CmsFile editFile = getCms().readFile(getParamResource());
            editFile.setContents(getParamLinkTarget().getBytes());
            getCms().writeFile(editFile);
            // close the dialog window
            actionCloseDialog();
        } catch (Throwable e) {
            // error changing link target, show error dialog
            setParamMessage(Messages.get().getBundle(getLocale()).key(Messages.ERR_CHANGE_LINK_TARGET_0));
            includeErrorpage(this, e);
        }
    }
1216386
public static void setFileHandler(Object target, Method fileHandler) {
        setHandler(new OSXAdapter("handleOpenFile", target, fileHandler) {
            // Override OSXAdapter.callTarget to send information on the
            // file to be opened
            public boolean callTarget(Object appleEvent) {
                if (appleEvent != null) {
                    try {
                        Method getFilenameMethod = appleEvent.getClass().getDeclaredMethod("getFilename", (Class[])null);
                        String filename = (String) getFilenameMethod.invoke(appleEvent, (Object[])null);
                        this.targetMethod.invoke(this.targetObject, new Object[] { filename });
                    } catch (Exception ex) {
                        
                    }
                }
                return true;
            }
        });
    }
3405
public void itemStateChangedHandler(ItemEvent e) {
		String valueName = (String) controlToValueName.get(e.getSource());
		LinearInterpolator value = (LinearInterpolator) valueMap.get(valueName);

		if (e.getStateChange() == ItemEvent.SELECTED) {
			value.setActive(true);
			editor.registerValue(value, valueName);
		} else {
			value.setActive(false);
			editor.removeValue(valueName);
		}
	}
519144
@Override
    public void processConfigurationChanges() {
        // The monitor ID is used to determine who is called to process file events.
        for (ServiceReference<FileMonitor> fm : fileMonitors.keySet()) {
            String monitorId = (String) fm.getProperty(com.ibm.ws.kernel.filemonitor.FileMonitor.MONITOR_IDENTIFICATION_NAME);
            if (monitorId != null && monitorId.equals("com.ibm.ws.kernel.monitor.config")) {
                fileMonitors.get(fm).processFileRefresh(false, null);
            }
        }
    }
82852
public void propertyChange(PropertyChangeEvent evt)
    {
        if (JCalendarPopup.DATE_PARAM.equalsIgnoreCase(evt.getPropertyName()))
            if (evt.getNewValue() instanceof java.util.Date)
        {
            this.setControlValue(evt.getNewValue());
        }
    }
1308944
@Override
    public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        if (cmd.equals("Cancel")) {
            setVisible(false);
            value = null;
        } else if (cmd.equals("Select")) {
            value = list.getSelectedValue();
            setVisible(false);
            swingGui.showFileWindow(value, -1);
        }
    }
634832
public void itemStateChanged(ItemEvent e) {

        String s = (String) e.getItem();

        for (int i = 0; i < sJDBCTypes.length; i++) {
            if (s.equals(sJDBCTypes[i][0])) {
                mDriver.setText(sJDBCTypes[i][1]);
                mURL.setText(sJDBCTypes[i][2]);
            }
        }
    }
844780
public void actionPerformed(ActionEvent e) {
        String cmd = e.getActionCommand();
        int returnValue = -1;
        if (cmd.equals("Cut") || cmd.equals("Copy") || cmd.equals("Paste")) {
            JInternalFrame f = getSelectedFrame();
            if (f != null && f instanceof ActionListener) {
                ((ActionListener)f).actionPerformed(e);
            }
        } else if (cmd.equals("Step Over")) {
            returnValue = Dim.STEP_OVER;
        } else if (cmd.equals("Step Into")) {
            returnValue = Dim.STEP_INTO;
        } else if (cmd.equals("Step Out")) {
            returnValue = Dim.STEP_OUT;
        } else if (cmd.equals("Go")) {
            returnValue = Dim.GO;
        } else if (cmd.equals("Break")) {
            dim.setBreak();
        } else if (cmd.equals("Exit")) {
            exit();
        } else if (cmd.equals("Open")) {
            String fileName = chooseFile("Select a file to compile");
            if (fileName != null) {
                String text = readFile(fileName);
                if (text != null) {
                    RunProxy proxy = new RunProxy(this, RunProxy.OPEN_FILE);
                    proxy.fileName = fileName;
                    proxy.text = text;
                    new Thread(proxy).start();
                }
            }
        } else if (cmd.equals("Load")) {
            String fileName = chooseFile("Select a file to execute");
            if (fileName != null) {
                String text = readFile(fileName);
                if (text != null) {
                    RunProxy proxy = new RunProxy(this, RunProxy.LOAD_FILE);
                    proxy.fileName = fileName;
                    proxy.text = text;
                    new Thread(proxy).start();
                }
            }
        } else if (cmd.equals("More Windows...")) {
            MoreWindows dlg = new MoreWindows(this, fileWindows,
                                              "Window", "Files");
            dlg.showDialog(this);
        } else if (cmd.equals("Console")) {
            if (console.isIcon()) {
                desk.getDesktopManager().deiconifyFrame(console);
            }
            console.show();
            desk.getDesktopManager().activateFrame(console);
            console.consoleTextArea.requestFocus();
        } else if (cmd.equals("Cut")) {
        } else if (cmd.equals("Copy")) {
        } else if (cmd.equals("Paste")) {
        } else if (cmd.equals("Go to function...")) {
            FindFunction dlg = new FindFunction(this, "Go to function",
                                                "Function");
            dlg.showDialog(this);
        } else if (cmd.equals("Go to line...")) {
            final String s = (String) JOptionPane.showInputDialog(
                    this,
                    "Line number",
                    "Go to line...",
                    JOptionPane.QUESTION_MESSAGE,
                    null,
                    null,
                    null);
            if (s == null || s.trim().length() == 0) {
                return;
            }
            try {
                final int line = Integer.parseInt(s);
                showFileWindow(null, line);
            }
            catch (final NumberFormatException nfe) {
                // ignore
            }
        } else if (cmd.equals("Tile")) {
            JInternalFrame[] frames = desk.getAllFrames();
            int count = frames.length;
            int rows, cols;
            rows = cols = (int)Math.sqrt(count);
            if (rows*cols < count) {
                cols++;
                if (rows * cols < count) {
                    rows++;
                }
            }
            Dimension size = desk.getSize();
            int w = size.width/cols;
            int h = size.height/rows;
            int x = 0;
            int y = 0;
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < cols; j++) {
                    int index = (i*cols) + j;
                    if (index >= frames.length) {
                        break;
                    }
                    JInternalFrame f = frames[index];
                    try {
                        f.setIcon(false);
                        f.setMaximum(false);
                    } catch (Exception exc) {
                    }
                    desk.getDesktopManager().setBoundsForFrame(f, x, y,
                                                               w, h);
                    x += w;
                }
                y += h;
                x = 0;
            }
        } else if (cmd.equals("Cascade")) {
            JInternalFrame[] frames = desk.getAllFrames();
            int count = frames.length;
            int x, y, w, h;
            x = y = 0;
            h = desk.getHeight();
            int d = h / count;
            if (d > 30) d = 30;
            for (int i = count -1; i >= 0; i--, x += d, y += d) {
                JInternalFrame f = frames[i];
                try {
                    f.setIcon(false);
                    f.setMaximum(false);
                } catch (Exception exc) {
                }
                Dimension dimen = f.getPreferredSize();
                w = dimen.width;
                h = dimen.height;
                desk.getDesktopManager().setBoundsForFrame(f, x, y, w, h);
            }
        } else {
            Object obj = getFileWindow(cmd);
            if (obj != null) {
                FileWindow w = (FileWindow)obj;
                try {
                    if (w.isIcon()) {
                        w.setIcon(false);
                    }
                    w.setVisible(true);
                    w.moveToFront();
                    w.setSelected(true);
                } catch (Exception exc) {
                }
            }
        }
        if (returnValue != -1) {
            updateEnabled(false);
            dim.setReturnValue(returnValue);
        }
    }
640136
@SuppressWarnings("unchecked")
    private void invokePartitionChangeListener() {
        if (!triggerListeners.isEmpty()) {
            Map<PartitionEntry, Integer> current = (Map<PartitionEntry, Integer>) partitionCache.get(CURRENT);
            Map<PartitionEntry, Integer> previous = (Map<PartitionEntry, Integer>) partitionCache.get(PREVIOUS);

            Map<String, List<String>> partition = getNodePartition(current, currentNode);
            Map<String, Map<String, List<String>>> addedRemoved =
                    getAddedRemovedPartition(previous, current, currentNode);
            if (log.isDebugEnabled()) {
                log.debug("Invoke a Change Listener");
                log.debugf("Previous: %s", previous);
                log.debugf("Current: %s", current);
                log.debugf("Partition: %s", partition);
                log.debugf("Added: %s", addedRemoved.get("added"));
                log.debugf("Removed: %s", addedRemoved.get("removed"));
            }
            triggerListeners.stream().forEach(triggerListener -> {
                triggerListener.onPartitionChange(partition, addedRemoved.get("removed"), addedRemoved.get("added"));
            });
        }
    }
1349129
public void stateChanged (ChangeEvent e)
    {
        JSlider source = (JSlider)e.getSource();
        if (!source.getValueIsAdjusting()) {
            _value.setText(Integer.toString(source.getValue()));
        }
    }
6022
@Override
  public void actionPerformed(ActionEvent e) {
    // Use a new JFileChooser. Inconsistent behaviour otherwise!
    final JFileChooser fc = new JFileChooser(new File("."));
    if(param.isDefined()) {
      fc.setSelectedFile(param.getValue());
    }

    if(e.getSource() == button) {
      int returnVal = fc.showOpenDialog(button);
      if(returnVal == JFileChooser.APPROVE_OPTION) {
        textfield.setText(fc.getSelectedFile().getPath());
        fireValueChanged();
      }
      // else: do nothing on cancel.
    }
    else if(e.getSource() == textfield) {
      fireValueChanged();
    }
    else {
      LoggingUtil.warning("actionPerformed triggered by unknown source: " + e.getSource());
    }
  }