Package oxygenoffice.extensions.smart.diagram.relationdiagrams

Examples of oxygenoffice.extensions.smart.diagram.relationdiagrams.RelationDiagramItem


    @Override
    public void removeShape() {
        int selectedShapeID = getSelectedShapeID();
        if(selectedShapeID > 0){
            XShape xSelectedShape = getController().getSelectedShape();
            RelationDiagramItem selectedItem = getItem(xSelectedShape);

            if(selectedItem != null){
                String selectedShapeName = getShapeName(xSelectedShape);
                XShape xNextSelectedShape = getPreviousShape();

                if(selectedShapeName.contains("RectangleShape")){
                    if(xNextSelectedShape.equals(selectedItem.getTextShape()))
                        xNextSelectedShape = selectedItem.getMainShape();
                    selectedItem.removeTextShape();
                }
       
                if(selectedShapeName.contains("EllipseShape") && !selectedShapeName.endsWith("EllipseShape0")){
                    if(selectedShapeID == 1 && getTopShapeID() == 1)
                        xNextSelectedShape = getControlShape();
                    selectedItem.removeItem();
                    decreaseItemsIDs(selectedShapeID);
                }

                if(xNextSelectedShape != null)
                    getController().setSelectedShape(xNextSelectedShape);
View Full Code Here


                    String shapeName = getShapeName(xShape);
                    if(shapeName.contains("GroupShape")){
                        setAllShapeProperties();
                    }else{
                        if(!shapeName.endsWith("EllipseShape0") && !shapeName.equals("")){
                            RelationDiagramItem item = getItem(xShape);
                            if(item != null)
                                item.setShapesProps();
                        }
                    }
                }
            }
        } catch (IndexOutOfBoundsException ex) {
View Full Code Here

    @Override
    public void removeShape() {
        int selectedShapeID = getSelectedShapeID();
        if(selectedShapeID > 0){
            XShape xSelectedShape = getController().getSelectedShape();
            RelationDiagramItem selectedItem = getItem(xSelectedShape);

            if(selectedItem != null){
                XShape xNextSelectedShape = null;

                if(getTopShapeID() > 1){
                    if(selectedShapeID == getTopShapeID())
                        xNextSelectedShape = getPreviousShape();
                    else
                        xNextSelectedShape = getNextShape();
                    selectedItem.removeItem();
                    decreaseItemsIDs(selectedShapeID);
                }else{
                    xNextSelectedShape = getControlShape();
                    selectedItem.removeItem();
                }

                if(xNextSelectedShape != null)
                    getController().setSelectedShape(xNextSelectedShape);
                if(isBaseColorsMode() || isBaseColorsWithGradientMode())
View Full Code Here

                    String shapeName = getShapeName(xShape);
                    if(shapeName.contains("GroupShape")){
                        setAllShapeProperties();
                    }else{
                        if(!shapeName.endsWith("PolyPolygonShape0") && !shapeName.equals("")){
                            RelationDiagramItem item = getItem(xShape);
                            if(item != null)
                                item.setShapesProps();
                        }
                    }
                }
            }
        } catch (IndexOutOfBoundsException ex) {
View Full Code Here

    @Override
    public void removeShape() {
        int selectedShapeID = getSelectedShapeID();
        if(selectedShapeID > 0){
            XShape xSelectedShape = getController().getSelectedShape();
            RelationDiagramItem selectedItem = getItem(xSelectedShape);
           
            if(selectedItem != null){
                XShape xNextSelectedShape = null;
                if(getTopShapeID() > 2){
                    xNextSelectedShape = getPreviousShape();
                    selectedItem.removeItem();
                    decreaseItemsIDs(selectedShapeID);
                }else{
                    xNextSelectedShape = getControlShape();
                    RelationDiagramItem previousItem = getPreviousItem();
                    selectedItem.removeItem();
                    previousItem.removeItem();
                }
           
                if(xNextSelectedShape != null)
                    getController().setSelectedShape(xNextSelectedShape);
                if(isBaseColorsMode())
View Full Code Here

                    String shapeName = getShapeName(xShape);
                    if(shapeName.contains("GroupShape")){
                        setAllShapeProperties();
                    }else{
                        if(!shapeName.endsWith("EllipseShape0") && !shapeName.equals("")){
                            RelationDiagramItem item = getItem(xShape);
                            if(item != null)
                                item.setShapesProps();
                        }
                    }
                }
            }
        } catch (IndexOutOfBoundsException ex) {
View Full Code Here

                        treeItem = orgChart.getDiagramTree().getRootItem().getFirstChild();
                    if(treeItem != null)
                        getController().setSelectedShape(treeItem.getRectangleShape());
                }
                if(getController().getGroupType() == Controller.RELATIONGROUP){
                    RelationDiagramItem item = ((RelationDiagram)getController().getDiagram()).getFirstItem();
                    if(item != null){
                        getController().setSelectedShape(item.getMainShape());
                        setNextColorOnControlDialog();
                    }
                }
                if(getController().getGroupType() == Controller.PROCESSGROUP){
                    ProcessDiagramItem item = ((ProcessDiagram)getController().getDiagram()).getFirstItem();
                    if(item != null){
                        if(getController().getDiagramType() == Controller.UPWARDARROWPROCESS)
                            getController().setSelectedShape(item.getSecondShape());
                        else
                            getController().setSelectedShape(item.getMainShape());
                        setNextColorOnControlDialog();
                    }
                }
                getController().addSelectionListener();
                getController().setTextFieldOfControlDialog();
            }
            return true;
        }

        //m shortcut key
        if(methodName.equals("mainShape")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    if(getController().getGroupType() == Controller.RELATIONGROUP){
                        RelationDiagramItem item = ((RelationDiagram)getController().getDiagram()).getItem(getController().getSelectedShape());
                        if(item != null){
                            getController().setSelectedShape(item.getMainShape());
                            setNextColorOnControlDialog();
                        }
                    }
                    getController().addSelectionListener();
                }
            }
            getController().setTextFieldOfControlDialog();
            return true;
        }

        //t shortcut key
        if(methodName.equals("textShape")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    if(getController().getGroupType() == Controller.RELATIONGROUP){
                        RelationDiagramItem item = ((RelationDiagram)getController().getDiagram()).getItem(getController().getSelectedShape());
                        if(item != null){
                            XShape xShape = item.getTextShape();
                            if(xShape != null && getController().getDiagram().isInGruopShapes(xShape))
                                getController().setSelectedShape(xShape);
                        }
                    }
                    getController().addSelectionListener();
View Full Code Here

            if(xTFOfControlDialog != null){
                if(getController().isOnlySimpleItemIsSelected()){
                    XText xText = null;
                    if(getController().getGroupType() == Controller.RELATIONGROUP){
                        RelationDiagramItem item = ((RelationDiagram)getController().getDiagram()).getItem(getController().getSelectedShape());
                        if(item != null){
                            XShape xTextShape = item.getTextShape();
                            if(xTextShape != null && getController().getDiagram().isInGruopShapes(xTextShape)){
                                xText = (XText)UnoRuntime.queryInterface(XText.class, xTextShape);
                                setTextFieldValueOfControlDialog(xText.getString());
                            }else
                                setTextFieldValueOfControlDialog("");
                        }
                    }
                    if(getController().getGroupType() == Controller.PROCESSGROUP){
                        ProcessDiagramItem item = ((ProcessDiagram)getController().getDiagram()).getItem(getController().getSelectedShape());
                        if(item != null){
                            XShape xTextShape = item.getTextShape();
                            if(xTextShape != null && getController().getDiagram().isInGruopShapes(xTextShape)){
                                xText = (XText)UnoRuntime.queryInterface(XText.class, xTextShape);
                                setTextFieldValueOfControlDialog(xText.getString());
                            }else
                                setTextFieldValueOfControlDialog("");
View Full Code Here

    @Override
    public void removeShape() {
        int selectedShapeID = getSelectedShapeID();
        if(selectedShapeID > 0){
            XShape xSelectedShape = getController().getSelectedShape();
            RelationDiagramItem selectedItem = getItem(xSelectedShape);

            if(selectedItem != null){
                XShape xNextSelectedShape = null;

                if(getTopShapeID() > 1){
                    if(selectedShapeID == getTopShapeID())
                        xNextSelectedShape = getPreviousShape();
                    else
                        xNextSelectedShape = getNextShape();
                    selectedItem.removeItem();
                    decreaseItemsIDs(selectedShapeID);
                }else{
                    xNextSelectedShape = getControlEllipseShape();
                    selectedItem.removeItem();
                }

                if(xNextSelectedShape != null)
                    getController().setSelectedShape(xNextSelectedShape);
                if(isBaseColorsMode())
View Full Code Here

                    String shapeName = getShapeName(xShape);
                    if(shapeName.contains("GroupShape")){
                        setAllShapeProperties();
                    }else{
                        if(!shapeName.endsWith("EllipseShape0") && !shapeName.endsWith("RectangleShape0") && !shapeName.equals("")){
                            RelationDiagramItem item = getItem(xShape);
                            if(item != null)
                                item.setShapesProps();
                        }
                    }
                }
            }
        } catch (IndexOutOfBoundsException ex) {
View Full Code Here

TOP

Related Classes of oxygenoffice.extensions.smart.diagram.relationdiagrams.RelationDiagramItem

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.