Package research

Examples of research.FigureEnumeration


        int visualDeltaX = (int) realDeltaX;
        int visualDeltaY = (int) realDeltaY;

        if (fMoved) {
            FigureEnumeration figures = new FigureEnumerator(drawingView.getSelection());
            while (figures.hasMoreElements()) {
                figures.nextFigure().moveBy(visualDeltaX, visualDeltaY);
            }
        }


        fLastX = x;
View Full Code Here


            double scale = drawingView.getScale();
            int realX = (int) (e.getX() / scale + 0.5);
            int realY = (int) (e.getY() / scale + 0.5);

            FigureEnumeration fe = drawingView.getDrawing().getFiguresReverse();

            Figure figure = null;

            while (fe.hasMoreElements()) {
                figure = fe.nextFigure();
                if (!figure.containsPoint(realX, realY)) {
                    figure = null;
                    continue;
                }
View Full Code Here

       
        selectGroup(e.isShiftDown());
    }

    private void selectGroup(boolean toggle) {
        FigureEnumeration k = drawingView.getDrawing().getFiguresReverse();

        while (k.hasMoreElements()) {
            Figure figure = k.nextFigure();

            Boolean selectivity = (Boolean) figure.getAttribute("selectivity");

            if (selectivity.booleanValue() == false)
                continue;
View Full Code Here

        } else {
            double scale = drawingView.getScale();
            int realX = (int) (e.getX() / scale + 0.5);
            int realY = (int) (e.getY() / scale + 0.5);

            FigureEnumeration fe = drawingView.getDrawing().getFiguresReverse();

            Figure figure = null;

            while (fe.hasMoreElements()) {
                figure = fe.nextFigure();
                if (!figure.containsPoint(realX, realY)) {
                    figure = null;
                    continue;
                }
View Full Code Here

    private void moveSelection(int dx, int dy, boolean shouldChildMove, int state) {

        if (state != 0) {
            //System.out.println("caculate " + state);
            FigureEnumeration figs_tmp = drawingView.selectionElements();

            if (listT == null) {
                listT = new ArrayList();
            } else {
                listT.clear();
            }

            if (listTConnection == null) {
                listTConnection = new ArrayList();
            } else {
                listTConnection.clear();
            }

            while (figs_tmp.hasMoreElements()) {
                Figure fig = figs_tmp.nextFigure();

                if (ConnectionFigure.class.isInstance(fig))
                    continue;

                if (!listT.contains(fig)) {
View Full Code Here

        double scale = drawingView.getScale();

        int realX = (int) (e.getX() / scale + 0.5);
        int realY = (int) (e.getY() / scale + 0.5);

        FigureEnumeration fe = drawingView.getDrawing().getFiguresReverse();

        Figure figure = null;

        while (fe.hasMoreElements()) {
            figure = fe.nextFigure();
            if (!figure.containsPoint(realX, realY)) {
                figure = null;
                continue;
            }
View Full Code Here

        GroupMap rst = new GroupTreeMap();

        for (int i = 0; i < views.length; i++){
            DrawingView view = views[i];

            FigureEnumeration fe = view.getDrawing().getFigures();

            while (fe.hasMoreElements()){
                Figure fig = fe.nextFigure();
                String id = (String) fig.getAttribute("id");

                if ((id != null) && (!id.equals(""))){
                    rst.add(view.getDrawing().getTitle(), id);
                }
View Full Code Here

        } else {
            double scale = drawingView.getScale();
            int realX = (int) (e.getX() / scale + 0.5);
            int realY = (int) (e.getY() / scale + 0.5);

            FigureEnumeration fe = drawingView.getDrawing().getFiguresReverse();

            Figure figure = null;

            while (fe.hasMoreElements()) {
                figure = fe.nextFigure();
                if (!figure.containsPoint(realX, realY)) {
                    figure = null;
                    continue;
                }
View Full Code Here

    private void moveSelection(int dx, int dy, boolean shouldChildMove, int state) {

        if (state != 0) {
            //System.out.println("caculate " + state);
            FigureEnumeration figs_tmp = drawingView.selectionElements();

            if (listT == null) {
                listT = new ArrayList();
            } else {
                listT.clear();
            }

            if (listTConnection == null) {
                listTConnection = new ArrayList();
            } else {
                listTConnection.clear();
            }

            while (figs_tmp.hasMoreElements()) {
                Figure fig = figs_tmp.nextFigure();

                if (ConnectionFigure.class.isInstance(fig))
                    continue;

                if (!listT.contains(fig)) {
View Full Code Here

        GroupMap rst = new GroupTreeMap();

        for (int i = 0; i < views.length; i++){
            DrawingView view = views[i];

            FigureEnumeration fe = view.getDrawing().getFigures();

            while (fe.hasMoreElements()){
                Figure fig = fe.nextFigure();
                String id  = (String) fig.getAttribute("id");

                if ((id != null) && (!id.equals(""))){
                    rst.add(view.getDrawing().getTitle(), id);
                }
View Full Code Here

TOP

Related Classes of research.FigureEnumeration

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.