-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #514 from dlsc-software-consulting-gmbh/enhancemen…
…t-update-shadow-designer-view Update ShadowDesignerView
- Loading branch information
Showing
47 changed files
with
1,144 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
...nents/src/main/java/com/dlsc/jfxcentral2/utilities/effectdesigner/CopyEffectCodeView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package com.dlsc.jfxcentral2.utilities.effectdesigner; | ||
|
||
import javafx.beans.property.SimpleStringProperty; | ||
import javafx.beans.property.StringProperty; | ||
import javafx.scene.control.Button; | ||
import javafx.scene.layout.HBox; | ||
import one.jpro.platform.routing.CopyUtil; | ||
import org.apache.commons.lang3.StringUtils; | ||
import org.kordamp.ikonli.boxicons.BoxiconsLogos; | ||
import org.kordamp.ikonli.carbonicons.CarbonIcons; | ||
import org.kordamp.ikonli.javafx.FontIcon; | ||
|
||
public class CopyEffectCodeView extends HBox { | ||
|
||
public CopyEffectCodeView(Runnable onCopyCompleted) { | ||
getStyleClass().add("copy-effect-code-view"); | ||
|
||
FontIcon javaIcon = new FontIcon(CarbonIcons.CODE); | ||
Button copyJavaCode = new Button("Java Code", javaIcon); | ||
copyJavaCode.getStyleClass().addAll("fill-button","java-button"); | ||
copyJavaCode.setOnAction(event -> onCopyCompleted.run()); | ||
copyJavaCode.disableProperty().bind(javaCode.isEmpty()); | ||
javaCodeProperty().addListener((observable, oldValue, newValue) -> { | ||
if (!StringUtils.isEmpty(newValue)) { | ||
CopyUtil.setCopyOnClick(copyJavaCode, newValue); | ||
} | ||
}); | ||
|
||
FontIcon cssIcon = new FontIcon(BoxiconsLogos.CSS3); | ||
Button copyCssCode = new Button("CSS Code", cssIcon); | ||
copyCssCode.getStyleClass().addAll("fill-button","css-button"); | ||
copyCssCode.setOnAction(event -> onCopyCompleted.run()); | ||
copyCssCode.disableProperty().bind(cssCode.isEmpty()); | ||
cssCodeProperty().addListener((observable, oldValue, newValue) -> { | ||
if (!StringUtils.isEmpty(newValue)) { | ||
CopyUtil.setCopyOnClick(copyCssCode, newValue); | ||
} | ||
}); | ||
|
||
getChildren().setAll(copyJavaCode, copyCssCode); | ||
} | ||
|
||
|
||
private final StringProperty javaCode = new SimpleStringProperty(this, "javaCode"); | ||
|
||
public String getJavaCode() { | ||
return javaCode.get(); | ||
} | ||
|
||
public StringProperty javaCodeProperty() { | ||
return javaCode; | ||
} | ||
|
||
public void setJavaCode(String javaCode) { | ||
this.javaCode.set(javaCode); | ||
} | ||
|
||
private final StringProperty cssCode = new SimpleStringProperty(this, "cssCode"); | ||
|
||
public String getCssCode() { | ||
return cssCode.get(); | ||
} | ||
|
||
public StringProperty cssCodeProperty() { | ||
return cssCode; | ||
} | ||
|
||
public void setCssCode(String cssCode) { | ||
this.cssCode.set(cssCode); | ||
} | ||
} |
269 changes: 269 additions & 0 deletions
269
...ents/src/main/java/com/dlsc/jfxcentral2/utilities/effectdesigner/EffectCodeGenerator.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.