All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentcs.guing.common.components.drawing.ZoomItem Maven / Gradle / Ivy

There is a newer version: 6.2.0
Show newest version
/**
 * Copyright (c) The openTCS Authors.
 *
 * This program is free software and subject to the MIT license. (For details,
 * see the licensing information (LICENSE.txt) you should have received with
 * this copy of the software.)
 */
package org.opentcs.guing.common.components.drawing;

/**
 * An item to show in a combo box.
 */
public class ZoomItem {

  private final double scaleFactor;

  public ZoomItem(double scaleFactor) {
    this.scaleFactor = scaleFactor;
  }

  public double getScaleFactor() {
    return scaleFactor;
  }

  @Override
  public String toString() {
    return String.format("%d %%", (int) (scaleFactor * 100));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy