Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gdal webview #192

Merged
merged 4 commits into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed WebView32.dll
Binary file not shown.
Binary file removed WebView64.dll
Binary file not shown.
Binary file removed libwebview.jnilib
Binary file not shown.
30 changes: 16 additions & 14 deletions nbproject/build-impl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,6 @@ is divided into following sections:
<istrue value="${not.archive.disabled}"/>
</or>
</condition>
<condition property="do.mkdist">
<and>
<isset property="do.archive"/>
<isset property="libs.CopyLibs.classpath"/>
<not>
<istrue value="${mkdist.disabled}"/>
</not>
<not>
<istrue value="${modules.supported.internal}"/>
</not>
</and>
</condition>
<condition property="do.archive+manifest.available">
<and>
<isset property="manifest.available"/>
Expand Down Expand Up @@ -1218,13 +1206,27 @@ is divided into following sections:
<attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
</manifest>
</target>
<target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs">
<target depends="init,compile" name="-check-do-mkdist">
<condition property="do.mkdist">
<and>
<isset property="do.archive"/>
<isset property="libs.CopyLibs.classpath"/>
<not>
<istrue value="${mkdist.disabled}"/>
</not>
<not>
<available file="${build.classes.dir}/module-info.class"/>
</not>
</and>
</condition>
</target>
<target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.mkdist" name="-do-jar-copylibs">
<j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
<echo level="info">To run this application from the command line without Ant, try:</echo>
<property location="${dist.jar}" name="dist.jar.resolved"/>
<echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
<target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist">
<j2seproject1:jar manifest="${tmp.manifest.file}"/>
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<property location="${dist.jar}" name="dist.jar.resolved"/>
Expand Down
1 change: 1 addition & 0 deletions nbproject/configs/KMLViewer.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
main.class=gov.nasa.worldwindx.examples.kml.KMLViewer
4 changes: 2 additions & 2 deletions nbproject/genfiles.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ [email protected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=ed839dc9
nbproject/build-impl.xml.script.CRC32=e40c9476
nbproject/build-impl.xml.stylesheet.CRC32=3a2fa800@1.92.0.48
nbproject/build-impl.xml.script.CRC32=2b01b309
nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.93.0.48
2 changes: 1 addition & 1 deletion src/gov/nasa/worldwind/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ public static boolean isLinuxOS()
public static boolean isUnixOS()
{
String osName = System.getProperty("os.name");
return osName != null && osName.toLowerCase().contains("unix");
return osName != null && (osName.toLowerCase().contains("linux") || osName.toLowerCase().contains("unix"));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public KMLAbstractBalloon(KMLAbstractFeature feature)
*
* @param balloon The balloon contained in this wrapper object.
*/
@SuppressWarnings("deprecation")
protected void initialize(Balloon balloon)
{
balloon.setTextDecoder(this.createTextDecoder(this.parent));
Expand Down
2 changes: 2 additions & 0 deletions src/gov/nasa/worldwind/render/AbstractBrowserBalloon.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
*
* @author dcollins
* @version $Id: AbstractBrowserBalloon.java 2148 2014-07-14 16:27:49Z tgaskins $
* @deprecated
*/
@Deprecated
public abstract class AbstractBrowserBalloon extends AbstractBalloon implements HotSpot, Disposable
{

Expand Down
2 changes: 2 additions & 0 deletions src/gov/nasa/worldwind/render/GlobeBrowserBalloon.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
* @author pabercrombie
* @version $Id: GlobeBrowserBalloon.java 2272 2014-08-25 23:24:45Z tgaskins $
* @see gov.nasa.worldwind.render.AbstractBrowserBalloon
* @deprecated
*/
@Deprecated
public class GlobeBrowserBalloon extends AbstractBrowserBalloon implements GlobeBalloon
{
protected class OrderedGlobeBrowserBalloon extends OrderedBrowserBalloon
Expand Down
2 changes: 2 additions & 0 deletions src/gov/nasa/worldwind/render/ScreenBrowserBalloon.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
* @author pabercrombie
* @version $Id: ScreenBrowserBalloon.java 2148 2014-07-14 16:27:49Z tgaskins $
* @see gov.nasa.worldwind.render.AbstractBrowserBalloon
* @deprecated
*/
@Deprecated
public class ScreenBrowserBalloon extends AbstractBrowserBalloon implements ScreenBalloon
{
/**
Expand Down
61 changes: 28 additions & 33 deletions src/gov/nasa/worldwind/util/NativeLibraryLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,56 @@
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/

package gov.nasa.worldwind.util;

import gov.nasa.worldwind.exception.WWRuntimeException;
import java.io.File;

/**
* @author Lado Garakanidze
* @version $Id: NativeLibraryLoader.java 1171 2013-02-11 21:45:02Z dcollins $
*/

public class NativeLibraryLoader
{
public static void loadLibrary(String libName) throws WWRuntimeException, IllegalArgumentException
{
if (WWUtil.isEmpty(libName))
{
public class NativeLibraryLoader {

public static void loadLibrary(String folder, String libName) throws WWRuntimeException, IllegalArgumentException {
if (WWUtil.isEmpty(libName)) {
String message = Logging.getMessage("nullValue.LibraryIsNull");
throw new IllegalArgumentException(message);
}

try
{
System.loadLibrary(libName);
}
catch (java.lang.UnsatisfiedLinkError ule)
{

try {
if (folder == null) {
System.loadLibrary(libName);
} else {
Runtime.getRuntime().load(folder + File.separator + makeFullLibName(libName));
}
} catch (java.lang.UnsatisfiedLinkError ule) {
String message = Logging.getMessage("generic.LibraryNotLoaded", libName, ule.getMessage());
throw new WWRuntimeException(message);
}
catch (Throwable t)
{
} catch (Throwable t) {
String message = Logging.getMessage("generic.LibraryNotLoaded", libName, t.getMessage());
throw new WWRuntimeException(message);
}
}

protected static String makeFullLibName(String libName)
{
if (WWUtil.isEmpty(libName))

protected static String makeFullLibName(String libName) {
if (WWUtil.isEmpty(libName)) {
return null;

if (gov.nasa.worldwind.Configuration.isWindowsOS())
{
if (!libName.toLowerCase().endsWith(".dll"))
return libName + ".dll";
}
else if (gov.nasa.worldwind.Configuration.isMacOS())
{
if (!libName.toLowerCase().endsWith(".jnilib") && !libName.toLowerCase().startsWith("lib"))

if (gov.nasa.worldwind.Configuration.isWindowsOS()) {
if (!libName.toLowerCase().endsWith(".dll")) {
return libName + ".dll";
}
} else if (gov.nasa.worldwind.Configuration.isMacOS()) {
if (!libName.toLowerCase().endsWith(".jnilib") && !libName.toLowerCase().startsWith("lib")) {
return "lib" + libName + ".jnilib";
}
else if (gov.nasa.worldwind.Configuration.isUnixOS()) // covers Solaris and Linux
}
} else if (gov.nasa.worldwind.Configuration.isUnixOS()) // covers Solaris and Linux
{
if (!libName.toLowerCase().endsWith(".so") && !libName.toLowerCase().startsWith("lib"))
if (!libName.toLowerCase().endsWith(".so") && !libName.toLowerCase().startsWith("lib")) {
return "lib" + libName + ".so";
}
}
return libName;
}
Expand Down
41 changes: 15 additions & 26 deletions src/gov/nasa/worldwind/util/gdal/GDALAbstractFileFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,25 @@
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/

package gov.nasa.worldwind.util.gdal;

import gov.nasa.worldwind.util.*;

import java.io.File;
import java.util.HashSet;
import java.util.*;
import java.util.regex.Pattern;

import gov.nasa.worldwind.util.*;

/**
* @author Lado Garakanidze
* @version $Id: GDALAbstractFileFilter.java 1171 2013-02-11 21:45:02Z dcollins $
*/
abstract class GDALAbstractFileFilter implements java.io.FileFilter {

abstract class GDALAbstractFileFilter implements java.io.FileFilter
{
protected HashSet<String> listFolders = new HashSet<String>();
protected HashSet<String> listFolders = new HashSet<>();
protected final String searchPattern;

protected GDALAbstractFileFilter(String searchPattern)
{
if (null == searchPattern || searchPattern.length() == 0)
{
protected GDALAbstractFileFilter(String searchPattern) {
if (null == searchPattern || searchPattern.length() == 0) {
String message = Logging.getMessage("nullValue.StringIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
Expand All @@ -36,17 +32,12 @@ protected GDALAbstractFileFilter(String searchPattern)
listFolders.clear();
}

protected boolean isHidden(String path)
{
if (!WWUtil.isEmpty(path))
{
protected boolean isHidden(String path) {
if (!WWUtil.isEmpty(path)) {
String[] folders = path.split(Pattern.quote(File.separator));
if (!WWUtil.isEmpty(folders))
{
for (String folder : folders)
{
if (!WWUtil.isEmpty(folder) && folder.startsWith("."))
{
if (!WWUtil.isEmpty(folders)) {
for (String folder : folders) {
if (!WWUtil.isEmpty(folder) && folder.startsWith(".")) {
return true;
}
}
Expand All @@ -55,9 +46,7 @@ protected boolean isHidden(String path)
return false;
}

public String[] getFolders()
{
String[] folders = new String[listFolders.size()];
return this.listFolders.toArray(folders);
public ArrayList<String> getFolders() {
return new ArrayList<>(listFolders);
}
}
}
Loading