|
||||||||||
| 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
public abstract class DataGenerator
A default implementation of DataGenerator.
This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface jigcell.compare.IDataSource |
|---|
IDataSource.Option |
| Field Summary | |
|---|---|
static java.util.Comparator |
COMPARATOR_NAME
Sorts data generators by name in alphabetical order. |
private DataGenerator |
copiedFrom
Generator this was copied from |
private boolean |
copyName
Whether to link the name of this generator with the one it was copied from |
protected static java.lang.String |
DESCRIPTION_READ
Read operation description |
static java.lang.String |
SEPARATOR_ESCAPE
Separator for escaped values |
static char[] |
SPECIAL_CHARS
Characters that should not be used in a name |
| 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 |
| Constructor Summary | |
|---|---|
DataGenerator()
Creates a new data generator. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
A copy of this data source. |
static int |
compareByName(java.lang.Object generator1,
java.lang.Object generator2)
Compares two data generators by name. |
IDataGenerator |
copy(boolean shallow)
An equivalent copy of this generator. |
protected void |
copy(boolean shallow,
IDataGenerator target)
Copies state for this generator. |
protected java.lang.String |
generateGUID()
Generates a guid based on this instance. |
java.lang.String |
getAttribute(java.lang.String key)
A keyed attribute that must be persisted with this generator. |
java.lang.String |
getComment()
A comment suitable for display to the user. |
IDataGenerator |
getCopiedFrom()
The generator this was copied from or null if this is not a copy. |
IDataElement |
getElement()
A DataElement corresponding to this object. |
java.lang.String |
getName()
The name of this data source. |
java.lang.Class |
getPredictedContents()
A prediction on the type of data this source contains. |
java.lang.Object |
getTransferData(java.awt.datatransfer.DataFlavor flavor)
A transferable object for the given data flavor. |
protected void |
initializeSource()
Performs any initialization work for the view that must be duplicated for each new instance. |
boolean |
isCopy()
Whether this generator is a copy of another. |
boolean |
isCopyRelated(IDataGenerator generator)
Whether this generator was copied from or to another. |
java.lang.Object |
read()
The contents of this data source or the first available content if multiple objects are supported. |
void |
setCopyName(boolean copyName)
|
void |
setName(java.lang.String name)
Sets the data source name. |
java.lang.String |
toString()
The name of this generator. |
| 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.IDataGenerator |
|---|
isCached, setAttribute |
| Methods inherited from interface jigcell.compare.IReadableDataSource |
|---|
getReadDescriptionOption, getReadIconOption, setReadDescriptionOption, setReadIconOption |
| Methods inherited from interface jigcell.compare.IDataSource |
|---|
addOption, configure, getOption, getState, setOption, setState |
| Methods inherited from interface java.awt.datatransfer.Transferable |
|---|
getTransferDataFlavors, isDataFlavorSupported |
| Field Detail |
|---|
public static final char[] SPECIAL_CHARS
public static final java.util.Comparator COMPARATOR_NAME
public static final java.lang.String SEPARATOR_ESCAPE
protected static final java.lang.String DESCRIPTION_READ
private transient boolean copyName
private transient DataGenerator copiedFrom
| Constructor Detail |
|---|
public DataGenerator()
| Method Detail |
|---|
public static int compareByName(java.lang.Object generator1,
java.lang.Object generator2)
generator1 - Generatorgenerator2 - Generatorpublic java.lang.Object clone()
DataSource
clone in interface IDataSourceclone in class DataSourcepublic IDataGenerator copy(boolean shallow)
copy in interface IDataGeneratorshallow - Whether the copy is shallowpublic java.lang.String getAttribute(java.lang.String key)
getAttribute in interface IDataGeneratorkey - Attribute keypublic java.lang.String getComment()
getComment in interface IDataGeneratorpublic IDataGenerator getCopiedFrom()
getCopiedFrom in interface IDataGeneratorpublic IDataElement getElement()
getElement in interface IDataGeneratorpublic java.lang.String getName()
getName in interface IDataSourcegetName in class DataSourcepublic java.lang.Class getPredictedContents()
getPredictedContents in interface IReadableDataSource
public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
throws java.awt.datatransfer.UnsupportedFlavorException,
java.io.IOException
getTransferData in interface java.awt.datatransfer.TransferablegetTransferData in class Transfererflavor - Flavor
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOExceptionpublic boolean isCopy()
isCopy in interface IDataGeneratorpublic boolean isCopyRelated(IDataGenerator generator)
isCopyRelated in interface IDataGenerator
public java.lang.Object read()
throws java.lang.Exception
read in interface IReadableDataSourcejava.lang.Exceptionpublic void setCopyName(boolean copyName)
IEditableDataGenerator.setCopyName(boolean)public void setName(java.lang.String name)
setName in class DataSourcename - Namepublic java.lang.String toString()
toString in class DataSource
protected void copy(boolean shallow,
IDataGenerator target)
shallow - Whether the copy is shallowtarget - Generator to copy toprotected java.lang.String generateGUID()
protected void initializeSource()
initializeSource in class DataSource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||