2
* java-gnome, a UI library for writing GTK and GNOME programs from Java!
4
* Copyright © 2012-2013 Operational Dynamics Consulting, Pty Ltd and Others
6
* The code in this file, and the program it is a part of, is made available
7
* to you by its authors as open source software: you can redistribute it
8
* and/or modify it under the terms of the GNU General Public License version
9
* 2 ("GPL") as published by the Free Software Foundation.
11
* This program is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GPL for more details.
15
* You should have received a copy of the GPL along with this program. If not,
16
* see http://www.gnu.org/licenses/. The authors of this program may be
17
* contacted through http://java-gnome.sourceforge.net/.
19
* Linking this library statically or dynamically with other modules is making
20
* a combined work based on this library. Thus, the terms and conditions of
21
* the GPL cover the whole combination. As a special exception (the
22
* "Classpath Exception"), the copyright holders of this library give you
23
* permission to link this library with independent modules to produce an
24
* executable, regardless of the license terms of these independent modules,
25
* and to copy and distribute the resulting executable under terms of your
26
* choice, provided that you also meet, for each linked independent module,
27
* the terms and conditions of the license of that module. An independent
28
* module is a module which is not derived from or based on this library. If
29
* you modify this library, you may extend the Classpath Exception to your
30
* version of the library, but you are not obligated to do so. If you do not
31
* wish to do so, delete this exception statement from your version.
33
package org.gnome.glib;
35
import org.freedesktop.bindings.Constant;
38
* Flags to modify the format of the string returned by
39
* {@link Glib#formatSize(long, FormatSizeFlags) formatSize()} method.
41
* @author Guillaume Mazoyer
44
public class FormatSizeFlags extends Constant
46
protected FormatSizeFlags(int ordinal, String nickname) {
47
super(ordinal, nickname);
51
* Behave the same as {@link Glib#formatSize(long) formatSize()}.
53
public static final FormatSizeFlags DEFAULT = new FormatSizeFlags(GlibFormatSizeFlags.DEFAULT,
57
* Include the exact number of bytes as part of the returned string. For
58
* example, "45.6 kB (45,612 bytes)".
60
public static final FormatSizeFlags LONG_FORMAT = new FormatSizeFlags(
61
GlibFormatSizeFlags.LONG_FORMAT, "LONG_FORMAT");
64
* Use IEC (base 1024) units with "KiB"-style suffixes. IEC units should
65
* only be used for reporting things with a strong "power of 2" basis,
66
* like RAM sizes. Network and storage sizes should be reported in the
69
public static final FormatSizeFlags IEC_UNITS = new FormatSizeFlags(GlibFormatSizeFlags.IEC_UNITS,