Ontimize 5.2072EN

com.ontimize.gui.field.document
Class ColorDocument

java.lang.Object
  extended byjavax.swing.text.AbstractDocument
      extended byjavax.swing.text.PlainDocument
          extended bycom.ontimize.gui.field.document.ColorDocument
All Implemented Interfaces:
javax.swing.text.Document, java.io.Serializable

public class ColorDocument
extends javax.swing.text.PlainDocument

See Also:
Serialized Form

Nested Class Summary
 
Nested classes 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
protected  java.awt.Color colorValue
           
static int DCS2
           
static int DCS3
           
static int RETURN_COLOR
           
static int RETURN_HEX_STRING
           
static int RETURN_INTEGER
           
static int RETURN_NUMBER
           
static int RETURN_RGB_STRING
           
protected  int returnMode
           
 
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
 
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
 
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
 
Constructor Summary
ColorDocument(int returnType)
           
 
Method Summary
static int colorToInt(java.awt.Color color)
           
 java.awt.Color getColorValue()
           
 java.lang.String getHEXStringValue()
           
protected  java.lang.String getInsertTextResult(int offset, java.lang.String string)
           
 java.lang.Integer getIntegerValue()
           
 java.lang.Number getNumericalValue()
           
protected  java.lang.String getRemoveTextResult(int offset, int length)
           
 java.lang.String getRGBStringValue()
           
protected static int getSemicolonNumber(java.lang.String text)
           
 java.lang.Object getValue()
           
 void insertString(int offset, java.lang.String string, javax.swing.text.AttributeSet attributes)
           
static java.awt.Color intToColor(int num)
           
protected  java.awt.Color parseText(java.lang.String text)
           
 void remove(int offset, int length)
           
 void setColorValue(java.awt.Color color)
           
 void setIntegerValue(java.lang.Integer rgb)
           
 void setNumberValue(java.lang.Number colorNumber)
           
 void setStringValue(java.lang.String colorString)
           
 void setValue(java.lang.Object value)
           
 
Methods inherited from class javax.swing.text.PlainDocument
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertUpdate, removeUpdate
 
Methods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colorValue

protected java.awt.Color colorValue

returnMode

protected int returnMode

RETURN_COLOR

public static final int RETURN_COLOR
See Also:
Constant Field Values

RETURN_RGB_STRING

public static final int RETURN_RGB_STRING
See Also:
Constant Field Values

RETURN_HEX_STRING

public static final int RETURN_HEX_STRING
See Also:
Constant Field Values

RETURN_NUMBER

public static final int RETURN_NUMBER
See Also:
Constant Field Values

RETURN_INTEGER

public static final int RETURN_INTEGER
See Also:
Constant Field Values

DCS2

public static final int DCS2

DCS3

public static final int DCS3
Constructor Detail

ColorDocument

public ColorDocument(int returnType)
Method Detail

insertString

public void insertString(int offset,
                         java.lang.String string,
                         javax.swing.text.AttributeSet attributes)
                  throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

getInsertTextResult

protected java.lang.String getInsertTextResult(int offset,
                                               java.lang.String string)

remove

public void remove(int offset,
                   int length)
            throws javax.swing.text.BadLocationException
Throws:
javax.swing.text.BadLocationException

getRemoveTextResult

protected java.lang.String getRemoveTextResult(int offset,
                                               int length)

parseText

protected java.awt.Color parseText(java.lang.String text)

getSemicolonNumber

protected static int getSemicolonNumber(java.lang.String text)

getValue

public java.lang.Object getValue()

getColorValue

public java.awt.Color getColorValue()

getRGBStringValue

public java.lang.String getRGBStringValue()

getHEXStringValue

public java.lang.String getHEXStringValue()

getNumericalValue

public java.lang.Number getNumericalValue()

getIntegerValue

public java.lang.Integer getIntegerValue()

setValue

public void setValue(java.lang.Object value)

setColorValue

public void setColorValue(java.awt.Color color)

setStringValue

public void setStringValue(java.lang.String colorString)

setNumberValue

public void setNumberValue(java.lang.Number colorNumber)

setIntegerValue

public void setIntegerValue(java.lang.Integer rgb)

colorToInt

public static int colorToInt(java.awt.Color color)

intToColor

public static java.awt.Color intToColor(int num)

Ontimize