Package org.tinyuml.ui.model

Examples of org.tinyuml.ui.model.TinyUmlProject


  /**
   * Tests setters and getters.
   */
  public void testSetters() {
    Mock mockModel = mock(UmlModel.class);
    TinyUmlProject project = new TinyUmlProject((UmlModel) mockModel.proxy());
    assertEquals(mockModel.proxy(), project.getModel());
    assertEquals(0, project.getOpenDiagrams().size());
    Mock mockDiagram0 = mock(UmlDiagram.class);
    Mock mockDiagram1 = mock(UmlDiagram.class);
    project.addOpenDiagram((UmlDiagram) mockDiagram0.proxy());
    project.addOpenDiagram((UmlDiagram) mockDiagram1.proxy());
    assertEquals(2, project.getOpenDiagrams().size());
    assertEquals(mockDiagram0.proxy(), project.getOpenDiagrams().get(0));
    assertEquals(mockDiagram1.proxy(), project.getOpenDiagrams().get(1));
  }
View Full Code Here


  /**
   * Prepares and creates a project object for writing.
   * @return the project object
   */
  protected TinyUmlProject createProjectForWrite() {
    TinyUmlProject result = new TinyUmlProject(umlModel);
    for (int i = 0; i < tabbedPane.getTabCount(); i++) {
      EditorPanel editorPanel = (EditorPanel) tabbedPane.getComponentAt(i);
      result.addOpenDiagram(editorPanel.getDiagramEditor().getDiagram());
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of org.tinyuml.ui.model.TinyUmlProject

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.