-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the package org.luwrain.interaction.javafx.browser
- Loading branch information
1 parent
c981dd1
commit 09f4b5b
Showing
10 changed files
with
56 additions
and
44 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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2012-2018 Michael Pozhidaev <[email protected]> | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
|
@@ -21,12 +21,12 @@ | |
|
||
public final class InvalidThreadException extends RuntimeException | ||
{ | ||
InvalidThreadException(String message) | ||
public InvalidThreadException(String message) | ||
{ | ||
super(message); | ||
} | ||
|
||
static void checkThread(String funcName) | ||
static public void checkThread(String funcName) | ||
{ | ||
if(!Platform.isFxApplicationThread()) | ||
throw new InvalidThreadException(funcName + " runs in the invalid thread"); | ||
|
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2012-2018 Michael Pozhidaev <[email protected]> | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
|
@@ -27,17 +27,17 @@ | |
import org.luwrain.core.*; | ||
import org.luwrain.base.InteractionParamColor; | ||
|
||
class Utils | ||
public class Utils | ||
{ | ||
static private final String LOG_COMPONENT = JavaFxInteraction.LOG_COMPONENT; | ||
|
||
static void ensureFxThread() | ||
static public void ensureFxThread() | ||
{ | ||
if(!Platform.isFxApplicationThread()) | ||
throw new RuntimeException("Execution in non-jfx thread"); | ||
} | ||
|
||
static Object callInFxThreadSync(Callable callable) | ||
static public Object callInFxThreadSync(Callable callable) | ||
{ | ||
NullCheck.notNull(callable, "callable"); | ||
if(Platform.isFxApplicationThread()) | ||
|
@@ -66,7 +66,7 @@ static Object callInFxThreadSync(Callable callable) | |
} | ||
} | ||
|
||
static void runInFxThreadSync(Runnable runnable) | ||
static public void runInFxThreadSync(Runnable runnable) | ||
{ | ||
NullCheck.notNull(runnable, "runnable"); | ||
if(Platform.isFxApplicationThread()) | ||
|
@@ -97,7 +97,7 @@ static void runInFxThreadSync(Runnable runnable) | |
} | ||
} | ||
|
||
static void runInFxThreadAsync(Runnable runnable) | ||
static public void runInFxThreadAsync(Runnable runnable) | ||
{ | ||
NullCheck.notNull(runnable, "runnable"); | ||
if(Platform.isFxApplicationThread()) | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2012-2018 Michael Pozhidaev <[email protected]> | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
|
@@ -15,7 +15,7 @@ | |
General Public License for more details. | ||
*/ | ||
|
||
package org.luwrain.interaction.javafx; | ||
package org.luwrain.interaction.javafx.browser; | ||
|
||
import java.util.*; | ||
|
||
|
@@ -32,6 +32,7 @@ | |
import com.sun.webkit.dom.DOMWindowImpl; | ||
|
||
import org.luwrain.core.*; | ||
import org.luwrain.interaction.javafx.*; | ||
import org.luwrain.browser.BrowserEvents; | ||
|
||
abstract class BrowserBase | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2012-2018 Michael Pozhidaev <[email protected]> | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
|
@@ -15,7 +15,7 @@ | |
General Public License for more details. | ||
*/ | ||
|
||
package org.luwrain.interaction.javafx; | ||
package org.luwrain.interaction.javafx.browser; | ||
|
||
import java.awt.Rectangle; | ||
import java.io.*; | ||
|
@@ -37,16 +37,17 @@ | |
|
||
import org.luwrain.core.*; | ||
import org.luwrain.browser.*; | ||
import org.luwrain.interaction.javafx.*; | ||
|
||
final class BrowserImpl extends BrowserBase implements Browser | ||
public final class BrowserImpl extends BrowserBase implements Browser | ||
{ | ||
static private final String RESCAN_RESOURCE_PATH = "org/luwrain/interaction/javafx/injection.js"; | ||
static final int LAST_MODIFIED_SCAN_INTERVAL = 100; // lastModifiedTime rescan interval in milliseconds | ||
static final String LUWRAIN_NODE_TEXT="luwrain_node_text"; // javascript window's property names for using in executeScrypt | ||
|
||
private final JavaFxInteraction interaction; | ||
|
||
BrowserImpl(JavaFxInteraction interaction) | ||
public BrowserImpl(JavaFxInteraction interaction) | ||
{ | ||
super(readTextResource(RESCAN_RESOURCE_PATH)); | ||
NullCheck.notNull(interaction, "interaction"); | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2012-2018 Michael Pozhidaev <[email protected]> | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
|
@@ -15,7 +15,7 @@ | |
General Public License for more details. | ||
*/ | ||
|
||
package org.luwrain.interaction.javafx; | ||
package org.luwrain.interaction.javafx.browser; | ||
|
||
import java.awt.Rectangle; | ||
import java.util.*; | ||
|
@@ -27,6 +27,7 @@ | |
|
||
import org.luwrain.core.*; | ||
import org.luwrain.browser.*; | ||
import org.luwrain.interaction.javafx.*; | ||
|
||
final class IteratorImpl implements BrowserIterator | ||
{ | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2012-2018 Michael Pozhidaev <[email protected]> | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
|
@@ -15,13 +15,13 @@ | |
General Public License for more details. | ||
*/ | ||
|
||
package org.luwrain.interaction.javafx; | ||
package org.luwrain.interaction.javafx.browser; | ||
|
||
import org.luwrain.core.*; | ||
|
||
class MyConsole | ||
{ | ||
static private final String LOG_COMPONENT = JavaFxInteraction.LOG_COMPONENT; | ||
static private final String LOG_COMPONENT = "web"; | ||
|
||
void log(Object text) | ||
{ | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
Copyright 2012-2018 Michael Pozhidaev <[email protected]> | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
|
@@ -15,7 +15,7 @@ | |
General Public License for more details. | ||
*/ | ||
|
||
package org.luwrain.interaction.javafx; | ||
package org.luwrain.interaction.javafx.browser; | ||
|
||
import org.w3c.dom.Node; | ||
import java.awt.Rectangle; | ||
|