Package org.tinyuml.draw

Examples of org.tinyuml.draw.SimpleLabel


  /**
   * Sets the multiplicity label sources.
   */
  private void setupMultiplicityLabels() {
    multiplicity1Label = new SimpleLabel();
    multiplicity1Label.setSource(new LabelSource() {
      /**
       * {@inheritDoc}
       */
      public String getLabelText() {
        return getRelation().getElement1Multiplicity().toString();
      }

      /**
       * {@inheritDoc}
       */
      public void setLabelText(String aText) { }
    });

    multiplicity2Label = new SimpleLabel();
    multiplicity2Label.setSource(new LabelSource() {
      /**
       * {@inheritDoc}
       */
      public String getLabelText() {
View Full Code Here


  /**
   * Constructor.
   */
  public AssociationNameLabel() {
    setLabel(new SimpleLabel());
  }
View Full Code Here

   */
  private ClassElement() {
    mainCompartment = new Compartment();
    attributesCompartment = new Compartment();
    operationsCompartment = new Compartment();
    mainLabel = new SimpleLabel();
    mainLabel.setSource(this);
    mainCompartment.addLabel(mainLabel);
    mainCompartment.setParent(this);
    attributesCompartment.setParent(this);
    attributesCompartment.setAlignment(Alignment.LEFT);
View Full Code Here

   * {@inheritDoc}
   */
  public void elementChanged(UmlModelElement element) {
    attributesCompartment.removeAllLabels();
    for (UmlProperty property : ((UmlClass) element).getAttributes()) {
      Label label = new SimpleLabel();
      label.setSource(new UmlModelElementLabelSource(property));
      attributesCompartment.addLabel(label);
    }
    operationsCompartment.removeAllLabels();
    for (UmlProperty property : ((UmlClass) element).getMethods()) {
      Label label = new SimpleLabel();
      label.setSource(new UmlModelElementLabelSource(property));
      operationsCompartment.addLabel(label);
    }
    reinitMainCompartment();
    invalidate();
  }
View Full Code Here

  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);
      }
    }
    mainCompartment.addLabel(mainLabel);
  }
View Full Code Here

TOP

Related Classes of org.tinyuml.draw.SimpleLabel

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.