HolonTransformer.java 656 B

12345678910111213141516171819202122232425262728293031323334
  1. package ui.model;
  2. public class HolonTransformer extends CpsObject {
  3. /* Ratio of the transformer */
  4. float transformRatio;
  5. /**
  6. * Constructor Set type of object (Transformer), its transform ratio and the
  7. * default name ("Transformer");
  8. */
  9. public HolonTransformer(String ObjName) {
  10. super(ObjName);
  11. }
  12. /**
  13. * Set transform ratio
  14. *
  15. * @param ratio
  16. * desired ratio
  17. */
  18. public void setTransformRatio(float ratio) {
  19. this.transformRatio = ratio;
  20. }
  21. /**
  22. * Output the actual ratio of the transformer
  23. *
  24. * @return actual ratio of the transformer
  25. */
  26. public float getTransformRatio() {
  27. return this.transformRatio;
  28. }
  29. }