public enum TimeUnit extends Enum<TimeUnit>
The TimeUnit enum represents different time units for specifying the duration of a project in the GroupDocs.Viewer component. It provides a set of predefined time units that can be used to represent and calculate the duration of a project, such as days, months and so on. For details, see the documentation.
Example usage:
HtmlViewOptions pdfViewOptions = HtmlViewOptions.forEmbeddedResources();
ProjectManagementOptions projectManagementOptions = pdfViewOptions.getProjectManagementOptions();
projectManagementOptions.setTimeUnit(TimeUnit.MONTHS);
try (Viewer viewer = new Viewer("document.mpp")) {
viewer.view(pdfViewOptions);
// Use the viewer object for further operations
}
Viewer,
ProjectManagementOptions,
HtmlViewOptions| Enum Constant and Description |
|---|
DAYS
Days time scale.
|
MONTHS
Months time scale.
|
THIRDS_OF_MONTHS
Thirds of months time scale.
|
UNSPECIFIED
The unknown time scale.
|
| Modifier and Type | Method and Description |
|---|---|
static TimeUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimeUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimeUnit DAYS
Days time scale. This time unit represents a one-day interval.
For details, see the documentation.public static final TimeUnit MONTHS
Months time scale. This time unit represents a one-month interval.
For details, see the documentation.public static final TimeUnit THIRDS_OF_MONTHS
Thirds of months time scale. This time unit represents a one-third of the month interval.
For details, see the documentation.public static final TimeUnit UNSPECIFIED
The unknown time scale. This time unit represents an unknown or unspecified time scale.
For details, see the documentation.public static TimeUnit valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static TimeUnit[] values()
for (TimeUnit c : TimeUnit.values()) System.out.println(c);
Copyright © 2025. All rights reserved.