Package org.tinyuml.draw

Examples of org.tinyuml.draw.ClassElement


   * Tests the creation of an Association.
   */
  public void testCreateAssociation() {
    mockElementFactory.expects(atLeastOnce()).method("create").
      with(eq(ElementType.CLASS)).will(returnValue(clss));
    ClassElement class1 = factory.createClass();
    ClassElement class2 = factory.createClass();

    mockElementFactory.expects(atLeastOnce()).method("create").
      with(eq(ElementType.DEPENDENCY)).will(returnValue(assoc));

    Association conn = (Association) factory.createAssociation(class1, class2);
View Full Code Here


   * Tests the creation of a note connection.
   */
  public void testCreateNoteConnection() {
    mockElementFactory.expects(atLeastOnce()).method("create").
      with(eq(ElementType.CLASS)).will(returnValue(clss));
    ClassElement clss = factory.createClass();
    NoteElement note = factory.createNote();
    NoteConnection conn = (NoteConnection)
      factory.createNoteConnection(clss, note);
    assertNull(conn.getModelElement());
    assertEquals(clss, conn.getNode0());
View Full Code Here

  @Override
  protected void setUp() {
    mockMainCompartment.expects(once()).method("setParent");
    mockOpCompartment.expects(once()).method("setParent");
    mockMainCompartment.expects(once()).method("addLabel");
    mockedElement = new ClassElement(umlclass,
      (Compartment) mockMainCompartment.proxy(),
      (Compartment) mockOpCompartment.proxy());
  }
View Full Code Here

    int shapeId = Integer.valueOf(attributes.getValue("id"));
    Node shape = null;

    NamedElement elem = elementMap.get(elementId);
    if (elem instanceof UmlClass) {
      shape = new ClassElement((UmlClass) elem);
    } else if (elem instanceof UmlPackage) {
      shape = diagram.getElementFactory().createPackage((UmlPackage) elem);
    } else if (elem instanceof UmlComponent) {
      shape = new ComponentElement((UmlComponent) elem);
    }
View Full Code Here

    int shapeId = Integer.valueOf(attributes.getValue("id"));
    Node shape = null;

    NamedElement elem = elementMap.get(elementId);
    if (elem instanceof UmlClass) {
      shape = new ClassElement((UmlClass) elem);
    } else if (elem instanceof UmlPackage) {
      shape = diagram.getElementFactory().createPackage((UmlPackage) elem);
    } else if (elem instanceof UmlComponent) {
      shape = new ComponentElement((UmlComponent) elem);
    }
View Full Code Here

    int shapeId = Integer.valueOf(attributes.getValue("id"));
    Node shape = null;

    NamedElement elem = elementMap.get(elementId);
    if (elem instanceof UmlClass) {
      shape = new ClassElement((UmlClass) elem);
    } else if (elem instanceof UmlPackage) {
      shape = new PackageElement((UmlPackage) elem);
    } else if (elem instanceof UmlComponent) {
      shape = new ComponentElement((UmlComponent) elem);
    }
View Full Code Here

TOP

Related Classes of org.tinyuml.draw.ClassElement

Copyright © 2018 www.massapicom. 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.