/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts .ClassNameEditPart) { return true; } if (childEditPart instanceof edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts .WrappingLabel2EditPart) { return true; } if (childEditPart instanceof edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts .ClassClassOperationsCompartmentEditPart) { IFigure pane = getPrimaryShape().getClassOperationsCompartmentFigure(); pane.remove( ((edu.toronto.cs.se.modelepedia.icse15_sequencediagram_mavo.diagram.edit.parts .ClassClassOperationsCompartmentEditPart) childEditPart) .getFigure()); return true; } return false; }
@Override public void setCollapsed(boolean collapsed) { if (isCollapsed() == collapsed) return; getContentFigure().setCollapsed(collapsed); IFigure figure = getContentPane(); if (isCollapsed()) { // First refresh children, which removes all model children's figures refreshChildren(); // Manually remove the rest of the children IFigure[] children = (IFigure[]) figure.getChildren().toArray(new IFigure[0]); for (int i = 0; i < children.length; i++) { figure.remove(children[i]); } // Now restore the collapsed children, border and layout configureCollapsedFigure(figure); } else { // Manually remove the children IFigure[] children = (IFigure[]) figure.getChildren().toArray(new IFigure[0]); for (int i = 0; i < children.length; i++) { figure.remove(children[i]); } // Now restore the expanded children, border and layout configureExpandedFigure(figure); refreshChildren(); } // refreshSourceConnections(); // refreshTargetConnections(); // // // Switching collapsed states may have changed the border, which is // // responsible for drawing the drawer markers. Refresh these markers // // now. // // TODO: This isn't necessary anymore // refreshDrawerImages(); // // Force a repaint, as the drawer images may have changed. // getFigure().repaint(); // Instead of manually calling all refresh methods, // a call to refreshVisuals should be enough refreshVisuals(); }
protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof NamedElementNodeLabelNameEditPart) { return true; } if (childEditPart instanceof PropertyCompartmentEditPart) { IFigure pane = getPrimaryShape().getPropertyCompartmentFigure(); setupContentPane(pane); pane.remove(((PropertyCompartmentEditPart) childEditPart).getFigure()); return true; } if (childEditPart instanceof OperationCompartmentEditPart) { IFigure pane = getPrimaryShape().getOperationCompartmentFigure(); setupContentPane(pane); pane.remove(((OperationCompartmentEditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof ModelNameEditPartCN) { return true; } if (childEditPart instanceof ModelPackageableElementCompartmentEditPartCN) { IFigure pane = getPrimaryShape().getPackageableElementFigure(); pane.remove(((ModelPackageableElementCompartmentEditPartCN) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof LoopDescription5EditPart) { return true; } if (childEditPart instanceof LoopLoopLoopStatementsCompartment5EditPart) { IFigure pane = getPrimaryShape().getLoopLoopStatementsCompartmentFigure(); pane.remove(((LoopLoopLoopStatementsCompartment5EditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof FormNameEditPart) { return true; } if (childEditPart instanceof FormFormElementsCompartmentEditPart) { IFigure pane = getPrimaryShape().getFigureFormElementsCompartmentFigure(); pane.remove(((FormFormElementsCompartmentEditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof RedefinableTemplateSignatureTemplateParameterCompartmentEditPart) { IFigure pane = getPrimaryShape().getTemplateParameterRectangle(); setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way pane.remove( ((RedefinableTemplateSignatureTemplateParameterCompartmentEditPart) childEditPart) .getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof CollaborationCompositeNameEditPart) { return true; } if (childEditPart instanceof CollaborationCompositeCompartmentEditPart) { IFigure pane = getPrimaryShape().getCompositeCompartmentFigure(); pane.remove(((CollaborationCompositeCompartmentEditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof EventTimestampEditPart) { return true; } if (childEditPart instanceof EventEventFigureFactCompartmentEditPart) { IFigure pane = getPrimaryShape().getFigureEventFigureCompartmentRectangle(); setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way pane.remove(((EventEventFigureFactCompartmentEditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof SubjectClassifierNameEditPartTN) { return true; } if (childEditPart instanceof SubjectComponentUsecasesEditPart) { IFigure pane = getPrimaryShape().getUseCasesContainerFigure(); setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way pane.remove(((SubjectComponentUsecasesEditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof ProfileNameEditPartTN) { return true; } if (childEditPart instanceof ProfilePackageableElementCompartmentEditPartTN) { IFigure pane = getPrimaryShape().getPackageableElementFigure(); setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way pane.remove(((ProfilePackageableElementCompartmentEditPartTN) childEditPart).getFigure()); return true; } return false; }
private void addLabelForFigure(IFigure figure, GraphLabel label) { IFigure parent = figure.getParent(); if (parent instanceof ZestRootLayer) { ((ZestRootLayer) parent).addDecoration(figure, label); } else { if (parent.getChildren().contains(label)) { parent.remove(label); } int index = parent.getChildren().indexOf(figure); parent.add(label, index + 1); } }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof SplitJoinName3EditPart) { return true; } if (childEditPart instanceof SplitJoinSplitJoinComponentsCompartment2EditPart) { IFigure pane = getPrimaryShape().getSplitJoinComponentsCompartmentFigure(); setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way pane.remove(((SplitJoinSplitJoinComponentsCompartment2EditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof InstanceSpecificationNameEditPartCN) { return true; } if (childEditPart instanceof InstanceSpecificationSlotCompartmentEditPartCN) { IFigure pane = getPrimaryShape().getSlotCompartmentFigure(); setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way pane.remove(((InstanceSpecificationSlotCompartmentEditPartCN) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof SequenceName5EditPart) { return true; } if (childEditPart instanceof SequenceSequenceCompartment5EditPart) { IFigure pane = getPrimaryShape().getFigureSequenceFigureCompartment(); setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way pane.remove(((SequenceSequenceCompartment5EditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof ArtifactNameEditPartACN) { return true; } if (childEditPart instanceof ArtifactCompositeCompartmentEditPartACN) { IFigure pane = getPrimaryShape().getCompositeCompartmentFigure(); setupContentPane(pane); // FIXME each comparment should handle his // content pane in his own way pane.remove(((ArtifactCompositeCompartmentEditPartACN) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof SceneTopicEditPart) { return true; } if (childEditPart instanceof SceneDialogueEditPart) { return true; } if (childEditPart instanceof SceneSketchesCompartmentEditPart) { IFigure pane = getPrimaryShape().getFigureSketchesCompartmentFigure(); setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way pane.remove(((SceneSketchesCompartmentEditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof ContainerName2EditPart) { return true; } if (childEditPart instanceof ContainerContainerCompartment2EditPart) { IFigure pane = getPrimaryShape().getFigureContainerCompartmentFigure(); pane.remove(((ContainerContainerCompartment2EditPart) childEditPart).getFigure()); return true; } if (childEditPart instanceof PortEditPart) { getBorderedFigure() .getBorderItemContainer() .remove(((PortEditPart) childEditPart).getFigure()); return true; } return false; }
/** * Removes a decoration. * * @param decoratorTarget the decorator target * @param Decoration the decoration */ public final void removeDecoration(IDecoration decoration) { if ((decoration == null) || (decoratorTarget == null)) { return; } if (decoration instanceof IFigure) { IFigure parent = ((IFigure) decoration).getParent(); if (parent != null) { parent.remove((IFigure) decoration); } } // decorations.remove(decoration); GraphicalEditPart ownerEditPart = (GraphicalEditPart) decoratorTarget.getAdapter(GraphicalEditPart.class); if (ownerEditPart.getViewer() != null) { ownerEditPart.getViewer().getVisualPartMap().remove(decoration); } }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof stateAnalysis.diagram.edit.parts.DeploymentSetNameEditPart) { return true; } if (childEditPart instanceof stateAnalysis.diagram.edit.parts.DeploymentSetDeploymentSetDeploymentsCompartmentEditPart) { IFigure pane = getPrimaryShape().getDeploymentSetDeploymentsCompartmentFigure(); pane.remove( ((stateAnalysis .diagram .edit .parts .DeploymentSetDeploymentSetDeploymentsCompartmentEditPart) childEditPart) .getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof PackageNameEditPart) { return true; } if (childEditPart instanceof PackagePackageableElementCompartmentEditPart) { IFigure pane = getPrimaryShape().getPackageableElementFigure(); pane.remove(((PackagePackageableElementCompartmentEditPart) childEditPart).getFigure()); return true; } if (childEditPart instanceof RedefinableTemplateSignatureEditPart) { getBorderedFigure() .getBorderItemContainer() .remove(((RedefinableTemplateSignatureEditPart) childEditPart).getFigure()); return true; } if (childEditPart instanceof TemplateSignatureEditPart) { getBorderedFigure() .getBorderItemContainer() .remove(((TemplateSignatureEditPart) childEditPart).getFigure()); return true; } return false; }
/** @generated */ protected boolean removeFixedChild(EditPart childEditPart) { if (childEditPart instanceof stateAnalysis.diagram.edit.parts.StateVariableName2EditPart) { return true; } if (childEditPart instanceof stateAnalysis .diagram .edit .parts .StateVariableStateVariableInStateConstraintsCompartment2EditPart) { IFigure pane = getPrimaryShape().getStateVariableInStateConstraintsCompartmentFigure(); pane.remove( ((stateAnalysis .diagram .edit .parts .StateVariableStateVariableInStateConstraintsCompartment2EditPart) childEditPart) .getFigure()); return true; } if (childEditPart instanceof stateAnalysis .diagram .edit .parts .StateVariableStateVariableOutStateConstraintsCompartment2EditPart) { IFigure pane = getPrimaryShape().getStateVariableOutStateConstraintsCompartmentFigure(); pane.remove( ((stateAnalysis .diagram .edit .parts .StateVariableStateVariableOutStateConstraintsCompartment2EditPart) childEditPart) .getFigure()); return true; } if (childEditPart instanceof stateAnalysis .diagram .edit .parts .StateVariableStateVariableStateUpdatesCompartment2EditPart) { IFigure pane = getPrimaryShape().getStateVariableStateUpdatesCompartmentFigure(); pane.remove( ((stateAnalysis .diagram .edit .parts .StateVariableStateVariableStateUpdatesCompartment2EditPart) childEditPart) .getFigure()); return true; } if (childEditPart instanceof stateAnalysis .diagram .edit .parts .StateVariableStateVariableInfluencedByCompartment2EditPart) { IFigure pane = getPrimaryShape().getStateVariableInfluencedByCompartmentFigure(); pane.remove( ((stateAnalysis .diagram .edit .parts .StateVariableStateVariableInfluencedByCompartment2EditPart) childEditPart) .getFigure()); return true; } return false; }