com.ontimize.gui.field.document
Class ColorDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
com.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 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 |
| 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 |
| 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 |
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
ColorDocument
public ColorDocument(int returnType)
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)