Skip to content

Commit

Permalink
new version with improved jfx property -> webkit support
Browse files Browse the repository at this point in the history
  • Loading branch information
miho committed Mar 11, 2021
1 parent 723bb59 commit ef761e8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ wrapper {

sourceCompatibility = '11'
targetCompatibility = '11'
[compileJava, compileTestJava]*.options*.release = 11
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'


repositories {
jcenter()
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/project-info.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// -----------------------------------------------------------------------------
ext.publishing.artifactId = project.name.toLowerCase()
ext.publishing.groupId = 'eu.mihosoft.monacofx'
ext.publishing.versionId = '0.0.6'
ext.publishing.versionId = '0.0.7'

ext.publishing.developerName = 'Michael Hoffer'
ext.publishing.developerAlias = 'miho'
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/eu/mihosoft/monacofx/Document.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void setEditor(WebEngine engine, JSObject window, JSObject editor) {
if(text!=null) {
try {
updatingText = true;
setText(text);
textProperty().set(text);
}finally {
updatingText=false;
}
Expand All @@ -80,7 +80,17 @@ public StringProperty textProperty() {
}

public void setText(String text) {
textProperty().set(text);
if(editor==null) {
textProperty.set(text);
} else {
try {
updatingText = true;
textProperty().set(text);
}finally {
updatingText=false;
}
editor.call("setValue", text);
}
}

public String getText() {
Expand Down

0 comments on commit ef761e8

Please sign in to comment.