Java 类java.awt.event.TextEvent 实例源码

项目:OpenJSharp    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getDelegate().getView().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:OpenJSharp    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:OpenJSharp    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:jdk8u-jdk    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:jdk8u-jdk    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:jdk8u-jdk    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:openjdk-jdk10    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:openjdk-jdk10    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:openjdk-jdk10    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:openjdk9    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:openjdk9    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:openjdk9    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:jdk8u_jdk    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:jdk8u_jdk    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:jdk8u_jdk    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:lookaside_java-1.8.0-openjdk    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:lookaside_java-1.8.0-openjdk    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:infobip-open-jdk-8    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getDelegate().getView().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:infobip-open-jdk-8    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:infobip-open-jdk-8    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:jdk8u-dev-jdk    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getDelegate().getView().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:jdk8u-dev-jdk    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:jdk8u-dev-jdk    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:jdk7-jdk    文件:XTextFieldPeer.java   
protected boolean setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
    return true;
}
项目:openjdk-source-code-learn    文件:XTextFieldPeer.java   
protected boolean setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
    return true;
}
项目:OLD-OpenJDK8    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getDelegate().getView().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:OLD-OpenJDK8    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String text) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(text);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:OLD-OpenJDK8    文件:XTextFieldPeer.java   
private void setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
}
项目:cn1    文件:TextComponent.java   
protected void processTextEvent(TextEvent e) {
    for (TextListener listener : textListeners.getUserListeners()) {
        switch (e.getID()) {
            case TextEvent.TEXT_VALUE_CHANGED:
                listener.textValueChanged(e);
                break;
        }
    }
}
项目:openjdk-jdk7u-jdk    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getDelegate().getView().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:openjdk-jdk7u-jdk    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String l) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(l);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:openjdk-jdk7u-jdk    文件:XTextFieldPeer.java   
protected boolean setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
    return true;
}
项目:SPIM_Registration    文件:GenericLoadParseQueryXML.java   
protected void addListeners( final GenericDialog gd, final TextField tf, final Label label1, final Label label2  )
{
    final GenericLoadParseQueryXML< ?,?,?,?,?,? > lpq = this;

    // using TextListener instead
    tf.addTextListener( new TextListener()
    {   
        @Override
        public void textValueChanged( final TextEvent t )
        {
            if ( t.getID() == TextEvent.TEXT_VALUE_CHANGED )
            {
                final String xmlFilename = tf.getText();

                // try parsing if it ends with XML
                tryParsing( xmlFilename, false );

                label1.setText( lpq.message1 );
                label2.setText( lpq.message2 );
                label1.setForeground( lpq.color );
                label2.setForeground( lpq.color );
            }
        }
    });
}
项目:openjdk-icedtea7    文件:LWTextAreaPeer.java   
@Override
public void replaceRange(final String text, final int start,
                         final int end) {
    synchronized (getDelegateLock()) {
        // JTextArea.replaceRange() posts two different events.
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.replaceRange() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getDelegate().getView().replaceRange(text, start, end);
        revalidate();
        postEvent(new TextEvent(getTarget(), TextEvent.TEXT_VALUE_CHANGED));
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:openjdk-icedtea7    文件:LWTextComponentPeer.java   
@Override
public final void setText(final String l) {
    synchronized (getDelegateLock()) {
        // JTextArea.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextArea.setText() is called.
        final Document document = getTextComponent().getDocument();
        document.removeDocumentListener(this);
        getTextComponent().setText(l);
        revalidate();
        if (firstChangeSkipped) {
            postEvent(new TextEvent(getTarget(),
                                    TextEvent.TEXT_VALUE_CHANGED));
        }
        document.addDocumentListener(this);
    }
    repaintPeer();
}
项目:openjdk-icedtea7    文件:XTextFieldPeer.java   
protected boolean setXAWTTextField(String txt) {
    text = txt;
    if (xtext != null)  {
        // JTextField.setText() posts two different events (remove & insert).
        // Since we make no differences between text events,
        // the document listener has to be disabled while
        // JTextField.setText() is called.
        xtext.getDocument().removeDocumentListener(xtext);
        xtext.setText(txt);
        if (firstChangeSkipped) {
            postEvent(new TextEvent(target, TextEvent.TEXT_VALUE_CHANGED));
        }
        xtext.getDocument().addDocumentListener(xtext);
        xtext.setCaretPosition(0);
    }
    return true;
}
项目:Chromaseq    文件:SequenceNameFromTabbedFile.java   
public void textValueChanged(TextEvent e) {
    if (e.getSource().equals(sampleCodeFilePathField)) {
        sampleCodeListPath = sampleCodeFilePathField.getText();
        if (StringUtil.notEmpty(sampleCodeListPath)) {
            chosenNameCategory=-1;
        //  scanTabbedDocument();
            scanTabbedDocument();
        //  processNameCategories();
            //initialize(sampleCodeListPath);
        }   
        categoryChoice.removeAll();
        if (nameCategories!=null) {         
            for (int i=0; i<nameCategories.length; i++) 
                if (!StringUtil.blank(nameCategories[i])) {
                    categoryChoice.add(nameCategories[i]);
                }
        }
        categoryChoice.repaint();
        //              categoryChoice = dialog.addPopUpMenu("Names to use:", xmlProcessor.getNameCategoryDescriptions(), tagNumber);

    }
}
项目:Chromaseq    文件:SequenceNameFromXMLFile.java   
public void textValueChanged(TextEvent e) {
    if (e.getSource().equals(sampleCodeFilePathField)) {
        sampleCodeListPath = sampleCodeFilePathField.getText();
        if (StringUtil.notEmpty(sampleCodeListPath)) {
            initialize(sampleCodeListPath);
        }   
        categoryChoice.removeAll();
        if (xmlProcessor.isValid()) {           
            String[] choices = xmlProcessor.getNameCategoryDescriptions();
            for (int i=0; i<choices.length; i++) 
                if (!StringUtil.blank(choices[i])) {
                    categoryChoice.add(choices[i]);
                }
        }
        categoryChoice.repaint();
        //              categoryChoice = dialog.addPopUpMenu("Names to use:", xmlProcessor.getNameCategoryDescriptions(), tagNumber);

    }
}
项目:TrakEM2    文件:Display.java   
@Override
      public void textValueChanged(final TextEvent e) {
    try {
        final TextField source = (TextField) e.getSource();
        if (scale == source && (scale.isFocusOwner() || bar.isFocusOwner())) {
            final double sc = Double.parseDouble(scale.getText()) / 100;
            // update both
            width.setText(Integer.toString((int) (sc * initial_width + 0.5)));
            height.setText(Integer.toString((int) (sc * initial_height + 0.5)));
        } else if (width == source && width.isFocusOwner()) {
            /*
            final int width = Integer.toString((int) (width.getText() + 0.5));
            final double sc = width / (double)initial_width;
            scale.setText(Integer.toString((int)(sc * 100 + 0.5)));
            height.setText(Integer.toString((int)(sc * initial_height + 0.5)));
            */
            set(width, height, initial_width, initial_height);
        } else if (height == source && height.isFocusOwner()) {
            set(height, width, initial_height, initial_width);
        }
    } catch (final NumberFormatException nfe) {
        Utils.logAll("Unparsable number: " + nfe.getMessage());
    } catch (final Exception ee) {
        IJError.print(ee);
    }
}