Examples of LabelSource


Examples of org.tinyuml.draw.LabelSource

 
  /**
   * Tests setting LabelSource methods.
   */
  public void testLabelSourceMethods() {
    label.setSource(new LabelSource() {
      public String getLabelText() { return null; }
      public void setLabelText(String aText) { }
    });
    assertEquals(label, label.getSource()); // is still the same
    label.setLabelText("sometext"); // has no effect
View Full Code Here

Examples of org.tinyuml.draw.LabelSource

  /**
   * 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() {
        return getRelation().getElement2Multiplicity().toString();
View Full Code Here

Examples of org.tinyuml.draw.LabelSource

  /**
   * 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() {
        return getRelation().getElement2Multiplicity().toString();
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.