|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.mit.sketch.ui.CESketchPanel
edu.mit.sketch.chem.ChemSketch
public class ChemSketch
to be done: read typeStrings from file general clean up
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Field Summary | |
|---|---|
static int |
backtrack
|
static boolean |
chemknowledge
|
static java.lang.String |
chempath
|
static double |
connectthreshold
|
static boolean |
demo
|
boolean |
display
|
static double |
doublethreshold
|
static java.lang.String |
labelFilePath
|
int |
mode
|
static double |
polythreshold
|
java.lang.String[] |
strokeLabels
|
static java.lang.String |
trainFile
|
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ChemSketch()
|
|
| Method Summary | |
|---|---|
void |
applyLabels()
|
void |
buildGraph()
|
void |
buildStructure()
|
void |
compareResults(java.lang.String testfile,
java.lang.String reffile)
|
void |
correctSketch()
|
boolean |
doubleBond(StrokeData sd1,
StrokeData sd2)
|
void |
evaluateLabels()
|
void |
extractComponents()
Extract individual chemistry components from strokes (e.g. |
java.lang.String[] |
generateLabels()
|
void |
getStrokeEnds()
|
void |
getStrokes()
|
void |
handleStroke(StrokeData stroke)
This method is called by classes that collect StrokeData objects. |
void |
labelAll()
|
void |
labelAllDirs(java.lang.String path)
|
void |
labelAllFiles(java.lang.String path)
|
void |
labelStrokes(java.lang.String label)
|
static void |
main(java.lang.String[] args)
|
void |
openFile(java.io.File file)
|
void |
paintComponent(java.awt.Graphics g)
|
void |
processComponents()
|
void |
recognitionThread()
|
void |
recognize(boolean incremental)
|
void |
recognizeLabel()
|
void |
refineLabels()
|
void |
run()
|
boolean |
sameLabel(java.lang.String l1,
java.lang.String l2)
|
void |
save(java.io.File file)
|
void |
saveCDXML(java.lang.String path,
boolean load)
|
void |
saveTestLabels()
|
void |
saveTestLabelsInt()
|
void |
test(boolean incremental)
|
void |
testAll()
|
void |
testAllDirs(java.lang.String path)
|
void |
testAllFiles(java.lang.String path)
|
void |
testOne()
|
void |
train(boolean append)
|
void |
trainAll()
|
void |
trainAllDirs(java.lang.String path)
|
void |
trainAllFiles(java.lang.String path)
|
| Methods inherited from class edu.mit.sketch.ui.CESketchPanel |
|---|
addStrokeDataListener, click, endStroke, getStrokeDataListeners, isPaintingAsWeGo, isRecognizing, key, recognized, registerSample, removeStrokeDataListener, setIsPaintingAsWeGo, setIsRecognizing, startStroke |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int backtrack
public static boolean chemknowledge
public java.lang.String[] strokeLabels
public static java.lang.String trainFile
public static java.lang.String labelFilePath
public static double polythreshold
public static double connectthreshold
public static double doublethreshold
public static java.lang.String chempath
public int mode
public boolean display
public static boolean demo
| Constructor Detail |
|---|
public ChemSketch()
| Method Detail |
|---|
public void saveCDXML(java.lang.String path,
boolean load)
public void handleStroke(StrokeData stroke)
StrokeDataListener
handleStroke in interface StrokeDataListenerpublic void trainAll()
public void labelAll()
public void testAll()
public void train(boolean append)
public void test(boolean incremental)
public void run()
run in interface java.lang.Runnablepublic void recognitionThread()
public void recognize(boolean incremental)
public void recognizeLabel()
public void buildStructure()
public void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void getStrokes()
public void getStrokeEnds()
public void labelStrokes(java.lang.String label)
public void applyLabels()
public void extractComponents()
public void processComponents()
public boolean doubleBond(StrokeData sd1,
StrokeData sd2)
public void buildGraph()
public void correctSketch()
public void openFile(java.io.File file)
public void save(java.io.File file)
public static void main(java.lang.String[] args)
public void saveTestLabels()
public void saveTestLabelsInt()
public void labelAllDirs(java.lang.String path)
public void labelAllFiles(java.lang.String path)
public void trainAllDirs(java.lang.String path)
public void trainAllFiles(java.lang.String path)
public void testAllDirs(java.lang.String path)
public void testAllFiles(java.lang.String path)
public void testOne()
public java.lang.String[] generateLabels()
public void refineLabels()
public boolean sameLabel(java.lang.String l1,
java.lang.String l2)
public void compareResults(java.lang.String testfile,
java.lang.String reffile)
public void evaluateLabels()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||