Examples of UnitValue


Examples of com.totsp.gwittir.client.util.UnitsParser.UnitValue

    /**
     * Test of parse method, of class com.totsp.gwittir.client.util.UnitsParser.
     */
    public void testParse() {
        UnitValue v = UnitsParser.parse( "100px" );
        this.assertEquals( 100, v.value );
        this.assertEquals( "px", v.units );
    }
View Full Code Here

Examples of com.volantis.shared.metadata.value.UnitValue

        NumberValueImpl numberValue = new MutableNumberValueImpl();
        numberValue.setValue(new Double(10));
        mutableQuantityValue.setMagnitudeValue( numberValue );

        UnitValue unitValue = QuantityUnits.CENTIMETERS;
        mutableQuantityValue.setUnitValue(unitValue);

        Number expectedResultInMillimeters = new Double(100);
        Number result =
                mutableQuantityValue.getMagnitudeAsNumber(QuantityUnits.MILLIMETERS);
View Full Code Here

Examples of net.miginfocom.layout.UnitValue

          Point p = mousePos != null ? SwingUtilities.convertPoint(panel, mousePos, c) : new Point(-1000, -1000);

          float fact = (float) Math.sqrt(Math.pow(Math.abs(p.x - c.getWidth() / 2f), 2) + Math.pow(Math.abs(p.y - c.getHeight() / 2f), 2));
          fact = Math.max(2 - (fact / 200), 1);

          return new BoundSize[] {new BoundSize(new UnitValue(70 * fact), ""), new BoundSize(new UnitValue(70 * fact), "")};
        }
        return null;
      }

      // This is the jumping part
View Full Code Here

Examples of net.miginfocom.layout.UnitValue

          Point p = mousePos != null ? SwingUtilities.convertPoint(panel, mousePos, c) : new Point(-1000, -1000);

          float fact = (float) Math.sqrt(Math.pow(Math.abs(p.x - c.getWidth() / 2f), 2) + Math.pow(Math.abs(p.y - c.getHeight() / 2f), 2));
          fact = Math.max(2 - (fact / 200), 1);

          return new BoundSize[] {new BoundSize(new UnitValue(70 * fact), ""), new BoundSize(new UnitValue(70 * fact), "")};
        }
        return null;
      }

      // This is the jumping part
View Full Code Here

Examples of net.miginfocom.layout.UnitValue

  {
    if (constrain == null)
      return winSize;

    int retSize = winSize;
    UnitValue wUV = constrain.getPreferred();
    if (wUV != null)
      retSize = wUV.getPixels(prefSize, parent, parent);

    retSize = constrain.constrain(retSize, prefSize, parent);

    return constrain.getGapPush() ? Math.max(winSize, retSize) : retSize;
  }
View Full Code Here

Examples of pathfinder.bean.spell.UnitValue

      }
      if (composant == null) {
        composant = "";
      }

      UnitValue range = parseUnitValues(element.element("range"));

      UnitValue castingTime = parseUnitValues(element
          .element("castingTime"));

      String description = getTextValue(element.element("summary"));
      if (description == null) {
        description = "";
View Full Code Here

Examples of pathfinder.bean.spell.UnitValue

    return res;
  }

  public static UnitValue parseUnitValues(Element element) {
    if (element == null) {
      return new UnitValue("", "");
    }

    String unitType = null;
    if (element.attributeCount() > 0) {
      unitType = element.attributeValue("unit");
    }
    String value = element.getTextTrim();
    if (value.isEmpty()) {
      value = element.attributeValue("value");
    }

    return new UnitValue(unitType, value);
  }
View Full Code Here

Examples of pathfinder.bean.spell.UnitValue

      }
      if (composant == null) {
        composant = "";
      }

      UnitValue range = parseUnitValues(element.element("range"));

      UnitValue castingTime = parseUnitValues(element
          .element("castingTime"));

      String description = getTextValue(element.element("summary"));
      if (description == null) {
        description = "";
View Full Code Here

Examples of pathfinder.bean.spell.UnitValue

    return res;
  }

  public static UnitValue parseUnitValues(Element element) {
    if (element == null) {
      return new UnitValue("", "");
    }

    String unitType = null;
    if (element.attributeCount() > 0) {
      unitType = element.attributeValue("unit");
    }
    String value = element.getTextTrim();
    if (value.isEmpty()) {
      value = element.attributeValue("value");
    }

    return new UnitValue(unitType, value);
  }
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.