Examples of OrganizationChart


Examples of org.openoffice.extensions.diagrams.diagram.organizationcharts.OrganizationChart

            return true;
        }
        if(methodName.equals("root")){
            if(getController().getDiagram() != null) {
                if(getController().getGroupType() == Controller.ORGANIGROUP){
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    TreeItem treeItem = orgChart.getDiagramTree().getRootItem();
                    if(treeItem != null)
                        getController().setSelectedShape(treeItem.getRectangleShape());
                }
            }
            return true;
        }

        if(methodName.equals("previous")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    if(getController().getGroupType() == Controller.ORGANIGROUP){
                        OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                        TreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                        if(treeItem.isDad()){
                             TreeItem previousItem = treeItem.getDad().getPreviousSibling(treeItem);
                            if(previousItem != null)
                                getController().setSelectedShape(previousItem.getRectangleShape());
                        }
                    }
                }
            }
            return true;
        }

        if(methodName.equals("next")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    if(getController().getGroupType() == Controller.ORGANIGROUP){
                        OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                        TreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                        if(treeItem.isFirstSibling())
                            getController().setSelectedShape(treeItem.getFirstSibling().getRectangleShape());
                    }
                }
            }
            return true;
        }

        if(methodName.equals("up")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    if(getController().getGroupType() == Controller.ORGANIGROUP){
                        OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                        TreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                        if(treeItem.isDad())
                            getController().setSelectedShape(treeItem.getDad().getRectangleShape());
                    }
                }
            }
            return true;
        }

        if(methodName.equals("down")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    if(getController().getGroupType() == Controller.ORGANIGROUP){
                        OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                        TreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                        if(treeItem.isFirstChild())
                            getController().setSelectedShape(treeItem.getFirstChild().getRectangleShape());
                    }
                }
            }
            return true;
        }

        if(methodName.equals("edit")){
            if(!getGui().isShownTextField())
                getGui().textFieldDownUp();
            if(getController().isOnlySimpleItemIsSelected())
                getGui().setFocusTextField();
            return true;
        }

        if(methodName.equals("showColorTable")){

            if(((EventObject)eventObject).Source.equals(getGui().m_xColorImageControl))
                getGui().m_xEventObjectControl = getGui().m_xColorImageControl;
            if(((EventObject)eventObject).Source.equals(getGui().m_xStartColorImageControl))
                getGui().m_xEventObjectControl = getGui().m_xStartColorImageControl;
            if(((EventObject)eventObject).Source.equals(getGui().m_xEndColorImageControl))
                getGui().m_xEventObjectControl = getGui().m_xEndColorImageControl;

            getGui().showColorTable();
            return true;
        }
        // ControlDialog1, ControlDialog2
        if(methodName.equals("addShape")){
            if(getController().getDiagram() != null) {
                if(getController().getGroupType() == Controller.ORGANIGROUP){
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    if(orgChart.isErrorInTree()){
                        getGui().askUserForRepair(orgChart);
                    }else{
                        getController().getDiagram().addShape();
                        getController().getDiagram().refreshDiagram();
                    }
                }else{
                    getController().getDiagram().addShape();
                    getController().getDiagram().refreshDiagram();
                }
            }
            return true;
        }
        // ControlDialog1, ControlDialog2
        if(methodName.equals("removeShape")){
            if(getController().getDiagram() != null) {
                if(getController().getGroupType() == Controller.ORGANIGROUP){
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    if(orgChart.isErrorInTree()){
                        getGui().askUserForRepair(orgChart);
                    }else{
                       getController().getDiagram().removeShape();
                       getController().getDiagram().refreshDiagram();
                    }
                }else{
                    getController().getDiagram().removeShape();
                    getController().getDiagram().refreshDiagram();
                }
            }
            return true;
        }
        // ControlDialog1, ControlDialog2
        if(methodName.equals("changedStyle")){
            if( getController().getDiagram() != null ){
                getController().getDiagram().setChangedMode((short)( (ItemEvent)eventObject ).Selected);
                getController().getDiagram().refreshShapeProperties();
                getController().getDiagram().refreshDiagram();
            }
            return true;
        }

        if(methodName.equals("convert")){
            getGui().showConvertDialog();
            m_iLastHorLevel = 2;
            return true;
        }

        if(methodName.equals("converButton1Pressed")){
            getGui().setConvertComboBox(false);
            return true;
        }

        if(methodName.equals("converButton2Pressed")){
            getGui().setConvertComboBox(true);
            return true;
        }

        if(methodName.equals("changedLastHorLevel")){
            m_iLastHorLevel = ((ItemEvent)eventObject).Selected;
            return true;
        }

        if(methodName.equals("convertAction")){
            getGui().m_xConvertTopWindow.removeTopWindowListener(this);
            short convType = getGui().getConversationType();

            getGui().m_xConvertDialog.endExecute();
            getGui().m_xConvertWindow = null;
            getGui().m_xConvertTopWindow = null;
            getGui().m_xConvertDialog = null;
            getGui().m_xControlDialogWindow.setEnable(true);
            getGui().m_xControlDialogWindow.setFocus();
            if(getController().getDiagram() != null) {
                if(getController().getGroupType() == Controller.ORGANIGROUP){
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    if(orgChart.isErrorInTree()){
                        getGui().askUserForRepair(orgChart);
                    }else{
                        if(convType == Controller.ORGANIGRAM){
                            if(getController().getDiagramType() == Controller.ORGANIGRAM && m_iLastHorLevel == ODiagramTree.LASTHORLEVEL)
                                return true;
View Full Code Here

Examples of oxygenoffice.extensions.smart.diagram.organizationcharts.OrganizationChart

        //pressed Add shape button
        if(methodName.equals("addShape")){
            if(getController().getDiagram() != null) {
                getController().removeSelectionListener();
                if(getController().getGroupType() == Controller.ORGANIGROUP){
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    if(orgChart.isErrorInTree()){
                        getGui().askUserForRepair(orgChart);
                    }else{
                        getController().getDiagram().addShape();
                        getController().getDiagram().refreshDiagram();
                        if(getController().getDiagram().isColorSchemeMode())
                            orgChart.refreshSchemesColors();
                    }
                }else{
                    getController().getDiagram().addShape();
                    getController().getDiagram().refreshDiagram();
                }
                getController().addSelectionListener();
                getController().setTextFieldOfControlDialog();
            }
            return true;
        }

        //pressed Remove shape button
        if(methodName.equals("removeShape")){
            if(getController().getDiagram() != null) {
                getController().removeSelectionListener();
                if(getController().getGroupType() == Controller.ORGANIGROUP){
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    if(orgChart.isErrorInTree()){
                        getGui().askUserForRepair(orgChart);
                    }else{
                        getController().getDiagram().removeShape();
                        getController().getDiagram().refreshDiagram();
                        if(getController().getDiagram().isColorSchemeMode())
                            orgChart.refreshSchemesColors();
                    }
                }else{
                    getController().getDiagram().removeShape();
                    getController().getDiagram().refreshDiagram();
                }
                getController().addSelectionListener();
                getController().setTextFieldOfControlDialog();
            }
            return true;
        }

        //show ConvertDialog
        if(methodName.equals("convert")){
            if(!getController().isAppropriateShapeIsSelected()){
                String title = getGui().getDialogPropertyValue("Strings2", "Strings2.ConvertError.Title");
                String message = getGui().getDialogPropertyValue("Strings2", "Strings2.ConvertError.Message");
                getGui().showMessageBox(title, message);
                return true;
            }else{
                getController().removeSelectionListener();
                getController().convert();
                getController().addSelectionListener();
            }
            return true;
        }

        //pressed properties button
        if(methodName.equals("setProperties")){
            getController().getDiagram().showPropertyDialog();
            return true;
        }
       
        //pressed export button
        if(methodName.equals("export")){
            getController().export();
            return true;
        }
/*       
        //open-close textField (down-up)
        if(methodName.equals("downUpAction")){
            getGui().moveTextFieldOfControlDialog();
            return true;
        }
*/
        //set text of shape if textField has modified
        if(methodName.equals("textFieldModified")){
            getGui().modifiedTextFieldOfControlDialog();
            return true;
        }
       
        //a shortcut key
        if(methodName.equals("allShape")){
            if(getController().getDiagram() != null){
                getController().removeSelectionListener();
                getController().getDiagram().setFocusGroupShape();
                getController().addSelectionListener();
                getController().setTextFieldOfControlDialog();
            }
            return true;
        }

        //p shortcut key
        if(methodName.equals("previous")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    if(getController().getGroupType() == Controller.ORGANIGROUP){
                        OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                        OrganizationChartTreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                        if(treeItem.isDad()){
                             OrganizationChartTreeItem previousItem = treeItem.getDad().getPreviousSibling(treeItem);
                            if(previousItem != null)
                                getController().setSelectedShape(previousItem.getRectangleShape());
                        }
                    }
                    if(getController().getGroupType() == Controller.RELATIONGROUP){
                        XShape xShape = ((RelationDiagram)getController().getDiagram()).getPreviousShape();
                        if(xShape != null){
                            getController().setSelectedShape(xShape);
                            setNextColorOnControlDialog();
                        }
                    }
                    if(getController().getGroupType() == Controller.PROCESSGROUP){
                        XShape xShape = ((ProcessDiagram)getController().getDiagram()).getPreviousShape();
                        if(xShape != null){
                            getController().setSelectedShape(xShape);
                            setNextColorOnControlDialog();
                        }
                    }
                    getController().addSelectionListener();
                }
            }
            getController().setTextFieldOfControlDialog();
            return true;
        }

        //n shortcut key
        if(methodName.equals("next")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    if(getController().getGroupType() == Controller.ORGANIGROUP){
                        OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                        OrganizationChartTreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                        if(treeItem.isFirstSibling())
                            getController().setSelectedShape(treeItem.getFirstSibling().getRectangleShape());
                    }
                    if(getController().getGroupType() == Controller.RELATIONGROUP){
                        XShape xShape = ((RelationDiagram)getController().getDiagram()).getNextShape();
                        if(xShape != null){
                            getController().setSelectedShape(xShape);
                            setNextColorOnControlDialog();
                        }
                    }
                    if(getController().getGroupType() == Controller.PROCESSGROUP){
                        XShape xShape = ((ProcessDiagram)getController().getDiagram()).getNextShape();
                        if(xShape != null){
                            getController().setSelectedShape(xShape);
                            setNextColorOnControlDialog();
                        }
                    }
                    getController().addSelectionListener();
                }
            }
            getController().setTextFieldOfControlDialog();
            return true;
        }

        //e shortcut key
        if(methodName.equals("edit")){
//            if(!getGui().isShownTextFieldOfControlDialog())
//                getGui().moveTextFieldOfControlDialog();
            if(getController().isOnlySimpleItemIsSelected())
                getGui().setFocusTextFieldOfControlDialog();
            return true;
        }
       
        //s shortcut key
        if(methodName.equals("size")){
            if(getController().getDiagram() != null) {
                if(getController().getGroupType() != Controller.RELATIONGROUP){
                    getController().removeSelectionListener();
                    getController().setNewSize();
                    getController().addSelectionListener();
                }
            } 
            return true;
        }
        //****************************************************************************************************


        //ControlDialog1 events ******************************************************************************
        //click on colorImageControl
        if(methodName.equals("showColorTable3")){
            getGui().executeColorTable3();
            return true;
        }
       
        //f shortcut key
        if(methodName.equals("first")){
            if(getController().getDiagram() != null) {
                getController().removeSelectionListener();
                if(getController().getGroupType() == Controller.ORGANIGROUP){
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    OrganizationChartTreeItem treeItem = null;
                    if(!orgChart.isHiddenRootElementProp())
                        treeItem = orgChart.getDiagramTree().getRootItem();
                    else
                        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();
                }
            }
            getController().setTextFieldOfControlDialog();
            return true;
        }
        //****************************************************************************************************


        //ControlDialog2 events ******************************************************************************
        //in Organigroup
        //click on colorImageControl
        if(methodName.equals("showColorTable2")){
            getGui().enableControlDialogWindow(false);
            if(getController().getDiagram().isAnyGradientColorMode())
                getGui().executeGradientDialog();
            else
                getGui().executeColorTable2();
            getGui().enableAndSetFocusControlDialog();
            return true;
        }
       
        //change the add-mode property of shape (underling-associate)
        if(methodName.equals("changedAddProp")){
            ((OrganizationChart)getController().getDiagram()).setNewItemHType((short)((ItemEvent)eventObject).Selected);
            return true;
        }

        //u shortcut key
        if(methodName.equals("up")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    if(getController().getGroupType() == Controller.ORGANIGROUP){
                        OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                        OrganizationChartTreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                        if(treeItem.isDad())
                            if(!orgChart.isHiddenRootElementProp() || !orgChart.getDiagramTree().getRootItem().equals(treeItem.getDad()))
                                getController().setSelectedShape(treeItem.getDad().getRectangleShape());
                    }
                    getController().addSelectionListener();
                }
            }
            getController().setTextFieldOfControlDialog();
            return true;
        }

        //d shortcut key
        if(methodName.equals("down")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    if(getController().getGroupType() == Controller.ORGANIGROUP){
                        OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                        OrganizationChartTreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                        if(treeItem.isFirstChild())
                            getController().setSelectedShape(treeItem.getFirstChild().getRectangleShape());
                    }
                    getController().addSelectionListener();
                }
