//f shortcut key
if(methodName.equals("first")){
if(getController().getDiagram() != null) {
getController().removeSelectionListener();
RelationDiagramItem item = ((RelationDiagram)getController().getDiagram()).getFirstItem();
if(item != null){
getController().setSelectedShape(item.getMainShape());
setNextColorOnControlDialog();
}
getController().addSelectionListener();
}
getController().setTextFieldOfControlDialog();
return true;
}
//p shortcut key
if(methodName.equals("previous")){
if(getController().isOnlySimpleItemIsSelected()){
if(getController().getDiagram() != null) {
getController().removeSelectionListener();
XShape xShape = ((RelationDiagram)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();
XShape xShape = ((RelationDiagram)getController().getDiagram()).getNextShape();
if(xShape != null){
getController().setSelectedShape(xShape);
setNextColorOnControlDialog();
}
getController().addSelectionListener();
}
}
getController().setTextFieldOfControlDialog();
return true;
}
//m shortcut key
if(methodName.equals("mainShape")){
if(getController().isOnlySimpleItemIsSelected()){
if(getController().getDiagram() != null) {
getController().removeSelectionListener();
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();
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();
}