|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.TransferHandler
jigcell.compare.impl.Transferer
jigcell.compare.impl.DataSource
jigcell.compare.data.DataGenerator
jigcell.compare.data.EditableDataGenerator
public class EditableDataGenerator
Implementation of DataGenerator that supports editing the generator fields. The default element type of an EditableDataGenerator is a SparseTreeDataElement.
This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.
| Nested Class Summary | |
|---|---|
protected static class |
EditableDataGenerator.EditableDataGeneratorDelegate
Persist the generator using the setElement method with a flat string rather than trying to expand the element. |
| Nested classes/interfaces inherited from interface jigcell.compare.IDataSource |
|---|
IDataSource.Option |
| Field Summary | |
|---|---|
private IDataElement |
element
Cached version of the associated element |
| Fields inherited from class jigcell.compare.data.DataGenerator |
|---|
COMPARATOR_NAME, DESCRIPTION_READ, SEPARATOR_ESCAPE, SPECIAL_CHARS |
| Fields inherited from class jigcell.compare.impl.DataSource |
|---|
OPTIONS_LOCK, SEPARATOR_PAIR, SEPARATOR_PART, SEPARATORS |
| Fields inherited from class jigcell.compare.impl.Transferer |
|---|
CSV_FOOTER, CSV_LINEPOSTPEND, CSV_LINEPREPEND, CSV_LINESEPARATOR, HTML_FOOTER, HTML_HEADPOSTPEND, HTML_HEADPREPEND, HTML_HEADSEPARATOR, HTML_LINEPOSTPEND, HTML_LINEPREPEND, HTML_LINESEPARATOR |
| Fields inherited from class javax.swing.TransferHandler |
|---|
COPY, COPY_OR_MOVE, MOVE, NONE |
| Fields inherited from interface jigcell.compare.IDataGenerator |
|---|
ATTRIBUTE_COMMENT, ATTRIBUTE_GUID, PROPERTY_GENERATOR_EDIT, RESOURCE_GENERATORS |
| Fields inherited from interface jigcell.compare.IReadableDataSource |
|---|
OPTION_READDESCRIPTION, OPTION_READICON |
| Fields inherited from interface jigcell.compare.IDataSource |
|---|
OPTION_NAME |
| Fields inherited from interface jigcell.compare.IWriteableDataSource |
|---|
OPTION_WRITEDESCRIPTION, OPTION_WRITEICON |
| Constructor Summary | |
|---|---|
EditableDataGenerator()
Creates a new data generator that supports editing. |
|
EditableDataGenerator(IDataElement element)
Creates a new data generator that supports editing. |
|
| Method Summary | |
|---|---|
void |
clear()
Nulls out the stored element. |
IDataElement |
getElement()
A DataElement corresponding to this object. This may be a potentially expensive operation if isCached is false. |
boolean |
getPredictedCompatibility(java.lang.Class clazz)
A prediction on whether this data source can hold a particular type. |
boolean |
getPredictedCompatibility(java.lang.Object instance)
A prediction on whether this data source can hold a particular type. |
boolean |
isCached()
Whether a cached value of the corresponding DataElement exists. |
boolean |
isSet()
Whether this generator has a set value. |
boolean |
setAttribute(java.lang.String key,
java.lang.String value)
Sets a permanent attribute of this generator. |
void |
setComment(java.lang.String displayableComment)
Sets the displayable description. |
void |
setElement(IDataElement element)
Sets the associated data element. |
void |
setElement(java.lang.String text)
Creates a new associated data element and initializes it with the given text. |
boolean |
setOption(java.lang.String key,
java.lang.Object value)
Sets a configuration optoin. Returns whether the configuration was changed. |
void |
setState(java.lang.String state)
Completely replaces the previous configuration of this data source. |
void |
write(java.lang.Object data)
Writes data to the source destroying the previous contents if multiple objects are not supported. |
| Methods inherited from class jigcell.compare.data.DataGenerator |
|---|
clone, compareByName, copy, copy, generateGUID, getAttribute, getComment, getCopiedFrom, getName, getPredictedContents, getTransferData, initializeSource, isCopy, isCopyRelated, read, setCopyName, setName, toString |
| Methods inherited from class jigcell.compare.impl.Transferer |
|---|
addExtension, addFlavor, createCSVTable, createFormattedTable, createHTMLTable, getExceptionRecorder, getExpectedClasses, getExpectedClasses, getExpectedClasses, getFlavors, getFlavors, getPreferredExtensions, getPreferredExtensions, getTransferClass, getTransferDataFlavors, getTransferFlavor, isDataFlavorSupported, transfer |
| Methods inherited from class javax.swing.TransferHandler |
|---|
canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getSourceActions, getVisualRepresentation, importData |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jigcell.compare.IEditableDataGenerator |
|---|
setCopyName, setName |
| Methods inherited from interface jigcell.compare.IDataGenerator |
|---|
copy, getAttribute, getComment, getCopiedFrom, isCopy, isCopyRelated |
| Methods inherited from interface jigcell.compare.IReadableDataSource |
|---|
getPredictedContents, getReadDescriptionOption, getReadIconOption, read, setReadDescriptionOption, setReadIconOption |
| Methods inherited from interface jigcell.compare.IDataSource |
|---|
addOption, clone, configure, getName, getOption, getState |
| Methods inherited from interface java.awt.datatransfer.Transferable |
|---|
getTransferData, getTransferDataFlavors, isDataFlavorSupported |
| Methods inherited from interface jigcell.compare.IWriteableDataSource |
|---|
getWriteDescriptionOption, getWriteIconOption, setWriteDescriptionOption, setWriteIconOption |
| Field Detail |
|---|
private transient IDataElement element
| Constructor Detail |
|---|
public EditableDataGenerator()
public EditableDataGenerator(IDataElement element)
element - Element to link to| Method Detail |
|---|
public void clear()
clear in interface IEditableDataGeneratorpublic IDataElement getElement()
getElement in interface IDataGeneratorgetElement in class DataGeneratorpublic boolean getPredictedCompatibility(java.lang.Class clazz)
getPredictedCompatibility in interface IWriteableDataSourceclazz - Typepublic boolean getPredictedCompatibility(java.lang.Object instance)
getPredictedCompatibility in interface IWriteableDataSourceinstance - Typepublic boolean isCached()
isCached in interface IDataGeneratorpublic boolean isSet()
public boolean setAttribute(java.lang.String key,
java.lang.String value)
setAttribute in interface IDataGeneratorkey - Attribute namevalue - New attribute valuepublic void setComment(java.lang.String displayableComment)
setComment in interface IEditableDataGeneratordisplayableComment - Descriptionpublic void setElement(IDataElement element)
setElement in interface IEditableDataGeneratorelement - Elementpublic void setElement(java.lang.String text)
text - Textual representation of an element
public boolean setOption(java.lang.String key,
java.lang.Object value)
setOption in interface IDataSourcesetOption in class DataSourcekey - Option namevalue - Option valuepublic void setState(java.lang.String state)
setState in interface IDataSourcesetState in class DataSourcestate - State
public void write(java.lang.Object data)
throws java.lang.Exception
write in interface IWriteableDataSourcedata - Data
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||