public UMLBox(UMLDiagram ownerDiagram, DI.GraphNode graphNode) : base(ownerDiagram, graphNode) { _outerBox = new CanvasRect (ChildrensRoot); _outerBox.X1 = _outerBox.Y1 = 0; _outerBox.X2 = Width; _outerBox.Y2 = Height; _outerBox.FillColor = DEFAULT_FILL_COLOR; _outerBox.OutlineColor = DEFAULT_OUTLINE_COLOR; Width = graphNode.Size.Width; Height = graphNode.Size.Height; // gets the corresponding model element Uml2SemanticModelBridge bridge = (Uml2SemanticModelBridge) graphNode.SemanticModel; _modelElement = (UML.NamedElement) bridge.Element; DI.GraphElement nestedDiagElem; DI.SimpleSemanticModelElement nestedBridge; // looks for the Name compartment foreach (DI.DiagramElement elem in GraphNode.Contained) { nestedDiagElem = elem as DI.GraphElement; if (nestedDiagElem != null) { nestedBridge = nestedDiagElem.SemanticModel as DI.SimpleSemanticModelElement; if (nestedBridge.TypeInfo == "NameCompartment") { // widget for the property Name _name = new UMLEntry (this, (DI.GraphNode)nestedDiagElem, ChildrensRoot, false, _modelElement.Name); _name.Show(); break; } } } Redraw (); }
private Hub() { _currentNotebook = null; _draggedElement = null; _filename = String.Empty; ClearElementsList(); _broadcaster = new CentralBroadcaster(); _eventQueue = new EventQueue(_broadcaster); }
public UMLNamedEdge( UMLDiagram ownerDiagram, DI.GraphEdge graphEdge, UML.NamedElement namedElementModel, bool forceRedraw) : base(ownerDiagram, graphEdge, forceRedraw) { _namedElementModel = namedElementModel; SearchAndDrawName (graphEdge, ownerDiagram); }
public void ShowVisibilityFor(UML.NamedElement element) { _namedElement = element; this.Value = _namedElement.Visibility; }
public new void Hide() { _namedElement = null; base.Hide (); }