Data dataToStore = (Data) restoreData(resourceContext);
if (dataToStore != null) {
BiColor biColor = new GradientType.BiColor(dataToStore.getGradientColor(), dataToStore.getBaseColor());
GradientType type = dataToStore.getGradientType();
BiColor firstLayer = type.getFirstLayerColors(biColor);
BiColor secondLayer = type.getSecondLayerColors(biColor);
Dimension dim = getDimensions(resourceContext);
int gradientHeight = dataToStore.getGradientHeight();
Rectangle2D rect =