com.jacob.com.Variant.getInt()

Here are the examples of the java api com.jacob.com.Variant.getInt() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

17 Source : DiskUtils.java
with GNU Lesser General Public License v2.1
from freemansoft

/**
 * Convenience method. We go through these formatting hoops so we can make
 * the size string pretty. We wouldn't have to do that if we didn't mind
 * long strings with Exxx at the end or the fact that the value returned can
 * vary in size based on the size of the disk.
 *
 * @return driver total size of the disk
 */
public String getTotalSize() {
    Variant returnValue = Dispatch.get(myDrive, "TotalSize");
    if (returnValue.getvt() == Variant.VariantDouble) {
        return sizeFormatter.format(returnValue.getDouble());
    } else if (returnValue.getvt() == Variant.VariantInt) {
        return sizeFormatter.format(returnValue.getInt());
    } else {
        return "Don't know type: " + returnValue.getvt();
    }
}

17 Source : DiskUtils.java
with GNU Lesser General Public License v2.1
from freemansoft

/**
 * Convenience method. We wouldn't have to do that if we didn't mind long
 * strings with Exxx at the end or the fact that the value returned can vary
 * in size based on the size of the disk.
 *
 * @return driver free size of the disk
 */
public String getFreeSpace() {
    Variant returnValue = Dispatch.get(myDrive, "FreeSpace");
    if (returnValue.getvt() == Variant.VariantDouble) {
        return sizeFormatter.format(returnValue.getDouble());
    } else if (returnValue.getvt() == Variant.VariantInt) {
        return sizeFormatter.format(returnValue.getInt());
    } else {
        return "Don't know type: " + returnValue.getvt();
    }
}