Skip to content

Commit

Permalink
Merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
trixon committed Apr 12, 2020
2 parents f17549e + 5bc5a9f commit e3d54f9
Show file tree
Hide file tree
Showing 49 changed files with 114 additions and 100 deletions.
2 changes: 1 addition & 1 deletion app-nb/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion app-nb/branding/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion app-nb/core-nb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>core-nb</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.beans.PropertyChangeEvent;
import java.util.prefs.BackingStoreException;
import java.util.prefs.Preferences;
import javafx.application.Platform;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
Expand Down Expand Up @@ -74,6 +75,8 @@ public void run() {
System.setProperty("netbeans.winsys.no_toolbars", "true");
System.setProperty("netbeans.winsys.status_line.path", "AppStatusPanel.instance");

Platform.setImplicitExit(false);

boolean fullscreen = mOptions.isFullscreen();
boolean mapOnly = mOptions.isMapOnly();
FxHelper.setDarkThemeEnabled(mOptions.is(KEY_UI_LAF_DARK));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import java.awt.event.ActionListener;
import org.mapton.api.MOptions;
import org.openide.awt.Actions;
import org.openide.windows.WindowManager;
import se.trixon.almond.nbp.Almond;
import se.trixon.almond.nbp.fx.FxTopComponent;
Expand Down Expand Up @@ -46,7 +45,7 @@ protected void toggleTopComponent(String id) {
if (tc.isOpened()) {
tc.requestActive();
} else {
Actions.forID("Window", "org.mapton.core_nb.ui.MapTopComponent").actionPerformed(null);
Almond.openAndActivateTopComponent("MapTopComponent");
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
/*
* Copyright 2019 Patrik Karlström.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapton.core_nb.tool.app;

import org.controlsfx.control.action.Action;
import org.mapton.api.MToolApp;
import org.openide.awt.Actions;
import org.openide.util.lookup.ServiceProvider;
import se.trixon.almond.util.Dict;
import se.trixon.almond.util.fx.FxActionSwing;
import se.trixon.almond.util.icons.material.MaterialIcon;

/**
*
* @author Patrik Karlström
*/
@ServiceProvider(service = MToolApp.class)
public class MapTool implements MToolApp {

@Override
public Action getAction() {
FxActionSwing action = new FxActionSwing(Dict.MAP.toString(), () -> {
Actions.forID("Window", "org.mapton.core_nb.ui.MapTopComponent").actionPerformed(null);
});
action.setGraphic(MaterialIcon._Maps.MAP.getImageView(ICON_SIZE));

return action;
}
}
/*
* Copyright 2019 Patrik Karlström.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.mapton.core_nb.tool.app;

import org.controlsfx.control.action.Action;
import org.mapton.api.MToolApp;
import org.openide.util.lookup.ServiceProvider;
import se.trixon.almond.nbp.Almond;
import se.trixon.almond.util.Dict;
import se.trixon.almond.util.fx.FxActionSwing;
import se.trixon.almond.util.icons.material.MaterialIcon;

/**
*
* @author Patrik Karlström
*/
@ServiceProvider(service = MToolApp.class)
public class MapTool implements MToolApp {

@Override
public Action getAction() {
FxActionSwing action = new FxActionSwing(Dict.MAP.toString(), () -> {
Almond.openAndActivateTopComponent("MapTopComponent");
});
action.setGraphic(MaterialIcon._Maps.MAP.getImageView(ICON_SIZE));

return action;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private void initActionsFx() {
setTooltip(mToolboxAction, new KeyCodeCombination(KeyCode.T, KeyCombination.SHORTCUT_DOWN));

//Style
mStyleAction = new Action(String.format("%s & %s", Dict.TYPE.toString(), Dict.STYLE.toString()), event -> {
mStyleAction = new Action(event -> {
if (shouldOpen(mStylePopOver)) {
BorderPane pane = (BorderPane) mStylePopOver.getContentNode();
pane.setCenter(Mapton.getEngine().getStyleView());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
# limitations under the License.
#
app.copyright=\u00a9 2018\u20132020 Patrik Karlstr\u00f6m
app.date=2020-04-04
app.date=2020-04-12
app.description=Some kind of map application
app.licenseUri=https://www.apache.org/licenses/LICENSE-2.0.html
app.licenseUriTitle=Apache, Version 2.0
app.name=Mapton
app.uri=https://mapton.org
app.uriTitle=mapton.org
app.version=2.0.0
app.version=2.0.1
authors=Patrik Karlstr\u00f6m <patrik@trixon.se>
libraries=Almond-NBP;Apache Commons (csv, io, lang3, logging, text);Apache NetBeans Platform 11.3;OpenHMS SqlBuilder;H2 Database Engine;NASA WorldWind;JXMapViewer2;MapJfx;j2html;jsoup;GMapsFX;Material Design Icons
thanksTo=Magnus Myhrberg;eox.at
thanksTo=Magnus Myhrberg;eox.at;Peter C Mehlitz
2 changes: 1 addition & 1 deletion app-nb/modules-add-ons/geonames-ww/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>addon-geonames-ww</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,19 @@ private void refresh() {
int minValue = 0;
int maxValue = 100000;

for (Country country : countries) {
AnalyticGrid analyticGrid = new AnalyticGrid(mLayer, altitude, minValue, maxValue);
analyticGrid.setNullOpacity(0.0);
analyticGrid.setZeroOpacity(0.3);
analyticGrid.setZeroValueSearchRange(5);
analyticGrid.setGridData(getGridData(country));
countries.stream()
.filter(country -> (country.getGeonames().size() > 1))
.map(country -> {
AnalyticGrid analyticGrid = new AnalyticGrid(mLayer, altitude, minValue, maxValue);
analyticGrid.setNullOpacity(0.0);
analyticGrid.setZeroOpacity(0.3);
analyticGrid.setZeroValueSearchRange(5);
analyticGrid.setGridData(getGridData(country));

return analyticGrid;
}).forEachOrdered(analyticGrid -> {
mLayer.addRenderable(analyticGrid.getSurface());
}
});

LayerBundleManager.getInstance().redraw();
}
Expand Down
2 changes: 1 addition & 1 deletion app-nb/modules-add-ons/photos-nb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>addon-photos-nb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion app-nb/modules-add-ons/xkcd-nb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>addon-xkcd-nb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion app-nb/modules/editors-nb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>editors-nb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion app-nb/modules/poi-nb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>poi-nb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion app-nb/modules/reports-nb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>reports-nb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion app-wb/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion app-wb/core-wb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>core-wb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion app-wb/modules-add-ons/notes-wb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>addon-notes-wb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion app-wb/modules/reports-wb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>reports-wb</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>demo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules-add-ons/notes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>addon-notes</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules-add-ons/photos-ww/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>addon-photos-ww</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules-ext/gdal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>ext-gdal</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/wikipedia/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>wikipedia</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion modules/ww-datasources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>ww-datasources</artifactId>
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<packaging>pom</packaging>

<name>mapton-parent</name>
Expand Down Expand Up @@ -487,7 +487,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.11</version>
<version>42.2.12</version>
</dependency>
<dependency>
<groupId>de.micromata.jak</groupId>
Expand All @@ -512,12 +512,12 @@
<dependency>
<groupId>com.sothawo</groupId>
<artifactId>mapjfx</artifactId>
<version>2.13.1</version>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>com.github.pcmehlitz</groupId>
<artifactId>worldwind-pcm</artifactId>
<version>2.1.0.198</version>
<version>2.1.0.202</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
Expand Down Expand Up @@ -556,7 +556,7 @@
<brandingToken>mapton</brandingToken>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<almond.version>11.0.5</almond.version>
<mapton.version>2.0.0</mapton.version>
<mapton.version>2.0.1</mapton.version>
<openjfx.version>14</openjfx.version>
</properties>
<description>Some kind of map application</description>
Expand Down
2 changes: 1 addition & 1 deletion shared/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.mapton</groupId>
<artifactId>mapton-parent</artifactId>
<version>2.0.0</version>
<version>2.0.1</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>mapton-api</artifactId>
Expand Down
Loading

0 comments on commit e3d54f9

Please sign in to comment.