|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.marvin.view.swing.TableSupport
public class TableSupport
Viewer table support class.
| Field Summary | |
|---|---|
TaskScheduler |
scheduler
Record access task scheduler. |
| Method Summary | |
|---|---|
void |
enqueueUpdate()
Enqueues an update task. |
java.awt.Dimension |
getDefaultSize()
Gets the default size of an MViewPane containing the generated table. |
MDocStorage |
getDocStorage()
Gets the sparse dynamic document storage. |
TableOptions |
getTableOptions()
Gets the table options component. |
void |
makeTableMenu(java.awt.Container menu)
Creates Table menu items. |
void |
setCellSize(java.awt.Dimension size)
Sets the molecule cell size for GridBagView. |
boolean |
setDocument(int k,
MDocument doc)
Sets the k-th record directly. |
void |
setSDFColoring(java.lang.String tag,
java.util.Properties props)
Sets SDF coloring. |
void |
start(MDocSource dsrc,
java.lang.String inputName)
Starts loading molecules. |
void |
startNow(MDocSource dsrc,
java.lang.String inputName)
Starts loading molecules immediately. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final TaskScheduler scheduler
final MDocStorage ds = tableSupport.getDocStorage();
final int start = 0;
final int end = ds.getSize();
Runnable task = new Runnable() {
public void run() {
try {
for(int i = start; i < end; ++i) {
MDocument d = ds.getMainDoc(i);
...
}
} catch(MDocStorage.RecordUnavailableException ex) {
...
} catch(IOException ex) {
...
}
}
};
tableSupport.scheduler.invokeLater(task, start);
try {
tableSupport.scheduler.waitForAll();
} catch(InterruptedException ex) {
ex.printStackTrace();
}
| Method Detail |
|---|
public TableOptions getTableOptions()
public void setCellSize(java.awt.Dimension size)
size - the molecule cell size
public void setSDFColoring(java.lang.String tag,
java.util.Properties props)
tag - ?props - ?
public void start(MDocSource dsrc,
java.lang.String inputName)
dsrc - the document sourceinputName - input file name or other identifier
public void startNow(MDocSource dsrc,
java.lang.String inputName)
throws java.lang.InterruptedException,
java.lang.reflect.InvocationTargetException
dsrc - the document sourceinputName - input file name or other identifier
java.lang.InterruptedException - if another thread has
interrupted the task thread
java.lang.reflect.InvocationTargetException - if an throwable is thrown
when running runnablepublic void enqueueUpdate()
public boolean setDocument(int k,
MDocument doc)
Note that this method should normally not be used if the input is
an MDocSource; use start(MDocSource, String)
instead.
k - record indexdoc - the document
true if setting was successful,
false if no ViewHandler foundpublic MDocStorage getDocStorage()
Note that MDocStorage should only be used
via record access tasks,
schedulerpublic java.awt.Dimension getDefaultSize()
public void makeTableMenu(java.awt.Container menu)
menu - the Table menu
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||