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