diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/ressources/css/GUICssTool.java b/Workspace/client/src/main/java/com/pqt/client/gui/ressources/css/GUICssTool.java index 7c85140a..69b4fdc2 100644 --- a/Workspace/client/src/main/java/com/pqt/client/gui/ressources/css/GUICssTool.java +++ b/Workspace/client/src/main/java/com/pqt/client/gui/ressources/css/GUICssTool.java @@ -12,4 +12,20 @@ public class GUICssTool { public static String getExpandedSideBarCssStyle() { return "sidebar-expanded"; } + + public static String getMainModulePaneCssClass() { + return "main-module-pane"; + } + + public static String getIntermediaryPaneStyleClass() { + return "grey-intermediary-pane"; + } + + public static String getTitleTextStyleClass() { + return "label-header"; + } + + public static String getContainerStyleClass() { + return "pqt-container"; + } } diff --git a/Workspace/client/src/main/java/com/pqt/client/gui/ressources/strings/GUIStringTool.java b/Workspace/client/src/main/java/com/pqt/client/gui/ressources/strings/GUIStringTool.java index 4dcb8bd3..22fe69f3 100644 --- a/Workspace/client/src/main/java/com/pqt/client/gui/ressources/strings/GUIStringTool.java +++ b/Workspace/client/src/main/java/com/pqt/client/gui/ressources/strings/GUIStringTool.java @@ -1,5 +1,6 @@ package com.pqt.client.gui.ressources.strings; +import com.pqt.core.entities.product.Category; import com.pqt.core.entities.product.Product; import com.pqt.core.entities.sale.SaleStatus; import com.pqt.core.entities.sale.SaleType; @@ -33,7 +34,7 @@ public class GUIStringTool { return "Produits"; } - public static IObjectStringRenderer getProductStringRenderer(){ + public static IObjectStringRenderer getDetailledProductStringRenderer(){ return product->{ if(product!=null) return String.format("%s - %.2f€ (%s)", product.getName(), product.getPrice(), (product.getAmountRemaining()>=30?"30+": Integer.toString(product.getAmountRemaining()))); @@ -42,6 +43,15 @@ public class GUIStringTool { }; } + public static IObjectStringRenderer getSimpleProductStringRenderer(){ + return product->{ + if(product!=null) + return String.format("%s - %.2f€", product.getName(), product.getPrice()); + else + return "null"; + }; + } + public static String getCommandComposerTitleTitle() { return "Commande"; } @@ -218,6 +228,54 @@ public class GUIStringTool { public static String getStatGuiModuleName() { return "Statistiques"; } + + public static String getProductNameLabel() { + return "Nom : "; + } + + public static String getProductCategoryLabel() { + return "Catégorie : "; + } + + public static String getProductAmountRemainingLabel() { + return "En stock : "; + } + + public static String getProductAmountSoldLabel() { + return "Vendu : "; + } + + public static String getProductSellableLabel() { + return "Vendable : "; + } + + public static String getProductPriceLabel() { + return "Prix : "; + } + + public static StringConverter getCategoryStringConverter() { + return new StringConverter() { + @Override + public String toString(Category object) { + if(object!=null) + return object.getName(); + else + return ""; + } + + @Override + public Category fromString(String string) { + if(string!=null) + return new Category(-1, string); + else + return null; + } + }; + } + + public static String getComponentListTitleLabel() { + return "Composants"; + } }