Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.yuxingwang.gantt.model
Class TaskHelper

    java.lang.Object
      com.yuxingwang.gantt.model.TaskHelper

    public class TaskHelper

extends java.lang.Object

Since:
  0.2.4
Author:
  Yuxing Wang

Method Summary
`static int` | `calcActualStepForProgress(int progress, int startIndex, int totalSteps, int preRestSteps, int workSteps, int seqRestSteps)` Calculate actuall steps for provided progress.
`static int` | `calcOffsetByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit, java.util.Calendar start, java.util.Calendar end)` Time offset from start time to end time.
`static java.lang.String` | `formatTimeByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit, java.util.Calendar time)` Format time to display.
`static int` | `getTimeCycleStepsByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit)`
`static java.util.Calendar` | `increaseCloneTimeByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit, java.util.Calendar time, int offset)` Increase corresponding field of time by TimeUnit.
`static void` | `increaseTimeByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit, java.util.Calendar time, int offset)` Increase corresponding field of time by TimeUnit.
`static boolean` | `isAllowAccurateTaskBar(com.yuxingwang.gantt.ui.TimeUnit tu)` Check whether accurate task bar is allowed.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### formatTimeByTimeUnit

    public static java.lang.String formatTimeByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit,
                                                        java.util.Calendar time)

  Format time to display.

  Parameters:
    `timeUnit` -
    `time` -
  Returns:

### calcOffsetByTimeUnit

    public static int calcOffsetByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit,
                                           java.util.Calendar start,
                                           java.util.Calendar end)

  Time offset from start time to end time.

  Parameters:
    `timeUnit` -
    `start` -
    `end` -
  Returns:

### increaseCloneTimeByTimeUnit

    public static java.util.Calendar increaseCloneTimeByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit,
                                                                 java.util.Calendar time,
                                                                 int offset)

  Increase corresponding field of time by TimeUnit.

  Parameters:
    `timeUnit` -
    `time` -
    `offset` -
  Returns:

### increaseTimeByTimeUnit

    public static void increaseTimeByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit,
                                              java.util.Calendar time,
                                              int offset)

  Increase corresponding field of time by TimeUnit.

  Parameters:
    `timeUnit` -
    `time` -
    `offset` -

### getTimeCycleStepsByTimeUnit

    public static int getTimeCycleStepsByTimeUnit(com.yuxingwang.gantt.ui.TimeUnit timeUnit)

  Parameters:
    `timeUnit` -
  Returns:

### calcActualStepForProgress

    public static int calcActualStepForProgress(int progress,
                                                int startIndex,
                                                int totalSteps,
                                                int preRestSteps,
                                                int workSteps,
                                                int seqRestSteps)

  Calculate actuall steps for provided progress.

  Parameters:
    `progress` -
    `startIndex` - Start index starts from 1
    `totalSteps` - Total cycle steps of working and res out steps.
    `preRestSteps` - Rest out steps before working steps.
    `workSteps` - Working steps
    `seqRestSteps` - Rest out steps after working steps.
  Returns:

### isAllowAccurateTaskBar

    public static boolean isAllowAccurateTaskBar(com.yuxingwang.gantt.ui.TimeUnit tu)

  Check whether accurate task bar is allowed. See `Config.allowAccurateTaskBar`

  Parameters:
    `tu` -
  Returns:
  Since:
    0.3.2

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD