BrightSide Workbench Full Report + Source Code
org.turro.zkoss.svg.GanttMeasure Enum Reference

Public Member Functions

double convert (double hours)
 

Static Public Member Functions

static GanttMeasure chooseMeasure (double hours)
 
static double toDays (double hours)
 
static double toWeeks (double hours)
 
static double toMonths (double hours)
 
static double toQuarters (double hours)
 
static double toYears (double hours)
 

Public Attributes

 GANTT_BY_HOURS
 
 GANTT_BY_DAYS
 
 GANTT_BY_WEEKS
 
 GANTT_BY_MONTHS
 
 GANTT_BY_QUARTERS
 
 GANTT_BY_YEARS
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 24 of file GanttMeasure.java.

Member Function Documentation

◆ chooseMeasure()

static GanttMeasure org.turro.zkoss.svg.GanttMeasure.chooseMeasure ( double  hours)
static

Definition at line 50 of file GanttMeasure.java.

50  {
51  if(hours > SWITCH_MEASURE) {
52  if(toDays(hours) > SWITCH_MEASURE) {
53  if(toWeeks(hours) > SWITCH_MEASURE) {
54  if(toMonths(hours) > SWITCH_MEASURE) {
55  if(toQuarters(hours) > SWITCH_MEASURE) {
56  return GANTT_BY_YEARS;
57  } else {
58  return GANTT_BY_QUARTERS;
59  }
60  } else {
61  return GANTT_BY_MONTHS;
62  }
63  } else {
64  return GANTT_BY_WEEKS;
65  }
66  } else {
67  return GANTT_BY_DAYS;
68  }
69  } else {
70  return GANTT_BY_HOURS;
71  }
72  }
static double toWeeks(double hours)
static double toDays(double hours)
static double toQuarters(double hours)
static double toMonths(double hours)
Here is the caller graph for this function:

◆ convert()

double org.turro.zkoss.svg.GanttMeasure.convert ( double  hours)

Definition at line 33 of file GanttMeasure.java.

33  {
34  if(this.equals(GANTT_BY_DAYS)) {
35  return toDays(hours);
36  } else if(this.equals(GANTT_BY_WEEKS)) {
37  return toWeeks(hours);
38  } else if(this.equals(GANTT_BY_MONTHS)) {
39  return toMonths(hours);
40  } else if(this.equals(GANTT_BY_QUARTERS)) {
41  return toQuarters(hours);
42  } else if(this.equals(GANTT_BY_YEARS)) {
43  return toYears(hours);
44  }
45  return hours;
46  }
static double toYears(double hours)
Here is the caller graph for this function:

◆ toDays()

static double org.turro.zkoss.svg.GanttMeasure.toDays ( double  hours)
static

Definition at line 74 of file GanttMeasure.java.

74  {
75  return hours / 8.0d;
76  }

◆ toMonths()

static double org.turro.zkoss.svg.GanttMeasure.toMonths ( double  hours)
static

Definition at line 82 of file GanttMeasure.java.

82  {
83  return hours / (8.0d * 22.0d);
84  }

◆ toQuarters()

static double org.turro.zkoss.svg.GanttMeasure.toQuarters ( double  hours)
static

Definition at line 86 of file GanttMeasure.java.

86  {
87  return hours / (8.0d * 22.0d * 3.0d);
88  }

◆ toWeeks()

static double org.turro.zkoss.svg.GanttMeasure.toWeeks ( double  hours)
static

Definition at line 78 of file GanttMeasure.java.

78  {
79  return hours / (8.0d * 5.0d);
80  }

◆ toYears()

static double org.turro.zkoss.svg.GanttMeasure.toYears ( double  hours)
static

Definition at line 90 of file GanttMeasure.java.

90  {
91  return hours / (8.0d * 22.0d * 12.0d);
92  }

Member Data Documentation

◆ GANTT_BY_DAYS

org.turro.zkoss.svg.GanttMeasure.GANTT_BY_DAYS

Definition at line 27 of file GanttMeasure.java.

◆ GANTT_BY_HOURS

org.turro.zkoss.svg.GanttMeasure.GANTT_BY_HOURS

Definition at line 26 of file GanttMeasure.java.

◆ GANTT_BY_MONTHS

org.turro.zkoss.svg.GanttMeasure.GANTT_BY_MONTHS

Definition at line 29 of file GanttMeasure.java.

◆ GANTT_BY_QUARTERS

org.turro.zkoss.svg.GanttMeasure.GANTT_BY_QUARTERS

Definition at line 30 of file GanttMeasure.java.

◆ GANTT_BY_WEEKS

org.turro.zkoss.svg.GanttMeasure.GANTT_BY_WEEKS

Definition at line 28 of file GanttMeasure.java.

◆ GANTT_BY_YEARS

org.turro.zkoss.svg.GanttMeasure.GANTT_BY_YEARS

Definition at line 31 of file GanttMeasure.java.


The documentation for this enum was generated from the following file: