Example usage for java.awt.event TextEvent getSource

List of usage examples for java.awt.event TextEvent getSource

Introduction

In this page you can find the example usage for java.awt.event TextEvent getSource.

Prototype

public Object getSource() 

Source Link

Document

The object on which the Event initially occurred.

Usage

From source file:tracing.ShollAnalysisDialog.java

public void textValueChanged(TextEvent e) {
    Object source = e.getSource();
    if (source == sampleSeparation) {
        String sampleSeparationText = sampleSeparation.getText();
        float s;//from  w  ww  .  ja  v  a 2s .  c o  m
        try {
            s = Float.parseFloat(sampleSeparationText);
        } catch (NumberFormatException nfe) {
            return;
        }
        if (s >= 0)
            updateResults();
    }
}

From source file:gdsc.smlm.ij.plugins.PeakFit.java

public void textValueChanged(TextEvent e) {
    if (e.getSource() == textConfigFile) {
        refreshSettings(textConfigFile.getText());
    }
}