package org.simantics.district.network.visualisations.model; public class ColorBarOptions { private boolean showColorBars; private boolean showColorBarsTicks; private boolean useGradients; private ColorBarsLocation location; private ColorBarsSize size; public boolean isShowColorBars() { return showColorBars; } public ColorBarOptions showColorBars(boolean show) { this.showColorBars = show; return this; } public boolean isShowColorBarsTicks() { return showColorBarsTicks; } public boolean isUseGradients() { return useGradients; } public ColorBarOptions showColorBarsTicks(boolean show) { this.showColorBarsTicks = show; return this; } public ColorBarsLocation getLocation() { return location; } public ColorBarOptions withLocation(ColorBarsLocation location) { this.location = location; return this; } public ColorBarsSize getSize() { return size; } public ColorBarOptions withSize(ColorBarsSize size) { this.size = size; return this; } public enum ColorBarsLocation { NORTH, EAST, SOUTH, WEST } public enum ColorBarsSize { SMALL(1), MEDIUM(2), LARGE(3); int size; ColorBarsSize(int size) { this.size = size; } public int getSize() { return size; } } public static ColorBarOptions useDefault() { return new ColorBarOptions().showColorBars(true).withLocation(ColorBarsLocation.EAST).withSize(ColorBarsSize.SMALL); } public ColorBarOptions useGradients(boolean useGradients) { this.useGradients = useGradients; return this; } }