Package org.tinyuml.model

Examples of org.tinyuml.model.UmlPackage


  /**
   * Tests the basic setter methods.
   */
  public void testBasicSetters() {
    UmlPackage pkg = UmlPackage.getPrototype();
    pkg.setName("mypackage");
    PackageElement shape = new PackageElement(pkg);
    assertEquals("mypackage", shape.getLabelText());
    assertEquals(pkg, shape.getModelElement());
   
    // sets the name
    shape.setLabelText("yourpackage");
    assertEquals("yourpackage", pkg.getName());
    assertEquals("yourpackage", shape.getLabelText());
  }
View Full Code Here


    NoteElement notePrototype = (NoteElement)
      NoteElement.getPrototype().clone();
    elementPrototypes.put(ElementType.NOTE, notePrototype);

    // Add package prototype
    UmlPackage pkg = (UmlPackage) UmlPackage.getPrototype().clone();
    PackageElement pkgPrototype = (PackageElement)
      PackageElement.getPrototype().clone();
    pkg.setName("Package 1");
    pkgPrototype.setUmlPackage(pkg);
    elementPrototypes.put(ElementType.PACKAGE, pkgPrototype);

    // add component prototype
    UmlComponent comp = (UmlComponent) UmlComponent.getPrototype().clone();
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public PackageElement createPackage() {
    UmlPackage pkg = (UmlPackage)
      modelElementFactory.create(ElementType.PACKAGE);
    pkg.setName("Package 1");
    PackageElement pkgElem = createPackage(pkg);
    pkgElem.addNodeChangeListener(diagram);
    return pkgElem;
  }
View Full Code Here

    NoteElement notePrototype = (NoteElement)
      NoteElement.getPrototype().clone();
    elementPrototypes.put(ElementType.NOTE, notePrototype);

    // Add package prototype
    UmlPackage pkg = (UmlPackage) UmlPackage.getPrototype().clone();
    PackageElement pkgPrototype = (PackageElement)
      PackageElement.getPrototype().clone();
    pkg.setName("Package 1");
    pkgPrototype.setUmlPackage(pkg);
    elementPrototypes.put(ElementType.PACKAGE, pkgPrototype);

    // add component prototype
    UmlComponent comp = (UmlComponent) UmlComponent.getPrototype().clone();
View Full Code Here

TOP

Related Classes of org.tinyuml.model.UmlPackage

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.