Package javax.swing.text

Examples of javax.swing.text.PlainDocument


  private static final long serialVersionUID = 0L;
 
  public ParameterEditor() {
    this.edtParameter = new JTextField(20);
    this.edtParameter.setDocument(new PlainDocument());

        GridBagLayout gbl = new GridBagLayout();
        GridBagConstraints gbc = new GridBagConstraints();
        this.setLayout(gbl);
       
View Full Code Here


     */
    public static void bind(
            JTextComponent textComponent,
            ValueModel valueModel,
            boolean commitOnFocusLost) {
        bind(textComponent, valueModel, new PlainDocument(), commitOnFocusLost);
    }
View Full Code Here

     *     <code>false</code> to retain them
     *    
     * @throws NullPointerException  if the subject is <code>null</code>
     */
    public DocumentAdapter(ValueModel subject, boolean filterNewlines) {
        this(subject, new PlainDocument(), filterNewlines);
    }
View Full Code Here

     */
    public static void bind(
            JTextComponent textComponent,
            ValueModel valueModel,
            boolean commitOnFocusLost) {
        bind(textComponent, valueModel, new PlainDocument(), commitOnFocusLost);
    }
View Full Code Here

     * @param subject   the underlying String typed ValueModel
     *
     * @throws NullPointerException  if the subject is <code>null</code>
     */
    public DocumentAdapter(ValueModel subject) {
        this(subject, new PlainDocument(), false);
    }
View Full Code Here

     *     <code>false</code> to retain them
     *    
     * @throws NullPointerException  if the subject is <code>null</code>
     */
    public DocumentAdapter(ValueModel subject, boolean filterNewlines) {
        this(subject, new PlainDocument(), filterNewlines);
    }
View Full Code Here

     *     <code>false</code> to retain them
     *    
     * @throws NullPointerException  if the subject is <code>null</code>
     */
    public DocumentAdapter(ValueModel subject, boolean filterNewlines) {
        this(subject, new PlainDocument(), filterNewlines);
    }
View Full Code Here

      if (this.passwordDataFieldOriginal.getDocument() instanceof FixedLengthDocument) {
        FixedLengthDocument doc = (FixedLengthDocument)this.passwordDataFieldOriginal.getDocument();
        this.passwordDataFieldCloned.setDocument(new FixedLengthDocument(doc.getMaxLength()));
      }
      else {
        this.passwordDataFieldCloned.setDocument(new PlainDocument()); // we can't reuse the document
      }
    this.passwordDataFieldCloned.getCaret().setVisible(false);
    }
View Full Code Here

      if (this.dataFieldOriginal.getDocument() instanceof FixedLengthDocument) {
        FixedLengthDocument doc = (FixedLengthDocument)this.dataFieldOriginal.getDocument();
        this.dataFieldCloned.setDocument(new FixedLengthDocument(doc.getMaxLength()));
      }
      else {
        this.dataFieldCloned.setDocument(new PlainDocument()); // we can't reuse the document
      }
      this.dataFieldCloned.setFormatterFactory(new DataFieldFormatterFactory()); // we can't reuse the formatter
      // TF:29 Oct 2008:removed the caret
    this.dataFieldCloned.getCaret().setVisible(false);
   
View Full Code Here

    textArea.setText("TextComponent Text");
    getRobot().waitForIdle();
    verify(observer, times(1)).valueChanged(eq("TextComponent Text"), any(String.class));
    StringContent content = new StringContent();
    content.insertString(0, "TextComponent new Document");
    textArea.setDocument(new PlainDocument(content));
    getRobot().waitForIdle();
    verify(observer, times(1)).valueChanged(eq("TextComponent new Document"), any(String.class));
  }
View Full Code Here

TOP

Related Classes of javax.swing.text.PlainDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.