net.sourceforge.fixagora.basis.client.view.document
Class FractionalTextFieldDocument

java.lang.Object
  extended by javax.swing.text.AbstractDocument
      extended by javax.swing.text.PlainDocument
          extended by net.sourceforge.fixagora.basis.client.view.document.AbstractNumberDocument
              extended by net.sourceforge.fixagora.basis.client.view.document.FractionalTextFieldDocument
All Implemented Interfaces:
java.io.Serializable, javax.swing.text.Document

public class FractionalTextFieldDocument
extends AbstractNumberDocument

The Class FractionalTextFieldDocument.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
 
Field Summary
 
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields inherited from class javax.swing.text.AbstractDocument
BidiElementName, ContentElementName, ElementNameAttribute, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
FractionalTextFieldDocument(javax.swing.JTextField jTextField)
          Instantiates a new fractional text field document.
 
Method Summary
 DollarFraction getDollarFraction()
          Gets the dollar fraction.
 void insertString(int offset, java.lang.String originalText, javax.swing.text.AttributeSet attributeSet)
           
 void remove(int offs, int len)
           
 void removeListener()
          Removes the listener.
 void replace(int offset, int length, java.lang.String text, javax.swing.text.AttributeSet attrs)
           
 void setDecimalPlaces(int decimalPlaces)
          Sets the decimal places.
 void setLeadingZeros(int leadingZeros)
          Sets the leading zeros.
 void setMinValue(java.lang.Double minValue)
          Sets the min value.
 void setThousandsSeparator(boolean thousandsSeparator)
          Sets the thousands separator.
 void setTickSize(double tickSize)
          Sets the tick size.
 
Methods inherited from class javax.swing.text.PlainDocument
getDefaultRootElement, getParagraphElement
 
Methods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createPosition, dump, getAsynchronousLoadPriority, getBidiRootElement, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, putProperty, readLock, readUnlock, removeDocumentListener, removeUndoableEditListener, render, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FractionalTextFieldDocument

public FractionalTextFieldDocument(javax.swing.JTextField jTextField)
Instantiates a new fractional text field document.

Parameters:
jTextField - the j text field
Method Detail

setLeadingZeros

public void setLeadingZeros(int leadingZeros)
Description copied from class: AbstractNumberDocument
Sets the leading zeros.

Specified by:
setLeadingZeros in class AbstractNumberDocument
Parameters:
leadingZeros - the new leading zeros

setThousandsSeparator

public void setThousandsSeparator(boolean thousandsSeparator)
Description copied from class: AbstractNumberDocument
Sets the thousands separator.

Specified by:
setThousandsSeparator in class AbstractNumberDocument
Parameters:
thousandsSeparator - the new thousands separator

setMinValue

public void setMinValue(java.lang.Double minValue)
Description copied from class: AbstractNumberDocument
Sets the min value.

Specified by:
setMinValue in class AbstractNumberDocument
Parameters:
minValue - the new min value

setDecimalPlaces

public void setDecimalPlaces(int decimalPlaces)
Description copied from class: AbstractNumberDocument
Sets the decimal places.

Specified by:
setDecimalPlaces in class AbstractNumberDocument
Parameters:
decimalPlaces - the new decimal places

insertString

public void insertString(int offset,
                         java.lang.String originalText,
                         javax.swing.text.AttributeSet attributeSet)
                  throws javax.swing.text.BadLocationException
Specified by:
insertString in interface javax.swing.text.Document
Overrides:
insertString in class javax.swing.text.PlainDocument
Throws:
javax.swing.text.BadLocationException

replace

public void replace(int offset,
                    int length,
                    java.lang.String text,
                    javax.swing.text.AttributeSet attrs)
             throws javax.swing.text.BadLocationException
Overrides:
replace in class javax.swing.text.AbstractDocument
Throws:
javax.swing.text.BadLocationException

remove

public void remove(int offs,
                   int len)
            throws javax.swing.text.BadLocationException
Specified by:
remove in interface javax.swing.text.Document
Overrides:
remove in class javax.swing.text.AbstractDocument
Throws:
javax.swing.text.BadLocationException

setTickSize

public void setTickSize(double tickSize)
Description copied from class: AbstractNumberDocument
Sets the tick size.

Specified by:
setTickSize in class AbstractNumberDocument
Parameters:
tickSize - the new tick size

getDollarFraction

public DollarFraction getDollarFraction()
Gets the dollar fraction.

Returns:
the dollar fraction

removeListener

public void removeListener()
Description copied from class: AbstractNumberDocument
Removes the listener.

Specified by:
removeListener in class AbstractNumberDocument