View Full Code Here

Examples of oxygenoffice.extensions.smart.diagram.organizationcharts.OrganizationChart

        //f shortcut key
        if(methodName.equals("first")){
            if(getController().getDiagram() != null) {
                getController().removeSelectionListener();
                OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                OrganizationChartTreeItem treeItem = null;
                if(!orgChart.isHiddenRootElementProp())
                    treeItem = orgChart.getDiagramTree().getRootItem();
                else
                    treeItem = orgChart.getDiagramTree().getRootItem().getFirstChild();
                if(treeItem != null)
                    getController().setSelectedShape(treeItem.getRectangleShape());
                getController().addSelectionListener();
                getController().setTextFieldOfControlDialog();
            }
            return true;
        }

        //p shortcut key
        if(methodName.equals("previous")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    OrganizationChartTreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                    if(treeItem.isDad()){
                         OrganizationChartTreeItem previousItem = treeItem.getDad().getPreviousSibling(treeItem);
                        if(previousItem != null)
                            getController().setSelectedShape(previousItem.getRectangleShape());
                    }
                    getController().addSelectionListener();
                }
            }
            getController().setTextFieldOfControlDialog();
            return true;
        }

        //n shortcut key
        if(methodName.equals("next")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    OrganizationChartTreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                    if(treeItem.isFirstSibling())
                        getController().setSelectedShape(treeItem.getFirstSibling().getRectangleShape());
                    getController().addSelectionListener();
                }
            }
            getController().setTextFieldOfControlDialog();
            return true;
        }

        //u shortcut key
        if(methodName.equals("up")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    OrganizationChartTreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                    if(treeItem.isDad())
                        if(!orgChart.isHiddenRootElementProp() || !orgChart.getDiagramTree().getRootItem().equals(treeItem.getDad()))
                            getController().setSelectedShape(treeItem.getDad().getRectangleShape());
                    getController().addSelectionListener();
                }
            }
            getController().setTextFieldOfControlDialog();
            return true;
        }

        //d shortcut key
        if(methodName.equals("down")){
            if(getController().isOnlySimpleItemIsSelected()){
                if(getController().getDiagram() != null) {
                    getController().removeSelectionListener();
                    OrganizationChart orgChart = (OrganizationChart)getController().getDiagram();
                    OrganizationChartTreeItem treeItem = orgChart.getDiagramTree().getTreeItem(getController().getSelectedShape());
                    if(treeItem.isFirstChild())
                        getController().setSelectedShape(treeItem.getFirstChild().getRectangleShape());
                    getController().addSelectionListener();
                }
            }
View Full Code Here

Examples of oxygenoffice.extensions.smart.diagram.organizationcharts.OrganizationChart

        if(exec == 1){
            short convType = getGui().getConversationType();
            if(getDiagram() != null) {
                if(getGroupType() == Controller.ORGANIGROUP){
                    short lastHorLevel = getGui().getSelectedItemPosOfConvertDialogListBox();
                    OrganizationChart orgChart = (OrganizationChart)getDiagram();
                    if(orgChart.isErrorInTree()){
                        getGui().askUserForRepair(orgChart);
                    }else{
                        if(convType == Controller.ORGANIGRAM){
                            if(getDiagramType() == Controller.ORGANIGRAM){
                                if(lastHorLevel != OrgChartTree.LASTHORLEVEL){
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.