Repository navigation
SliderAppearanceOut
Up | Previous | Next | Русский
Below is the full source of the class in documentation form. The comments inside the block explain the purpose of the parts of the class, but they are not kept in the working file SliderAppearanceOut.java: the production code stays clean, and the explanations live in the wiki.
package com.velitask.plugin.official;
/* The way a slide leaves at the end of its segment. */
/* The order of the constants matters: the ordinal number is saved to the file, and the first constant is the default value. */
enum SliderAppearanceOut {
/* No effect: the slide disappears right when the segment ends. */
NONE,
/* Fade: transparency drops from 1 to 0. */
FADE,
/* Slide out to the left, right, up, or down: a shift by the size of the parent. */
TO_LEFT,
TO_RIGHT,
TO_TOP,
TO_BOTTOM,
/* Leave toward the point (pointX, pointY): the slide shrinks to zero size. */
TO_POINT
}SliderAppearanceOut lists the ways a slide can leave. It is used as the EnumArrayProperty<SliderAppearanceOut> type in the appearanceOut property of the SliderIndicator indicator. The paired type for appearing is SliderAppearanceIn.
Data. The value is stored as the ordinal number of the constant.
| Number | Constant | Name in the interface | Effect |
|---|---|---|---|
0 |
NONE |
None | No effect. |
1 |
FADE |
Fade | Slider transparency 1 -> 0. |
2 |
TO_LEFT |
To left | X shift from 0 to -parent width. |
3 |
TO_RIGHT |
To right | X shift from 0 to +parent width. |
4 |
TO_TOP |
To top | Y shift from 0 to -parent height. |
5 |
TO_BOTTOM |
To bottom | Y shift from 0 to +parent height. |
6 |
TO_POINT |
To point | Scale 1 -> 0 with movement toward the point (pointX, pointY). |
Settings. The effect acts over the interval [end - disappearanceDuration, end) of the slide segment; the duration is set by the disappearanceDuration property ("Disappearance, s").
Drawing. As with appearing, the enum draws nothing itself: SliderIndicator.applyAppearance(...) turns the constant into an IndicatorContext.Transform. If the appearance and leave windows do not fit into the segment, they are shortened proportionally.
- The order of the constants must not be changed: the ordinal number is stored in projects.
- Any value except
NONEsmoothly lowers the volume of the nested indicators from 1 to 0 over the leave time. - The class is package-private.