logo


math
Class ExpressionFormatter

java.lang.Object
  extended by javax.swing.JFormattedTextField.AbstractFormatter
      extended by math.ExpressionFormatter
All Implemented Interfaces:
java.io.Serializable

public class ExpressionFormatter
extends javax.swing.JFormattedTextField.AbstractFormatter

Text formatter for real-valued expressions

This text formatter rejects expressions containing variables or complex numbers

See Also:
Serialized Form

Constructor Summary
ExpressionFormatter()
 
Method Summary
 java.lang.Object stringToValue(java.lang.String text)
 java.lang.String valueToString(java.lang.Object value)
 
Methods inherited from class javax.swing.JFormattedTextField.AbstractFormatter
clone, getActions, getDocumentFilter, getFormattedTextField, getNavigationFilter, install, invalidEdit, setEditValid, uninstall
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionFormatter

public ExpressionFormatter()
Method Detail

stringToValue

public java.lang.Object stringToValue(java.lang.String text)
                               throws java.text.ParseException
Specified by:
stringToValue in class javax.swing.JFormattedTextField.AbstractFormatter
Parameters:
text -
Returns:
Throws:
java.text.ParseException

valueToString

public java.lang.String valueToString(java.lang.Object value)
                               throws java.text.ParseException
Specified by:
valueToString in class javax.swing.JFormattedTextField.AbstractFormatter
Parameters:
value -
Returns:
Throws:
java.text.ParseException