congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IntegerDocument
Code IndexAdd Tabnine to your IDE (free)

How to use
IntegerDocument
in
org.jfree.ui

Best Java code snippets using org.jfree.ui.IntegerDocument (Showing top 7 results out of 315)

origin: stackoverflow.com

 public static class IntegerField extends JTextField {
  public IntegerField(String txt) {
    super(txt);
    setDocument(new IntegerDocument());
  }

  public int getInt() {
    return this.getText().equals("") ? 0 : Integer.parseInt(this.getText());        
  }
}
origin: org.jfree/jcommon

/**
 * Inserts a string.
 *
 * @param i  i.
 * @param s  s.
 * @param attributes  the attributes.
 *
 * @throws BadLocationException ??
 */
public void insertString(final int i, final String s, final AttributeSet attributes)
  throws BadLocationException {
  super.insertString(i, s, attributes);
  if (s != null && (!s.equals("-") || i != 0 || s.length() >= 2)) {
    try {
      Integer.parseInt(getText(0, getLength()));
    }
    catch (NumberFormatException e) {
      remove(i, s.length());
    }
  }
}
origin: jfree/jcommon

/**
 * Inserts a string.
 *
 * @param i  i.
 * @param s  s.
 * @param attributes  the attributes.
 *
 * @throws BadLocationException ??
 */
public void insertString(final int i, final String s, final AttributeSet attributes)
  throws BadLocationException {
  super.insertString(i, s, attributes);
  if (s != null && (!s.equals("-") || i != 0 || s.length() >= 2)) {
    try {
      Integer.parseInt(getText(0, getLength()));
    }
    catch (NumberFormatException e) {
      remove(i, s.length());
    }
  }
}
origin: org.jfree/com.springsource.org.jfree

current = (current == null) ? new Insets(0, 0, 0, 0) : current;
this.topValueEditor = new JTextField(new IntegerDocument(), "" 
    + current.top, 0);
this.leftValueEditor = new JTextField(new IntegerDocument(), "" 
    + current.left, 0);
this.bottomValueEditor = new JTextField(new IntegerDocument(), "" 
    + current.bottom, 0);
this.rightValueEditor = new JTextField(new IntegerDocument(), "" 
    + current.right, 0);
origin: org.jfree/com.springsource.org.jfree

/**
 * Inserts a string.
 *
 * @param i  i.
 * @param s  s.
 * @param attributes  the attributes.
 *
 * @throws BadLocationException ??
 */
public void insertString(final int i, final String s, final AttributeSet attributes)
  throws BadLocationException {
  super.insertString(i, s, attributes);
  if (s != null && (!s.equals("-") || i != 0 || s.length() >= 2)) {
    try {
      Integer.parseInt(getText(0, getLength()));
    }
    catch (NumberFormatException e) {
      remove(i, s.length());
    }
  }
}
origin: jfree/jcommon

current = (current == null) ? new Insets(0, 0, 0, 0) : current;
this.topValueEditor = new JTextField(new IntegerDocument(), ""
    + current.top, 0);
this.leftValueEditor = new JTextField(new IntegerDocument(), ""
    + current.left, 0);
this.bottomValueEditor = new JTextField(new IntegerDocument(), ""
    + current.bottom, 0);
this.rightValueEditor = new JTextField(new IntegerDocument(), ""
    + current.right, 0);
origin: org.jfree/jcommon

current = (current == null) ? new Insets(0, 0, 0, 0) : current;
this.topValueEditor = new JTextField(new IntegerDocument(), ""
    + current.top, 0);
this.leftValueEditor = new JTextField(new IntegerDocument(), ""
    + current.left, 0);
this.bottomValueEditor = new JTextField(new IntegerDocument(), ""
    + current.bottom, 0);
this.rightValueEditor = new JTextField(new IntegerDocument(), ""
    + current.right, 0);
org.jfree.uiIntegerDocument

Javadoc

A document for editing integers.

Most used methods

  • <init>
  • getLength
  • getText
  • remove

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • getSystemService (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now