Search in sources :

Example 1 with LabelingComponent

use of sc.fiji.labkit.ui.LabelingComponent in project labkit-ui by juglab.

the class LabelingComponentDemo method initLabelingComponent.

private static JComponent initLabelingComponent(JFrame frame, ImageLabelingModel model) {
    LabelingComponent labelingComponent = new LabelingComponent(frame, model);
    frame.addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            labelingComponent.close();
        }
    });
    return labelingComponent;
}
Also used : LabelingComponent(sc.fiji.labkit.ui.LabelingComponent) WindowEvent(java.awt.event.WindowEvent) WindowAdapter(java.awt.event.WindowAdapter)

Example 2 with LabelingComponent

use of sc.fiji.labkit.ui.LabelingComponent in project labkit-ui by juglab.

the class LabelingComponentHdf5Demo method initLabelingComponent.

private static JComponent initLabelingComponent(JFrame frame, String filename) {
    ImageLabelingModel model = new ImageLabelingModel(new SpimDataInputImage(filename, 0));
    LabelingComponent labelingComponent = new LabelingComponent(frame, model);
    frame.addWindowListener(new WindowAdapter() {

        @Override
        public void windowClosing(WindowEvent e) {
            labelingComponent.close();
        }
    });
    return labelingComponent;
}
Also used : ImageLabelingModel(sc.fiji.labkit.ui.models.ImageLabelingModel) LabelingComponent(sc.fiji.labkit.ui.LabelingComponent) BasicLabelingComponent(sc.fiji.labkit.ui.BasicLabelingComponent) WindowEvent(java.awt.event.WindowEvent) WindowAdapter(java.awt.event.WindowAdapter) SpimDataInputImage(sc.fiji.labkit.ui.inputimage.SpimDataInputImage)

Aggregations

WindowAdapter (java.awt.event.WindowAdapter)2 WindowEvent (java.awt.event.WindowEvent)2 LabelingComponent (sc.fiji.labkit.ui.LabelingComponent)2 BasicLabelingComponent (sc.fiji.labkit.ui.BasicLabelingComponent)1 SpimDataInputImage (sc.fiji.labkit.ui.inputimage.SpimDataInputImage)1 ImageLabelingModel (sc.fiji.labkit.ui.models.ImageLabelingModel)1