Examples of Interactor


Examples of diva.canvas.interactor.Interactor

            Paint outline = Color.white;
            float lineWidth = 1;
            Composite composite = null;
            Font font = CanvasDraw.FONTS[3];
            String text = null;
            Interactor interactor = graphics.getRoiSelectionInteractor();

            // parse the configuration options: {-opt arg} {-opt arg} ...
            for (String aConfig : config) {
                String[] optArg = TclUtil.splitList(aConfig);
                if (optArg.length != 2) {
View Full Code Here

Examples of diva.canvas.interactor.Interactor

     */
    public void setVisible(boolean flag) {
        super.setVisible(flag);

        // don't leave selection decorators around...
        Interactor interactor = getInteractor();
        if (interactor instanceof SelectionInteractor) {
            // remove any selection handles, etc.
            SelectionModel model = ((SelectionInteractor) interactor).getSelectionModel();
            model.removeSelection(this);
        }
View Full Code Here

Examples of diva.canvas.interactor.Interactor

            // Add figures to the selection
            Iterator i = freshFigures.iterator();

            while (i.hasNext()) {
                Figure f = (Figure) i.next();
                Interactor r = f.getInteractor();

                if ((r != null) && r instanceof SelectionInteractor) {
                    SelectionInteractor interactor = (SelectionInteractor) r;

                    if (_selectionModels.contains(interactor
                            .getSelectionModel())) {
                        expandSelection((SelectionInteractor) r, f);
                    }
                }
            }

            // Remove figures from the selection
            i = staleFigures.iterator();

            while (i.hasNext()) {
                Figure f = (Figure) i.next();
                Interactor r = f.getInteractor();

                if ((r != null) && r instanceof SelectionInteractor) {
                    SelectionInteractor interactor = (SelectionInteractor) r;

                    if (_selectionModels.contains(interactor
                            .getSelectionModel())) {
                        contractSelection((SelectionInteractor) r, f);
                    }
                }
            }
        } else {
            // Toggle figures into and out of the selection
            Iterator i = new CompoundIterator(freshFigures.iterator(),
                    staleFigures.iterator());

            while (i.hasNext()) {
                Figure f = (Figure) i.next();
                Interactor r = f.getInteractor();

                if ((r != null) && r instanceof SelectionInteractor) {
                    SelectionInteractor interactor = (SelectionInteractor) r;

                    if (_selectionModels.contains(interactor
View Full Code Here

Examples of diva.canvas.interactor.Interactor

    public void setVisible(boolean flag) {
        super.setVisible(flag);

        // don't leave selection decorators around...
        if (!flag) {
            Interactor interactor = getInteractor();
            if (interactor instanceof SelectionInteractor) {
                // remove any selection handles, etc.
                SelectionModel model = ((SelectionInteractor) interactor).getSelectionModel();
                if (model.containsSelection(this)) {
                    model.removeSelection(this);
View Full Code Here

Examples of diva.canvas.interactor.Interactor

    /**
     * Remove the given figure from the display.
     */
    public void remove(CanvasFigure fig) {
        Interactor interactor = fig.getInteractor();
        if (interactor instanceof SelectionInteractor) {
            // remove any selection handles, etc.
            SelectionModel model = ((SelectionInteractor) interactor).getSelectionModel();
            if (model.containsSelection(fig)) {
                model.removeSelection(fig);
View Full Code Here

Examples of diva.canvas.interactor.Interactor

    /**
     * Select the given figure.
     */
    public void select(CanvasFigure fig) {
        Interactor i = fig.getInteractor();
        if (i instanceof SelectionInteractor) {
            ((SelectionInteractor) i).getSelectionModel().addSelection(fig);
        }
    }
View Full Code Here

Examples of diva.canvas.interactor.Interactor

    /**
     * Deselect the given figure.
     */
    public void deselect(CanvasFigure fig) {
        Interactor i = fig.getInteractor();
        if (i instanceof SelectionInteractor) {
            ((SelectionInteractor) i).getSelectionModel().removeSelection(fig);
        }
    }
View Full Code Here

Examples of diva.canvas.interactor.Interactor

     * For example, if mode is (SELECT | MOVE | RESIZE), the figure can be selected,
     * moved, and resized. (Note that MOVE, RESIZE and ROTATE automatically assume
     * SELECT).
     */
    public void setInteractionMode(CanvasFigure fig, int mode) {
        Interactor interactor = null;
        if ((mode & (ROTATE | MOVE | RESIZE)) != 0) {
            mode |= SELECT;
        }

        if (mode == SELECT) {
View Full Code Here

Examples of org.apache.batik.swing.gvt.Interactor

        JFrame f = new JFrame();
        f.setDefaultCloseOperation(f.EXIT_ON_CLOSE);
        f.getContentPane().add(canvas);
        canvas.setSVGDocument(doc);
        canvas.setEnableZoomInteractor(true);
        canvas.getInteractors().add(new Interactor() {
            public boolean startInteraction(InputEvent inputEvent) {
                System.out.println("si");
                return true;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.