Examples of UmlClass


Examples of org.tinyuml.model.UmlClass

  /**
   * Reinitializes the main compartment with the contained labels.
   */
  private void reinitMainCompartment() {
    UmlClass umlclass = (UmlClass) getModelElement();
    mainCompartment.removeAllLabels();
    if (showStereotypes) {
      for (UmlStereotype stereotype : umlclass.getStereotypes()) {
        Label label = new SimpleLabel();
        label.setSource(new UmlModelElementLabelSource(stereotype));
        mainCompartment.addLabel(label);
      }
    }
View Full Code Here

Examples of org.tinyuml.model.UmlClass

 
  /**
   * Tests UmlClass creation.
   */
  public void testCreateClass() {
    UmlClass cl1 = (UmlClass) factory.create(ElementType.CLASS);
    assertNotNull(cl1);
    assertTrue(umlModel.contains(cl1));
  }
View Full Code Here

Examples of org.tinyuml.model.UmlClass

  /**
   * Initializes the models in this dialog.
   */
  private void myInitModels() {
    UmlClass umlclass = (UmlClass) classElement.getModelElement();
    for (UmlProperty method : umlclass.getMethods()) {
      methodTableModel.addEntry(method.getName());
    }
    for (UmlProperty attribute : umlclass.getAttributes()) {
      attributeTableModel.addEntry(attribute.getName());
    }
    for (UmlStereotype stereotype : umlclass.getStereotypes()) {
      stereotypeTableModel.addEntry(stereotype.getName());
    }
  }
View Full Code Here

Examples of org.tinyuml.model.UmlClass

  /**
   * Initialization after model and components are initialized.
   */
  private void myPostInit() {
    docVisibilityCb.setEnabled(false);
    UmlClass umlclass = (UmlClass) classElement.getModelElement();
    abstractCb.setSelected(umlclass.isAbstract());
    attributeVisibilityCb.setSelected(classElement.showAttributes());
    methodVisibilityCb.setSelected(classElement.showOperations());
    stereotypeVisibilityCb.setSelected(classElement.showStereotypes());
    methodTable.getTableHeader().setVisible(false);
    attributeTable.getTableHeader().setVisible(false);
    stereotypeTable.getTableHeader().setVisible(false);
    nameTextField.setText(umlclass.getName());
    getRootPane().setDefaultButton(okButton);
  }
View Full Code Here

Examples of org.tinyuml.model.UmlClass

  /**
   * Reinitializes the main compartment with the contained labels.
   */
  private void reinitMainCompartment() {
    UmlClass umlclass = (UmlClass) getModelElement();
    mainCompartment.removeAllLabels();
    if (showStereotypes) {
      for (UmlStereotype stereotype : umlclass.getStereotypes()) {
        Label label = new Label();
        label.setSource(new UmlModelElementLabelSource(stereotype));
        mainCompartment.addLabel(label);
      }
    }
View Full Code Here

Examples of org.tinyuml.model.UmlClass

    compElem.setModelElement(comp);
    compElem.addNodeChangeListener(diagram);
    elementPrototypes.put(ElementType.COMPONENT, compElem);

    // Add class prototype
    UmlClass clss = (UmlClass) UmlClass.getPrototype().clone();
    clss.setName("Class 1");
    ClassElement classElem = (ClassElement) ClassElement.getPrototype().clone();
    classElem.setModelElement(clss);
    classElem.addNodeChangeListener(diagram);
    elementPrototypes.put(ElementType.CLASS, classElem);
  }
View Full Code Here

Examples of org.tinyuml.model.UmlClass

  /**
   * {@inheritDoc}
   */
  public ClassElement createClass() {
    UmlClass clss = (UmlClass)
      modelElementFactory.create(ElementType.CLASS);
    ClassElement classElem = new ClassElement(clss);
    classElem.addNodeChangeListener(diagram);
    return classElem;
  }
View Full Code Here

Examples of org.tinyuml.model.UmlClass

  /**
   * Initializes the models in this dialog.
   */
  private void myInitModels() {
    UmlClass umlclass = (UmlClass) classElement.getModelElement();
    for (UmlProperty method : umlclass.getMethods()) {
      methodTableModel.addEntry(method.getName());
    }
    for (UmlProperty attribute : umlclass.getAttributes()) {
      attributeTableModel.addEntry(attribute.getName());
    }
    for (UmlStereotype stereotype : umlclass.getStereotypes()) {
      stereotypeTableModel.addEntry(stereotype.getName());
    }
  }
View Full Code Here

Examples of org.tinyuml.model.UmlClass

  /**
   * Initialization after model and components are initialized.
   */
  private void myPostInit() {
    docVisibilityCb.setEnabled(false);
    UmlClass umlclass = (UmlClass) classElement.getModelElement();
    abstractCb.setSelected(umlclass.isAbstract());
    attributeVisibilityCb.setSelected(classElement.showAttributes());
    methodVisibilityCb.setSelected(classElement.showOperations());
    stereotypeVisibilityCb.setSelected(classElement.showStereotypes());
    methodTable.getTableHeader().setVisible(false);
    attributeTable.getTableHeader().setVisible(false);
View Full Code Here

Examples of org.tinyuml.model.UmlClass

  /**
   * Initializes the models in this dialog.
   */
  private void myInitModels() {
    UmlClass umlclass = (UmlClass) classElement.getModelElement();
    for (UmlProperty method : umlclass.getMethods()) {
      methodTableModel.addEntry(method.getName());
    }
    for (UmlProperty attribute : umlclass.getAttributes()) {
      attributeTableModel.addEntry(attribute.getName());
    }
    for (UmlStereotype stereotype : umlclass.getStereotypes()) {
      stereotypeTableModel.addEntry(stereotype.getName());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.