From: Debayan Sutradhar Date: Thu, 27 May 2021 18:15:43 +0530 Subject: fixed icon related issues --- fixed icon related issues --- --- 'a/pom.xml' +++ b/pom.xml @@ -34,6 +34,8 @@ 2.2.1 3.1.0 1.6 + + 3.0.0-M5 @@ -144,7 +146,7 @@ javafx-maven-plugin 0.0.5 - -DStream-Pi.defaultFullScreenMode=true + -DStream-Pi.defaultFullScreenMode=false @@ -198,6 +200,12 @@ true + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + --- 'a/src/main/java/com/stream_pi/client/connection/Client.java' +++ b/src/main/java/com/stream_pi/client/connection/Client.java @@ -524,7 +524,8 @@ public class Client extends Thread } - public void sendActionDetails(String profileID, Action action) throws SevereException { + public void sendActionDetails(String profileID, Action action) throws SevereException + { if(action == null) { @@ -573,7 +574,6 @@ public class Client extends Thread a.add(action.getCurrentIconState()+""); - logger.info("CuRrent ICON state asdasd : "+action.getCurrentIconState()); //text a.add(action.isShowDisplayText()+""); @@ -677,7 +677,6 @@ public class Client extends Thread action.setDisplayTextAlignment(displayTextAlignment); action.setCurrentIconState(currentIconState); - action.setLocation(location); @@ -705,11 +704,6 @@ public class Client extends Thread action.setClientProperties(clientProperties); - for(String state : iconStates) - { - action.addIcon(state, null); - } - try { Action old = clientListener.getClientProfiles().getProfileFromID(profileID).getActionFromID(action.getID()); @@ -724,6 +718,7 @@ public class Client extends Thread if(state.equals(oldState)) { isPresent = true; + action.addIcon(state, old.getIcon(state)); break; } } --- 'a/src/main/java/com/stream_pi/client/window/dashboard/actiongridpane/ActionBox.java' +++ b/src/main/java/com/stream_pi/client/window/dashboard/actiongridpane/ActionBox.java @@ -29,6 +29,7 @@ import org.kordamp.ikonli.javafx.FontIco import java.io.ByteArrayInputStream; import java.io.ObjectInputStream; import java.nio.ByteBuffer; +import java.util.logging.Logger; public class ActionBox extends StackPane { @@ -45,6 +46,8 @@ public class ActionBox extends StackPane public int getCol() { return col; } + + private Logger logger; @@ -201,10 +204,16 @@ public class ActionBox extends StackPane this.row = row; this.col = col; this.clientListener = clientListener; + this.logger = Logger.getLogger(""); baseInit(); } + public Logger getLogger() + { + return logger; + } + public static Action deserialize(ByteBuffer buffer) { try { ByteArrayInputStream is = new ByteArrayInputStream(buffer.array()); @@ -262,24 +271,6 @@ public class ActionBox extends StackPane this.parent = parent; } - /* - public ActionBox(int size, Action action, ExceptionAndAlertHandler exceptionAndAlertHandler, - ClientListener clientListener, ActionGridPaneListener actionGridPaneListener, int row, int col) - { - this.actionGridPaneListener = actionGridPaneListener; - this.exceptionAndAlertHandler = exceptionAndAlertHandler; - this.action = action; - this.size = size; - - this.row = row; - this.col = col; - - baseInit(); - - init(); - - }*/ - public void setAction(Action action) { this.action = action; @@ -470,23 +461,15 @@ public class ActionBox extends StackPane } public void setDisplayTextFontColour(String colour) { - System.out.println("'"+colour+"'COLOR"); if(!colour.isEmpty()) { - System.out.println( - "putting ..." + Thread.currentThread().getName() - ); - - displayTextLabel.setStyle("-fx-text-fill : "+colour+";"); } - } public void setBackgroundColour(String colour) { - System.out.println("COLOr : "+colour); if(!colour.isEmpty()) setStyle("-fx-background-color : "+colour); }