Skip to content
Snippets Groups Projects
Commit 6514e3f6 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#433 - remove javafx.scene.paint.Color dependency

parent 107dc370
No related branches found
No related tags found
No related merge requests found
Pipeline #1560 failed
...@@ -3,7 +3,7 @@ package de.deadlocker8.budgetmaster.categories; ...@@ -3,7 +3,7 @@ package de.deadlocker8.budgetmaster.categories;
import com.google.gson.annotations.Expose; import com.google.gson.annotations.Expose;
import de.deadlocker8.budgetmaster.transactions.Transaction; import de.deadlocker8.budgetmaster.transactions.Transaction;
import de.thecodelabs.utils.util.Color; import de.thecodelabs.utils.util.Color;
import de.thecodelabs.utils.util.ColorUtils; import de.thecodelabs.utils.util.ColorUtilsNonJavaFX;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
...@@ -94,7 +94,7 @@ public class Category ...@@ -94,7 +94,7 @@ public class Category
public String getAppropriateTextColor() public String getAppropriateTextColor()
{ {
return ColorUtils.getAppropriateTextColor(new Color(color)).toRGBHexWithoutOpacity(); return ColorUtilsNonJavaFX.getAppropriateTextColor(new Color(color)).toRGBHexWithoutOpacity();
} }
@Override @Override
......
...@@ -5,7 +5,7 @@ import de.deadlocker8.budgetmaster.services.HelpersService; ...@@ -5,7 +5,7 @@ import de.deadlocker8.budgetmaster.services.HelpersService;
import de.deadlocker8.budgetmaster.settings.SettingsService; import de.deadlocker8.budgetmaster.settings.SettingsService;
import de.deadlocker8.budgetmaster.utils.Colors; import de.deadlocker8.budgetmaster.utils.Colors;
import de.deadlocker8.budgetmaster.utils.ResourceNotFoundException; import de.deadlocker8.budgetmaster.utils.ResourceNotFoundException;
import de.thecodelabs.utils.util.ColorUtils; import de.thecodelabs.utils.util.ColorUtilsNonJavaFX;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
...@@ -86,7 +86,7 @@ public class CategoryController extends BaseController ...@@ -86,7 +86,7 @@ public class CategoryController extends BaseController
{ {
//add custom color (defaults to white here because we are adding a new category instead of editing an existing) //add custom color (defaults to white here because we are adding a new category instead of editing an existing)
model.addAttribute("customColor", "#FFFFFF"); model.addAttribute("customColor", "#FFFFFF");
Category emptyCategory = new Category(null, ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_GREY).toLowerCase(), CategoryType.CUSTOM); Category emptyCategory = new Category(null, ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_GREY).toLowerCase(), CategoryType.CUSTOM);
model.addAttribute("category", emptyCategory); model.addAttribute("category", emptyCategory);
model.addAttribute("settings", settingsService.getSettings()); model.addAttribute("settings", settingsService.getSettings());
return "categories/newCategory"; return "categories/newCategory";
...@@ -136,7 +136,7 @@ public class CategoryController extends BaseController ...@@ -136,7 +136,7 @@ public class CategoryController extends BaseController
if(category.getColor() == null) if(category.getColor() == null)
{ {
category.setColor(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_GREY).toLowerCase()); category.setColor(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_GREY).toLowerCase());
} }
model.addAttribute("category", category); model.addAttribute("category", category);
model.addAttribute("settings", settingsService.getSettings()); model.addAttribute("settings", settingsService.getSettings());
......
...@@ -20,7 +20,7 @@ import de.deadlocker8.budgetmaster.transactions.TransactionService; ...@@ -20,7 +20,7 @@ import de.deadlocker8.budgetmaster.transactions.TransactionService;
import de.deadlocker8.budgetmaster.update.BudgetMasterUpdateService; import de.deadlocker8.budgetmaster.update.BudgetMasterUpdateService;
import de.deadlocker8.budgetmaster.utils.Colors; import de.deadlocker8.budgetmaster.utils.Colors;
import de.deadlocker8.budgetmaster.utils.LanguageType; import de.deadlocker8.budgetmaster.utils.LanguageType;
import de.thecodelabs.utils.util.ColorUtils; import de.thecodelabs.utils.util.ColorUtilsNonJavaFX;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormat;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -115,23 +115,23 @@ public class HelpersService ...@@ -115,23 +115,23 @@ public class HelpersService
public ArrayList<String> getCategoryColorList() public ArrayList<String> getCategoryColorList()
{ {
ArrayList<String> categoryColors = new ArrayList<>(); ArrayList<String> categoryColors = new ArrayList<>();
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_GREY).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_GREY).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_GREY).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_GREY).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_DARK_GREY).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_DARK_GREY).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_YELLOW).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_YELLOW).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_YELLOW).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_YELLOW).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_ORANGE).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_ORANGE).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_RED).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_RED).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_DARK_RED).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_DARK_RED).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_PINK).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_PINK).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_PURPLE).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_PURPLE).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_DARK_PURPLE).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_DARK_PURPLE).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_BLUE).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_BLUE).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_SOFT_BLUE).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_SOFT_BLUE).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_BLUE).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_BLUE).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_GREEN).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIGHT_GREEN).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIME_GREEN).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_LIME_GREEN).toLowerCase());
categoryColors.add(ColorUtils.toRGBHexWithoutOpacity(Colors.CATEGORIES_DARK_GREEN).toLowerCase()); categoryColors.add(ColorUtilsNonJavaFX.toRGBHexWithoutOpacity(Colors.CATEGORIES_DARK_GREEN).toLowerCase());
return categoryColors; return categoryColors;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment