Skip to content

SliderAppearanceIn

roosit edited this page Oct 16, 2026 · 1 revision

SliderAppearanceIn

Up | Previous | Next | Русский

Full source with short explanations

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 stored in the working file SliderAppearanceIn.java: the production code stays clean and the explanations live in the wiki.

package com.velitask.plugin.official;

/* How a slide appears at the start of its segment. */
/* The order of constants matters: the file stores the ordinal number, and the first constant is the default value. */
enum SliderAppearanceIn {
    /* No effect: the slide appears immediately. */
    NONE,
    /* Fade in: opacity grows from 0 to 1. */
    FADE,
    /* Slide in from the left, right, top or bottom: an offset by the parent size */
    /* that shrinks to zero. */
    FROM_LEFT,
    FROM_RIGHT,
    FROM_TOP,
    FROM_BOTTOM,
    /* Appearance from a point (pointX, pointY): the slide grows from zero size to full size. */
    FROM_POINT
}

Purpose

SliderAppearanceIn lists the ways a slide can appear. It is used as the type EnumArrayProperty<SliderAppearanceIn> in the appearanceIn property of the SliderIndicator. The paired type for leaving is SliderAppearanceOut.

How it works

Data. The value is stored as the ordinal number of the constant.

Number Constant UI name Effect
0 NONE None No effect.
1 FADE Fade Slider opacity 0 -> 1.
2 FROM_LEFT From left X offset from -parent width to 0.
3 FROM_RIGHT From right X offset from +parent width to 0.
4 FROM_TOP From top Y offset from -parent height to 0.
5 FROM_BOTTOM From bottom Y offset from +parent height to 0.
6 FROM_POINT From point Scale 0 -> 1 with movement from the point (pointX, pointY) to the slider's place.

Settings. The effect runs over the interval [start, start + appearanceDuration) of the slide segment; the duration is set by the appearanceDuration property ("Appearance, s").

Drawing. The enum draws nothing: SliderIndicator.applyAppearance(...) converts the constant into the slider's IndicatorContext.Transform (opacity, offset, scale). The effect is applied to the whole slide together with its nested indicators.

Features and limitations

  • The order of constants must not be changed: projects store the ordinal number.
  • Any value other than NONE also smoothly raises the volume of nested indicators from 0 to 1 over the appearance time.
  • The class is package-private: it is visible only inside the plugin package.

Clone this wiki locally