Package diva.canvas.interactor

Examples of diva.canvas.interactor.SelectionModel


     @param controller The associated graph controller.
     */
    public LinkController(final GraphController controller) {
        super(controller);

        SelectionModel sm = controller.getSelectionModel();
        SelectionInteractor interactor = (SelectionInteractor) getEdgeInteractor();
        interactor.setSelectionModel(sm);

        // Create and set up the manipulator for connectors
        ConnectorManipulator manipulator = new ConnectorManipulator();
View Full Code Here


     @param controller The associated graph controller.
     */
    public TransitionController(final GraphController controller) {
        super(controller);

        SelectionModel sm = controller.getSelectionModel();
        SelectionInteractor interactor = (SelectionInteractor) getEdgeInteractor();
        interactor.setSelectionModel(sm);

        // Create and set up the manipulator for connectors.
        // This overrides the manipulator created by the base class.
View Full Code Here

        // 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);
        }

        repaint();
    }
View Full Code Here

        // 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);
                }
            }
        }

        repaint();
View Full Code Here

    /**
     * Make the drag interactor, for figures that may be dragged.
     */
    private void _makeFixedSelectionInteractor() {
        // create an fixed position, unresizable interactor
        SelectionModel model = _selectionInteractor.getSelectionModel();
        _fixedSelectionInteractor = new SelectionInteractor(model);
        // highlighting will draw a partially see-through rectangle over the figure
        Composite composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.75F);
        BasicHighlighter h = new BasicHighlighter(new Color(204, 204, 255), 1.0F, composite);
        _fixedSelectionInteractor.setPrototypeDecorator(h);
View Full Code Here

     */
    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);
            }
        }
        _figureLayer.remove(fig);
    }
View Full Code Here

TOP

Related Classes of diva.canvas.interactor.SelectionModel

Copyright © 2018 www.massapicom. 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.