Package research

Examples of research.TextHolder


            Iterator iterator = fs.iterator();
            while (iterator.hasNext()) {
                Figure f = (Figure) iterator.next();

                if (f instanceof TextHolder) {
                    TextHolder th = (TextHolder) f;

                    if (th.isConnected()) {
                        Figure cf = th.getConnectedFigure();

                        if (fs.contains(cf)) {
                            drawingView.toggleSelection(f);
                        }
                    }
View Full Code Here


        if (getTypingTarget() != null) {//������ǰ�ı༭״̬
            endEdit(false);
            flag = true;
        }

        TextHolder textHolder = null;

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

        Figure pressedFigure = drawingView.getDrawing().findFigureInside(realX, realY);

        if (pressedFigure instanceof TextHolder) {
            textHolder = (TextHolder) pressedFigure;
            if (!textHolder.acceptsTyping())
                textHolder = null;
        }
        if (textHolder != null) {
            beginEdit(textHolder);
            return;
        }

        if (flag) {
            getPropertyChangeSupport().firePropertyChange(Tool.TOOL_DONE, false, true);
            flag = false;
        } else {
            super.mouseDown(e, x, y);
            drawingView.checkDamage();
            textHolder = (TextHolder) createdFigure;


            if(pressedFigure != null && textHolder != null && pressedFigure != textHolder){
                textHolder.connect(pressedFigure);
                //((Figure)textHolder).setAttribute("selectivity", Boolean.FALSE);
            }

            beginEdit(textHolder);
        }
View Full Code Here

        Iterator iterator = fs.iterator();
        while (iterator.hasNext()) {
            Figure f = (Figure) iterator.next();

            if (f instanceof TextHolder) {
                TextHolder th = (TextHolder) f;

                if(th.isConnected()){
                   Figure cf = th.getConnectedFigure();

                    if(fs.contains(cf)){
                        drawingView.toggleSelection(f);
                    }
                }
View Full Code Here

    /**
     * If the pressed figure is a TextHolder it can be edited otherwise
     * a new text figure is created.
     */
    public void mouseDown(MouseEvent e, int x, int y) {
        TextHolder textHolder = null;

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

        Figure pressedFigure = drawingView.getDrawing().findFigureInside(realX, realY);

        if (pressedFigure instanceof TextHolder) {
            textHolder = (TextHolder) pressedFigure;
            if (!textHolder.acceptsTyping())
                textHolder = null;
        }
        if (textHolder != null) {
            beginEdit(textHolder);
            return;
View Full Code Here

            while (iterator.hasNext()) {
                Figure f = (Figure) iterator.next();

                if (f instanceof TextHolder) {
                    TextHolder th = (TextHolder) f;

                    if (th.isConnected()) {
                        Figure cf = th.getConnectedFigure();

                        if (cf instanceof ConnectionFigure) {
                            ConnectionFigure rcf = (ConnectionFigure) cf;
                            Figure st = rcf.getStartConnector().owner();
                            Figure ed = rcf.getEndConnector().owner();
View Full Code Here

        if (getTypingTarget() != null) {//������ǰ�ı༭״̬
            endEdit(false);
            flag = true;
        }

        TextHolder textHolder = null;

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

        Figure pressedFigure = drawingView.getDrawing().findFigureInside(realX, realY);

        if (pressedFigure instanceof ResourceComponentFigure) {
            textHolder = (TextHolder) pressedFigure;
            if (!textHolder.acceptsTyping())
                textHolder = null;
        }

        if (textHolder != null) {//��ʼ�༭��갴�´���textHolder����������
            beginEdit(textHolder);
View Full Code Here

        if (getTypingTarget() != null) {//������ǰ�ı༭״̬
            endEdit(false);
            flag = true;
        }

        TextHolder textHolder = null;

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

        Figure pressedFigure = drawingView.getDrawing().findFigureInside(realX, realY);

        if (pressedFigure instanceof FeatureFigure) {
            textHolder = (TextHolder) pressedFigure;
            if (!textHolder.acceptsTyping())
                textHolder = null;
        }

        if (textHolder != null) {//��ʼ�༭��갴�´���textHolder����������
            beginEdit(textHolder);
View Full Code Here

        if (getTypingTarget() != null) {//������ǰ�ı༭״̬
            endEdit(false);
            flag = true;
        }

        TextHolder textHolder = null;

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

        Figure pressedFigure = drawingView.getDrawing().findFigureInside(realX, realY);

        if (pressedFigure instanceof FeatureFigure) {
            textHolder = (TextHolder) pressedFigure;
            if (!textHolder.acceptsTyping())
                textHolder = null;
        }

        if (textHolder != null) {//��ʼ�༭��갴�´���textHolder����������
            beginEdit(textHolder);
View Full Code Here

            while (iterator.hasNext()) {
                Figure f = (Figure) iterator.next();

                if (f instanceof TextHolder) {
                    TextHolder th = (TextHolder) f;

                    if (th.isConnected()) {
                        Figure cf = th.getConnectedFigure();

                        if (cf instanceof ConnectionFigure) {
                            ConnectionFigure rcf = (ConnectionFigure) cf;
                            Figure st = rcf.getStartConnector().owner();
                            Figure ed = rcf.getEndConnector().owner();
View Full Code Here

        Iterator iterator = fs.iterator();
        while (iterator.hasNext()) {
            Figure f = (Figure) iterator.next();

            if (f instanceof TextHolder) {
                TextHolder th = (TextHolder) f;

                if(th.isConnected()){
                   Figure cf = th.getConnectedFigure();

                    if(fs.contains(cf)){
                        drawingView.toggleSelection(f);
                    }
                }
View Full Code Here

TOP

Related Classes of research.TextHolder

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.