Powerbar Element

Implements all methods of the parent class.

State

enum State {
Started,
Stopped
}

Callback

interface Callback {
void onStateChanged(State state);
void onResults();
}

Get question

Returns poll question.

Question getQuestion();

Get options

Returns poll options.

‚Äč
List<Option> getOptions();

Get results

Returns JSON array of results.

JsonArray getResults();

Returns results for each source.

JsonArray getResultsPerSource();

Get user vote

Returns array with single element that represents power user voted for.

int[] getUserVote();

Is validated user required

Returns true if validated user required.

boolean isValidatedUserRequired();

Has user voted

Returns true if user already voted.

boolean hasUserVoted();

Has results

Returns true if results present.

boolean hasResults();

Vote

Vote for specified power (from 1 to 10). Returns true on success.

boolean vote(int power)