Skip to content
Open
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ language: java

# Configure the build to use Oracle JDK 9
jdk:
- openjdk11
- openjdk21

# Install the Ant JUnit package, which is missing from the Travis CI environment. See the Travis documentation: https://docs.travis-ci.com/user/installing-dependencies/#Adding-APT-Packages
addons:
Expand Down
4 changes: 2 additions & 2 deletions nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=11
javac.target=11
javac.source=21
javac.target=21
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
Expand Down
2 changes: 1 addition & 1 deletion release-build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ worldwind.classes.dir=${worldwind.build.dir}/classes
worldwind.doc.dir=${worldwind.build.dir}/doc
worldwind.jar.dir=${worldwind.build.dir}/jar
worldwind.test.results.dir=${worldwind.build.dir}/test-results
worldwind.jdk=11
worldwind.jdk=21
#worldwind.exclude.jackson=true

# MIL-STD-2525 package build properties
Expand Down
2 changes: 1 addition & 1 deletion release-build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<pathelement location="gluegen-rt.jar"/>
<pathelement location="gdal.jar"/>
</classpath>
<link href="http://download.oracle.com/javase/8/docs/api/"/>
<link href="https://docs.oracle.com/en/java/javase/21/docs/api/"/>
<link href="https://jogamp.org/deployment/v2.4.0-rc-20200307/javadoc/"/>
</javadoc>
</target>
Expand Down
4 changes: 2 additions & 2 deletions src/gov/nasa/worldwind/awt/AWTInputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ else if (MouseEvent.BUTTON3 == mouseEvent.getButton())
// mouse on the GLJPanel, causing GLJPanel to take the focus in the same manner as GLCanvas. Note that focus is
// passed only when the user clicks the primary mouse button. See
// http://issues.worldwind.arc.nasa.gov/jira/browse/WWJ-272.
if (MouseEvent.BUTTON1 == mouseEvent.getButton() && this.wwd instanceof GLJPanel)
if (MouseEvent.BUTTON1 == mouseEvent.getButton() && this.wwd instanceof GLJPanel glJPanel)
{
((GLJPanel) this.wwd).requestFocusInWindow();
glJPanel.requestFocusInWindow();
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/gov/nasa/worldwind/awt/AbstractViewInputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -825,10 +825,10 @@ protected double evaluateScaleFuncZoom()
return 0.0;
}

if (view instanceof OrbitView)
if (view instanceof OrbitView orbitView)
{
double radius = this.wwd.getModel().getGlobe().getRadius();
double t = ((OrbitView) view).getZoom() / (3.0 * radius);
double t = orbitView.getZoom() / (3.0 * radius);
return (t < 0 ? 0 : (t > 1 ? 1 : t));
}

Expand Down
8 changes: 4 additions & 4 deletions src/gov/nasa/worldwind/awt/ViewInputAttributes.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public void setSensitivity(double sensitivity)

public static class ActionAttributesMap
{
private Map<Object, ActionAttributes> actionMap = new HashMap<Object, ActionAttributes>();
private Map<Object, ActionAttributes> actionMap = new HashMap<>();

public ActionAttributesMap()
{
Expand Down Expand Up @@ -608,13 +608,13 @@ public void setActionAttributes(Object actionKey, ActionAttributes attributes)
public static final double DEFAULT_MOUSE_ROTATE_MAX_VALUE = 0.18; // Speed in degrees per mouse movement

// Device attributes.
private Map<Object, DeviceAttributes> deviceMap = new HashMap<Object, DeviceAttributes>();
private Map<Object, DeviceAttributes> deviceMap = new HashMap<>();
// Device/action pairing attributes.
private Map<Object, ActionAttributesMap> deviceActionMap = new HashMap<Object, ActionAttributesMap>();
private Map<Object, ActionAttributesMap> deviceActionMap = new HashMap<>();
// Device/Modifier/Action map
// Devices are mapped to modifier keys, which are then mapped to actions. Actions contain the keys
// that they are interested in, and only act on those keys.
private Map<Object, DeviceModifierMap> deviceModActionMap = new HashMap<Object, DeviceModifierMap>();
private Map<Object, DeviceModifierMap> deviceModActionMap = new HashMap<>();

public ViewInputAttributes()
{
Expand Down