Updates to FX GUI

ArrayManager almsot done
This commit is contained in:
Jamie Mac 2023-12-21 16:47:32 +00:00
parent b91105dd07
commit 1d8a4ad8b8
56 changed files with 3638 additions and 161 deletions

28
.gitignore vendored
View File

@ -71,3 +71,31 @@ settings.xml
.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version
.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location
.metadata/.lock
.metadata/version.ini
.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml
.metadata/.plugins/org.eclipse.ui.intro/introstate
.metadata/.plugins/org.eclipse.tips.ide/dialog_settings.xml
.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup
.metadata/.plugins/org.eclipse.m2e.logback/logback.2.1.100.20230106-1511.xml
.metadata/.plugins/org.eclipse.m2e.core/workspaceState.ser
.metadata/.plugins/org.eclipse.jdt.ui/QualifiedTypeNameHistory.xml
.metadata/.plugins/org.eclipse.jdt.ui/OpenTypeHistory.xml
.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml
.metadata/.plugins/org.eclipse.jdt.core/variablesAndContainers.dat
.metadata/.plugins/org.eclipse.jdt.core/nonChainingJarsCache
.metadata/.plugins/org.eclipse.jdt.core/javaLikeNames.txt
.metadata/.plugins/org.eclipse.jdt.core/externalFilesCache
.metadata/.plugins/org.eclipse.jdt.core/assumedExternalFilesCache
.metadata/.plugins/org.eclipse.egit.core/.org.eclipse.egit.core.cmp/.settings/org.eclipse.core.resources.prefs
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.m2e.discovery.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs
.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs
.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
.metadata/.plugins/org.eclipse.core.resources/.root/1.tree
.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version
.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index
.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version

0
.metadata/.lock Normal file
View File

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
encoding=UTF-8
version=1

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.ui.formatterprofiles.version=23
spelling_locale=en_GB
spelling_locale_initialized=true
typefilter_migrated_2=true
useAnnotationsPrefPage=true
useQuickDiffPrefPage=true

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.m2e.discovery.pref.projects=

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
platformState=1678968029917
quickStart=false
tipsAndTricks=true

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
showIntro=false

View File

@ -0,0 +1,12 @@
//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false
PLUGINS_NOT_ACTIVATED_ON_STARTUP=;org.eclipse.m2e.discovery;
eclipse.preferences.version=1
org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_BG_END=41,41,41
org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_BG_START=43,44,45
org.eclipse.ui.workbench.ACTIVE_NOFOCUS_TAB_TEXT_COLOR=204,204,204
org.eclipse.ui.workbench.ACTIVE_TAB_BG_END=41,41,41
org.eclipse.ui.workbench.ACTIVE_TAB_BG_START=43,44,45
org.eclipse.ui.workbench.ACTIVE_TAB_TEXT_COLOR=221,221,221
org.eclipse.ui.workbench.INACTIVE_TAB_BG_END=49,53,56
org.eclipse.ui.workbench.INACTIVE_TAB_BG_START=59,64,66
org.eclipse.ui.workbench.INACTIVE_TAB_TEXT_COLOR=187,187,187

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8

View File

@ -0,0 +1 @@
java

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<typeInfoHistroy/>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<qualifiedTypeNameHistroy/>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
<item key="group_libraries" value="true"/>
<item key="layout" value="2"/>
<item key="rootMode" value="1"/>
<item key="linkWithEditor" value="false"/>
<item key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;2&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;Aggregate for window 1678968099026&quot;&gt;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;false&quot;&gt;&#x0A;&lt;xmlDefinedFilters&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.buildship.ui.packageexplorer.filter.gradle.buildfolder&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.m2e.MavenModuleFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.buildship.ui.packageexplorer.filter.gradle.subProject&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.DeprecatedMembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0A;&lt;/customFilters&gt;&#x0A;&lt;/packageExplorer&gt;"/>
</section>
</section>

View File

@ -0,0 +1,41 @@
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>OFF</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
</filter>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${org.eclipse.m2e.log.dir}/0.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
<MinIndex>1</MinIndex>
<MaxIndex>10</MaxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>10MB</MaxFileSize>
</triggeringPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
</appender>
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
</appender>
<root level="INFO">
<appender-ref ref="FILE" />
<appender-ref ref="STDOUT" />
<appender-ref ref="EclipseLog" />
<appender-ref ref="MavenConsoleLog" />
</root>
</configuration>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<setup:Workspace
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
name="workspace"/>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
</section>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<state reopen="false"/>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<workingSetManager>
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1678968098501_0" label="Java Main Sources" name="Java Main Sources"/>
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1678968098508_1" label="Java Test Sources" name="Java Test Sources"/>
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1678968099026_2" label="Window Working Set" name="Aggregate for window 1678968099026"/>
</workingSetManager>

3
.metadata/version.ini Normal file
View File

@ -0,0 +1,3 @@
#Thu Mar 16 12:01:36 GMT 2023
org.eclipse.core.runtime=2
org.eclipse.platform=4.27.0.v20230302-0300

View File

@ -842,7 +842,6 @@ C:\Users\*yourusername*\.m2\repository\pamguard\org\x3\2.2.2-->
<artifactId>atlantafx-base</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
</project>

View File

@ -666,8 +666,8 @@ public class Streamer implements Serializable, Cloneable, ManagedParameters {
*/
@Override
public String toString() {
return super.toString() + "; OriginSettings: " + getOriginSettings().toString() + "," + getHydrophoneOrigin().getOriginSettings().toString() +
"; Locator " + getLocatorSettings().toString();
return super.toString() + "; OriginSettings: " + getOriginSettings()==null ? "null" : getOriginSettings().toString() + "," + getHydrophoneOrigin().getOriginSettings().toString() +
"; Locator " + getLocatorSettings()==null ? "null" : getLocatorSettings().toString();
}
public static Streamer getAverage(Streamer sd1,

View File

@ -317,7 +317,7 @@ public class StreamerDialog extends PamDialog {
PamDialog.setDoubleValue(heading, defaultStreamer.getHeading(), "%3.1f");
PamDialog.setDoubleValue(pitch, defaultStreamer.getPitch(), "%3.1f");
PamDialog.setDoubleValue(roll, defaultStreamer.getRoll(), "%3.1f");
interpolationPanel.setSelection(currentArray.getOriginInterpolation());
ArraySensorFieldType[] sensorFields = ArraySensorFieldType.values();
@ -375,6 +375,9 @@ public class StreamerDialog extends PamDialog {
defaultStreamer.setStreamerName(streamerName.getText());
int im = interpolationPanel.getSelection();
System.out.println("GetParams: INTERPOLATION SELECTION: " + currentArray.getOriginInterpolation());
if (im < 0) {
return showWarning("Invalid interpolation selection");
}

View File

@ -0,0 +1,383 @@
package Array.layoutFX;
import pamViewFX.fxNodes.PamBorderPane;
import java.util.ArrayList;
import javafx.event.EventHandler;
import javafx.scene.AmbientLight;
import javafx.scene.DepthTest;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.PerspectiveCamera;
import javafx.scene.SceneAntialiasing;
import javafx.scene.SubScene;
import javafx.scene.control.Label;
import javafx.scene.input.MouseEvent;
import javafx.scene.input.ScrollEvent;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.paint.PhongMaterial;
import javafx.scene.shape.Box;
import javafx.geometry.Point3D;
import javafx.scene.shape.Sphere;
import javafx.scene.text.Text;
import javafx.scene.transform.Rotate;
import javafx.scene.transform.Translate;
/**
* Create a 3D visualisation of the array.
* <p>
PAMGUARD co-rdinate system is
* <p>
* x points right
* <p>
* y points north or into the screen
* <p>
* z is height and points up
* <p><p>
* This is different from the JavAFX 3D system in which
* <p>
* x points right
* <p>
* y points down
* <p>
* z points into the screen
* <p>
* Thus the source code for this class is a little bit more complex. By convention the co-ordinate system is only changed for display purposes and remains
* in PAMGUARD format throughout the rest of code.
* @author Jamie Macaulay
*
*/
public class Array3DPane extends PamBorderPane {
public static final Color DEFAULT_HYDRO_COL = Color.RED;
private static final Color DEFAULT_SENSOR_COL = Color.LIMEGREEN;
private double scaleFactor=20;
private double axisSize=10*scaleFactor;
//keep track of mouse positions
double mousePosX;
double mousePosY;
double mouseOldX;
double mouseOldY;
double mouseDeltaX;
double mouseDeltaY;
/**
* This is the group which rotates
*/
Group root3D;
/**
* Group which holds array shapes.
*/
Group arrayGroup;
/**
* Group which holds axis and other non changing bits.
*/
Group axisGroup;
/**
* The camera transforms
*/
private Rotate rotateY;
private Rotate rotateX;
private Translate translate;
public Array3DPane(){
// Create and position camera
PerspectiveCamera camera = new PerspectiveCamera(true);
camera.setFarClip(20000);
camera.setNearClip(0.1);
camera.setDepthTest(DepthTest.ENABLE);
camera.getTransforms().addAll (
rotateY=new Rotate(-45, Rotate.Y_AXIS),
rotateX=new Rotate(-45, Rotate.X_AXIS),
translate=new Translate(0, 200, -2000));
//create main 3D group
root3D=new Group();
axisGroup=buildAxes(axisSize); //create axis group
arrayGroup=new Group();
root3D.getChildren().add(arrayGroup);
root3D.getChildren().add(axisGroup);
AmbientLight light = new AmbientLight();
light.setColor(Color.WHITE);
Group lightGroup = new Group();
lightGroup.getChildren().add(light);
root3D.getChildren().add(lightGroup);
//Use a SubScene to mix 3D and 2D stuff.
//note- make sure depth buffer in sub scene is enabled.
SubScene subScene = new SubScene(root3D, 500,400, true, SceneAntialiasing.BALANCED);
subScene.widthProperty().bind(this.widthProperty());
subScene.heightProperty().bind(this.heightProperty());
subScene.setDepthTest(DepthTest.ENABLE);
//note the fill is actually quite important because if you don't have it mouse rotations etc
//onyl work if you select a 3D shape
subScene.setFill(Color.TRANSPARENT);
subScene.setCamera(camera);
//handle mouse events for sub scene
handleMouse(subScene);
//create new group to add sub scene to
Group group = new Group();
group.getChildren().add(subScene);
//add group to window.
this.setCenter(group);
this.setDepthTest(DepthTest.ENABLE);
}
/**
* Create a 3D axis with default colours set.
* @param- size of the axis
*/
public Group buildAxes(double axisSize) {
return buildAxes( axisSize,Color.RED, Color.RED,
Color.GREEN, Color.GREEN,
Color.BLUE, Color.BLUE,
Color.WHITE);
}
/**
* Create a 3D axis.
* @param- size of the axis
*/
public static Group buildAxes(double axisSize, Color xAxisDiffuse, Color xAxisSpectacular,
Color yAxisDiffuse, Color yAxisSpectacular,
Color zAxisDiffuse, Color zAxisSpectacular,
Color textColour) {
Group axisGroup=new Group();
double length = 2d*axisSize;
double width = axisSize/100d;
double radius = 2d*axisSize/100d;
final PhongMaterial redMaterial = new PhongMaterial();
redMaterial.setDiffuseColor(xAxisDiffuse);
redMaterial.setSpecularColor(xAxisSpectacular);
final PhongMaterial greenMaterial = new PhongMaterial();
greenMaterial.setDiffuseColor(yAxisDiffuse);
greenMaterial.setSpecularColor( yAxisSpectacular);
final PhongMaterial blueMaterial = new PhongMaterial();
blueMaterial.setDiffuseColor(zAxisDiffuse);
blueMaterial.setSpecularColor(zAxisSpectacular);
Text xText=new Text("x");
xText.setStyle("-fx-font: 20px Tahoma;");
xText.setFill(textColour);
xText.setStroke(textColour);
Text yText=new Text("z");
yText.setStyle("-fx-font: 20px Tahoma; ");
yText.setFill(textColour);
yText.setStroke(textColour);
Text zText=new Text("y");
zText.setStyle("-fx-font: 20px Tahoma; ");
zText.setFill(textColour);
zText.setStroke(textColour);
xText.setTranslateX(axisSize+5);
xText.setTranslateZ(1); //dunno why but shifting a little in z is required to see colour
yText.setTranslateY(-(axisSize+5));
yText.setTranslateZ(1); //dunno why but shifting a little in z is required to see colour
zText.setTranslateZ(axisSize+5);
Sphere xSphere = new Sphere(radius);
Sphere ySphere = new Sphere(radius);
Sphere zSphere = new Sphere(radius);
xSphere.setMaterial(redMaterial);
ySphere.setMaterial(greenMaterial);
zSphere.setMaterial(blueMaterial);
xSphere.setTranslateX(axisSize);
ySphere.setTranslateY(-axisSize);
zSphere.setTranslateZ(axisSize);
Box xAxis = new Box(length, width, width);
Box yAxis = new Box(width, length, width);
Box zAxis = new Box(width, width, length);
xAxis.setMaterial(redMaterial);
yAxis.setMaterial(greenMaterial);
zAxis.setMaterial(blueMaterial);
axisGroup.getChildren().addAll(xAxis, yAxis, zAxis);
axisGroup.getChildren().addAll(xText, yText, zText);
axisGroup.getChildren().addAll(xSphere, ySphere, zSphere);
return axisGroup;
}
private void handleMouse(SubScene scene) {
scene.setOnMousePressed(new EventHandler<MouseEvent>() {
@Override public void handle(MouseEvent me) {
mousePosX = me.getSceneX();
mousePosY = me.getSceneY();
mouseOldX = me.getSceneX();
mouseOldY = me.getSceneY();
}
});
scene.setOnScroll(new EventHandler<ScrollEvent>() {
@Override public void handle(ScrollEvent event) {
// System.out.println("Scroll Event: "+event.getDeltaX() + " "+event.getDeltaY());
translate.setZ(translate.getZ()+ event.getDeltaY() *0.001*translate.getZ()); // +
}
});
scene.setOnMouseDragged(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent me) {
mouseOldX = mousePosX;
mouseOldY = mousePosY;
mousePosX = me.getSceneX();
mousePosY = me.getSceneY();
mouseDeltaX = (mousePosX - mouseOldX);
mouseDeltaY = (mousePosY - mouseOldY);
double modifier = 1.0;
double modifierFactor = 0.1;
if (me.isControlDown()) {
modifier = 0.1;
}
if (me.isShiftDown()) {
modifier = 10.0;
}
if (me.isPrimaryButtonDown()) {
rotateY.setAngle(rotateY.getAngle() + mouseDeltaX * modifierFactor * modifier * 2.0); // +
rotateX.setAngle(rotateX.getAngle() - mouseDeltaY * modifierFactor * modifier * 2.0); // -
}
if (me.isSecondaryButtonDown()) {
translate.setX(translate.getX() -mouseDeltaX * modifierFactor * modifier * 5);
translate.setY(translate.getY() - mouseDeltaY * modifierFactor * modifier * 5); // +
}
}
});
}
// /**
// * Draw the entire array
// * @param pos - hydrophone and streamer positions in the same co-ordinate frame as the reference frame.
// */
// public void drawArrays(ArrayList<ArrayList<ArrayPos>> pos){
//
// arrayGroup.getChildren().removeAll(arrayGroup.getChildren());
//
// if (pos==null){
// System.err.println("Array3DPane: Hydrophone positions are null");
// return;
// }
//
// for (int i=0; i< pos.size(); i++){
// for (int j=0; j<pos.get(i).size(); j++){
// drawArray(pos.get(i).get(j));
// }
// }
//
// //System.out.println("Draw 3D hydrophone array");
// }
// /**
// * Draw an array.
// * @param arrayPos - hydrophone and streamer positions in the same co-ordinate frame as the reference frame.
// */
// private void drawArray(ArrayPos arrayPos){
//
// final PhongMaterial redMaterial = new PhongMaterial();
// redMaterial.setDiffuseColor(DEFAULT_HYDRO_COL);
// redMaterial.setSpecularColor(DEFAULT_HYDRO_COL.brighter());
//
// final PhongMaterial greenMaterial = new PhongMaterial();
// greenMaterial.setDiffuseColor(DEFAULT_SENSOR_COL);
// greenMaterial.setSpecularColor(DEFAULT_SENSOR_COL.brighter());
//
// //draw hydrophones
// Sphere sphere;
// for (int i=0; i<arrayPos.getTransformHydrophonePos().size(); i++){
// sphere=new Sphere(settings.hydrophoneSize*scaleFactor);
// sphere.setTranslateX(arrayPos.getTransformHydrophonePos().get(i)[0]*scaleFactor);
// sphere.setTranslateY(-arrayPos.getTransformHydrophonePos().get(i)[2]*scaleFactor);
// sphere.setTranslateZ(arrayPos.getTransformHydrophonePos().get(i)[1]*scaleFactor);
//
// Color hydroCol = settings.hydrophoneColours[arrayPos.getHArray().getHydrophones().get(i).channel.get()];
//
// if (hydroCol == null) {
// sphere.setMaterial(redMaterial);
// }
// else {
// final PhongMaterial aMaterial = new PhongMaterial();
// aMaterial.setDiffuseColor(hydroCol);
// aMaterial.setSpecularColor(hydroCol.brighter());
// sphere.setMaterial(aMaterial);
//
// }
// arrayGroup.getChildren().add(sphere);
//
// }
//
//
//
// //draw streamer
// PolyLine3D polyLine3D;
// ArrayList<Point3D> streamerPoints;
//
// for (int i=0; i<arrayPos.getTransformStreamerPositions().size(); i++){
// if (arrayPos.getTransformStreamerPositions().get(i)==null) return;
// streamerPoints=new ArrayList<Point3D>();
// for (int j=0; j<arrayPos.getTransformStreamerPositions().get(i).size(); j++){
//
// //TODO- use cylinder for line
// // Cylinder cylinder=createConnection(arrayPos.getTransformStreamerPositions().get(i).get(j).multiply(scaleFactor), arrayPos.getTransformStreamerPositions().get(i).get(j+1).multiply(scaleFactor),0.2*scaleFactor);
// // arrayGroup.getChildren().add(cylinder);
//
// //need to convert to fxyz 3D point - stupid but no work around.
// Point3D newPoint=new Point3D((float) (arrayPos.getTransformStreamerPositions().get(i).get(j).getX()*scaleFactor),
// (float) (-arrayPos.getTransformStreamerPositions().get(i).get(j).getZ()*scaleFactor), (float) (arrayPos.getTransformStreamerPositions().get(i).get(j).getY()*scaleFactor));
// streamerPoints.add(newPoint);
// }
// polyLine3D=new PolyLine3D(streamerPoints, 4, Color.BLUE);
// arrayGroup.getChildren().add(polyLine3D);
// }
//
// }
}

View File

@ -0,0 +1,15 @@
package Array.layoutFX;
public interface ArrayChangeListener {
int STREAMER_CHANGE = 0;
int HYDROPHONE_CHANGE = 1;
/**
* Called whenever a hydrophone or streamer changes.
* @param type - the type of change e.g. ArrayChangeListener.HYDROPHONE_CHANGE
* @param changedObject - the changed object - hydrophone or streamer property.
*/
public void arrayChanged(int type, Object changedObject);
}

View File

@ -6,8 +6,10 @@ import PamController.SettingsPane;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.control.Tab;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane;
import javafx.collections.ListChangeListener;
import javafx.geometry.Insets;
import javafx.scene.layout.StackPane;
import javafx.scene.control.Button;
@ -34,23 +36,43 @@ import pamViewFX.fxNodes.PamHBox;
*/
public class ArraySettingsPane extends SettingsPane<PamArray >{
/**
* Minimum size of the 3D pane
*/
private static final double MIN_3D_WIDTH = 450;
private StreamersPane streamerPane;
private Pane mainPane;
private PamBorderPane mainPane;
private HydrophonesPane hydrophonePane;
// private Pane holder;
private Label hydrophoneLabel;
private Label hydrophoneLabel;
/**
* Pane which shows a 3D representation of the hydrophone array.
*/
private Array3DPane array3DPane;
public ArraySettingsPane() {
super(null);
mainPane = createArrayPane();
mainPane=new PamBorderPane();
mainPane.setCenter(createArrayPane());
// mainPane.setStyle("-fx-background-color: red;");
mainPane.setMaxWidth(Double.MAX_VALUE);
mainPane.setPrefWidth(800);
mainPane.setMinWidth(1100);
mainPane.setStyle("-fx-padding: 0,0,0,0");
mainPane.setRight(create3DPane());
streamerPane.getStreamerTable().getItems().addListener((ListChangeListener<? super StreamerProperty>) c->{
//the streamer table has changed and so the streamer needs changed
System.out.println("Streamer Changed!!!");
});
// mainPane.setMinWidth(800);
@ -87,6 +109,14 @@ public class ArraySettingsPane extends SettingsPane<PamArray >{
}
private Pane create3DPane() {
this.array3DPane = new Array3DPane();
//important because the 3D pane has not default size
array3DPane.setMinWidth(MIN_3D_WIDTH);
return array3DPane;
}
/**
* Create the main pane.
* @return the main array pane.

View File

@ -1,5 +1,7 @@
package Array.layoutFX;
import java.util.ArrayList;
import Array.Hydrophone;
import Array.PamArray;
import PamController.PamController;
@ -59,7 +61,12 @@ public class HydrophonesPane extends PamBorderPane {
/**
* Settings pane for a single hydrophone.
*/
private HydrophoneSettingsPane hydrophonePane = new HydrophoneSettingsPane();
private HydrophoneSettingsPane hydrophonePane = new HydrophoneSettingsPane();
/**
* A list of listeners which are called whenever a hydrophone is added removed or changed.
*/
public ArrayList<ArrayChangeListener> hydrophoneChangeListeners = new ArrayList<ArrayChangeListener>();
public HydrophonesPane() {
@ -90,6 +97,8 @@ public class HydrophonesPane extends PamBorderPane {
// System.out.println("Hydro err: " + currentHydrophoneData.getXErr().get()+ " " + currentHydrophoneData.getYErr().get() + " " + currentHydrophoneData.getZErr().get());
currentHydrophoneData.setHydrophone(hydro);
notifyHydrophoneListeners(currentHydrophoneData);
//need to refresh table to show symbol.
tableArrayPane.getTableView().refresh();
@ -104,6 +113,16 @@ public class HydrophonesPane extends PamBorderPane {
this.setCenter(pamFlipePane);
}
/**
* Notify the hydrophone listeners of a change
* @param streamer - the changed streamer
*/
public void notifyHydrophoneListeners(HydrophoneProperty hydrophone) {
for (ArrayChangeListener listener: hydrophoneChangeListeners) {
listener.arrayChanged(ArrayChangeListener.HYDROPHONE_CHANGE, hydrophone);
}
}
/**
* Class which extends TableSettingsPane and creates a sliding pane instead of a dialog when an item is added.
* @author Jamie Macaulay

View File

@ -43,6 +43,8 @@ public class InterpChoicePane extends InterpSettingsPane {
}
public void setSelection(int option) {
System.out.println("Select interp option: " + option);
interpChoiceBox.getSelectionModel().select(Integer.valueOf(option));
@ -64,8 +66,13 @@ public class InterpChoicePane extends InterpSettingsPane {
@Override
protected void enableControls() {
//get the current selection
Integer item = interpChoiceBox.getSelectionModel().getSelectedItem();
//clear items
interpChoiceBox.getItems().clear();
//set allowed values
for (int i=0; i<interpChoice.length ; i++) {
if ((allowedValues & (1<<interpChoice[i])) != 0){
@ -73,6 +80,15 @@ public class InterpChoicePane extends InterpSettingsPane {
}
}
//reselect the previously selected item if possible.
if (interpChoiceBox.getItems().contains(item)) {
interpChoiceBox.getSelectionModel().select(item);
}
else {
interpChoiceBox.getSelectionModel().select(0);
}
}
@Override

View File

@ -8,7 +8,7 @@ import javafx.beans.property.SimpleStringProperty;
/**
* Property class for a Streamer. Create property bindings for certain Streamer values which allows
* for much easier integration into UI components such as JavaFX.
* for much easier integration into UI components in JavaFX.
*
* @author Jamie Macaulay
*
@ -22,6 +22,8 @@ public class StreamerProperty {
private SimpleStringProperty reference = new SimpleStringProperty();
private SimpleStringProperty origin = new SimpleStringProperty();
/**
* Get the x, y and z.
*/
@ -48,6 +50,8 @@ public class StreamerProperty {
z.setValue(streamer.getZ());
streamerIDProperty.setValue(streamer.getStreamerIndex());
reference.setValue(streamer.getHydrophoneLocator() != null ? streamer.getHydrophoneLocator().getName() : "null");
origin.setValue(streamer.getHydrophoneOrigin() != null ? streamer.getHydrophoneOrigin().getName() : "null");
}
public SimpleStringProperty getName() {
@ -103,4 +107,15 @@ public class StreamerProperty {
return reference;
}
/**
* Get the origin string property.
* @return the origin string property.
*/
public SimpleStringProperty getHydrophoneOrigin() {
return origin;
}
}

View File

@ -505,7 +505,10 @@ public class StreamerSettingsPane extends SettingsPane<Streamer> {
private void enableControls() {
if (currentOriginMethod != null) {
System.out.println("Enable: selected interp: " + interpPane.getSelectedInterpType());
interpPane.setAllowedValues(currentOriginMethod.getAllowedInterpolationMethods());
System.out.println("Enable controls: " + interpPane.getSelectedInterpType());
if (interpPane.getSelectedInterpType()<0) {
interpPane.setSelection(0);
}
@ -515,7 +518,7 @@ public class StreamerSettingsPane extends SettingsPane<Streamer> {
@Override
public Streamer getParams(Streamer currParams) {
System.out.println("GETPARAMS: " + currParams);
// System.out.println("GETPARAMS: " + currParams);
try {
defaultStreamer.setX(Double.valueOf(xPos.getText()));
@ -532,6 +535,8 @@ public class StreamerSettingsPane extends SettingsPane<Streamer> {
defaultStreamer.setStreamerName(currParams.getStreamerName());
int im = interpPane.getSelectedInterpType();
System.out.println("Streamer gwetParams: Origin interpolator: " + interpPane.getSelectedInterpType());
if (im < 0) {
System.err.println("Streamer getParams: There is an index problem with the interpolation selection streamer panel: index = " + im);
}
@ -559,6 +564,7 @@ public class StreamerSettingsPane extends SettingsPane<Streamer> {
OriginDialogComponent mthDialogComponent = currentOriginMethod.getDialogComponent();
if (mthDialogComponent != null) {
if (mthDialogComponent.getParams() == false) {
System.err.println("Streamer: The origin settings pane returned false suggesting paramters are not correct.");
return null;
}
}
@ -585,8 +591,8 @@ public class StreamerSettingsPane extends SettingsPane<Streamer> {
* orientation data from or not. The enable orientation check box will enable or
* disable orientation for ALL streamers which are loaded into memory.
*/
System.out.println("CURRENTORIGINMETHOD: " + currentOriginMethod);
System.out.println("LOCATORMETHOD: " + locator);
// System.out.println("CURRENTORIGINMETHOD: " + currentOriginMethod);
// System.out.println("LOCATORMETHOD: " + locator);
defaultStreamer.setHydrophoneOrigin(currentOriginMethod);
defaultStreamer.setHydrophoneLocator(locator);
@ -659,20 +665,25 @@ public class StreamerSettingsPane extends SettingsPane<Streamer> {
mthDialogComponent.setParams();
}
System.out.println("Streamer setParams: Set orientation: " + defaultStreamer.getHeading() + " " + defaultStreamer.getPitch() + " " + defaultStreamer.getRoll());
// System.out.println("Streamer setParams: Set orientation: " + defaultStreamer.getHeading() + " " + defaultStreamer.getPitch() + " " + defaultStreamer.getRoll());
heading .setText(orientation2Text(defaultStreamer.getHeading()));
pitch .setText(orientation2Text(defaultStreamer.getPitch()));
roll .setText(orientation2Text(defaultStreamer.getRoll()));
System.out.println("Streamer setParams: Origin interpolator: " + currentArray.getOriginInterpolation());
System.out.println("Streamer setParams: Origin interpolator: " + currentArray.getOriginInterpolation() + " " + currentOriginMethod.getAllowedInterpolationMethods());
if (currentArray.getOriginInterpolation()<0 || currentArray.getOriginInterpolation()>=currentOriginMethod.getAllowedInterpolationMethods()) {
interpPane.setSelection(0);
System.err.println("Streamer setParams: Origin interpolator value of " + currentArray.getOriginInterpolation() + " not allowed for origin method - setting to first allowed method:");
interpPane.setSelection(0);
}
else {
interpPane.setSelection(currentArray.getOriginInterpolation());
}
System.out.println("Streamer setParams: selected interp: " + interpPane.getSelectedInterpType());
ArraySensorFieldType[] sensorFields = ArraySensorFieldType.values();
for (int i = 0; i < sensorFields.length; i++) {
@ -691,7 +702,7 @@ public class StreamerSettingsPane extends SettingsPane<Streamer> {
private String orientation2Text(Double ang) {
if (ang == null) return String.valueOf(0.0);
else return String.format("%3.1f", defaultStreamer.getHeading());
else return String.format("%3.1f", ang);
}
@Override

View File

@ -1,5 +1,7 @@
package Array.layoutFX;
import java.util.ArrayList;
import Array.PamArray;
import Array.Streamer;
import PamController.PamController;
@ -10,6 +12,7 @@ import pamViewFX.fxNodes.PamBorderPane;
import pamViewFX.fxNodes.flipPane.PamFlipPane;
import pamViewFX.fxNodes.table.TableSettingsPane;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.layout.Pane;
import javafx.geometry.Insets;
@ -46,6 +49,11 @@ public class StreamersPane extends PamBorderPane {
*/
private StreamerSettingsPane streamerPane = new StreamerSettingsPane();
/**
* A list of listeners which are called whenever a streamer is added removed or changed.
*/
public ArrayList<ArrayChangeListener> streamerChangeListeners = new ArrayList<ArrayChangeListener>();
public StreamersPane() {
@ -66,15 +74,14 @@ public class StreamersPane extends PamBorderPane {
pamFlipePane.getFront().setPadding(new Insets(5,5,5,10));
pamFlipePane.setAdvLabelEditable(true);
pamFlipePane.getPostAdvLabel().setText("Settings");
pamFlipePane.flipFrontProperty().addListener((obsval, oldVal, newVal)->{
//the flip pane
if (newVal) {
Streamer streamer = streamerPane.getParams(currentStreamerData.getStreamer());
System.out.println("NEW STREAMER: " + streamer);
if (streamer==null) {
//the warning dialog is shown in the streamer settings pane
return;
@ -83,6 +90,9 @@ public class StreamersPane extends PamBorderPane {
streamer.setStreamerName(pamFlipePane.getAdvLabel().getText());
currentStreamerData.setStreamer(streamer);
notifyStreamerListeners(currentStreamerData);
// System.out.println("Update streamer: " + tableArrayPane.getStreamers().indexOf(currentStreamerData) + " no. streamers: " + currentArray.getNumStreamers());
//need to refresh table to show symbol.
tableArrayPane.getTableView().refresh();
@ -91,9 +101,7 @@ public class StreamersPane extends PamBorderPane {
streamer.setupLocator(currentArray);
streamer.makeStreamerDataUnit();
//update the streamer in the current array
// System.out.println("Update streamer: " + tableArrayPane.getStreamers().indexOf(currentStreamerData) + " no. streamers: " + currentArray.getNumStreamers());
}
}
});
@ -101,6 +109,16 @@ public class StreamersPane extends PamBorderPane {
}
/**
* Notify the streamer listeners of a change
* @param streamer - the changed streamer
*/
public void notifyStreamerListeners(StreamerProperty streamer) {
for (ArrayChangeListener listener: streamerChangeListeners) {
listener.arrayChanged(ArrayChangeListener.STREAMER_CHANGE, streamer);
}
}
/**
* Class which extends TableSettingsPane and creates a sliding pane instead of a dialog when an item is added.
* @author Jamie Macaulay
@ -139,7 +157,7 @@ public class StreamersPane extends PamBorderPane {
posColumn.getColumns().addAll(x, y, z);
TableColumn<StreamerProperty,String> reference = new TableColumn<StreamerProperty,String>("Reference");
reference.setCellValueFactory(cellData -> cellData.getValue().getHydrophineLocator());
reference.setCellValueFactory(cellData -> cellData.getValue().getHydrophoneOrigin());
reference.setEditable(true);
TableColumn<StreamerProperty,String> locator = new TableColumn<StreamerProperty,String>("Locator");
@ -215,7 +233,7 @@ public class StreamersPane extends PamBorderPane {
}
/**
* Set the paramters for the streamer pane.
* Set the parameters for the streamer pane.
* @param currentArray - the current array.
*/
public void setParams(PamArray currentArray) {
@ -264,5 +282,9 @@ public class StreamersPane extends PamBorderPane {
streamerPane.setRecieverLabels();
}
public TableView<StreamerProperty> getStreamerTable() {
return tableArrayPane.getTableView();
}
}

View File

@ -32,16 +32,20 @@ public class StaticHydrophonePane extends PamBorderPane {
public void setParams() {
GpsDataUnit dataUnit = getStaticOriginSettings().getStaticPosition();
if (dataUnit == null) {
return;
}
GpsData gpsData = dataUnit.getGpsData();
if (gpsData == null) {
return;
setLatLong(null);
}
else {
GpsData gpsData = dataUnit.getGpsData();
setLatLong(gpsData);
}
// if (gpsData == null) {
// return;
// }
// else {
// setLatLong(gpsData);
// }
}
private StaticOriginSettings getStaticOriginSettings() {
@ -50,8 +54,29 @@ public class StaticHydrophonePane extends PamBorderPane {
public boolean getParams() {
boolean ok = getStaticOriginSettings()!= null && getStaticOriginSettings() .getStaticPosition() != null;
return ok;
LatLong latLong = latLongPane.getParams(null);
if (latLong==null) {
System.err.println("StaticHydrophonePane: latitude and longitude is null");
return false;
}
if (getStaticOriginSettings()==null) {
System.err.println("StaticHydrophonePane: static origin is null");
return false;
}
//set
getStaticOriginSettings().setStaticPosition(staticOriginMethod.getStreamer(), new GpsData(latLong));
//
// boolean ok = getStaticOriginSettings()!= null && getStaticOriginSettings() .getStaticPosition() != null;
//
// System.out.println("StaticHydrophonePane: Get params from static origin 1 : " + getStaticOriginSettings());
//
// System.out.println("StaticHydrophonePane: Get params from static origin 2: " + getStaticOriginSettings() .getStaticPosition());
return true;
}
/**
@ -59,7 +84,14 @@ public class StaticHydrophonePane extends PamBorderPane {
* @param latLong
*/
private void setLatLong(LatLong latLong) {
latLongPane.setParams(latLong);
if (latLong==null) {
//create a default latitude and longitude - Rockall (why not).
LatLong latLongdefault = new LatLong();
latLongdefault.setLatitude(57.595833333333);
latLongdefault.setLongitude(-13.686944444444);
latLongPane.setParams(latLongdefault);
}
else latLongPane.setParams(latLong);
}
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with Vectornator (http://vectornator.io/) -->
<svg height="100%" stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1" viewBox="0 0 100 100" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:vectornator="http://vectornator.io" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<clipPath id="ArtboardFrame">
<rect height="100" width="100" x="0" y="0"/>
</clipPath>
<g clip-path="url(#ArtboardFrame)" id="Layer-1" vectornator:layerName="Layer 1">
<g opacity="1" vectornator:layerName="Group 1">
<path d="M65.625 43.75C64.0625 46.875 64.0625 46.875 62.5 50C69.5794 35.8411 84.4382 23.9373 100 18.75C100 59.375 100 59.375 100 100C79.6875 100 79.6875 100 59.375 100C63.87 73.0301 62.5 87.5862 62.5 56.25C38.8091 53.8809 22.3898 51.9117 0 59.375C0 31.25 0 31.25 0 3.125C2.44565 2.98114 93.4864-12.1045 68.75 25C67.1875 17.1875 67.1875 17.1875 65.625 9.375C56.4287 9.375 60.8481 7.90186 53.125 15.625C57.8125 14.0625 57.8125 14.0625 62.5 12.5C62.5 24.2042 63.8975 19.0799 59.375 28.125C62.5 26.5625 62.5 26.5625 65.625 25C65.625 34.7273 60.683 41.134 56.25 50C60.3067 41.8866 57.0458 43.75 65.625 43.75Z" fill="#0df9fb" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M65.625 40.625C65.625 26.9533 62.8795 26.8303 75 18.75C75 21.875 75 21.875 75 25C82.897 17.103 78.6148 20.0676 87.5 15.625C76.5625 28.125 76.5625 28.125 65.625 40.625Z" fill="#bbfeff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M75 34.375C84.9006 34.375 88.2998 32.4126 96.875 28.125C91.4116 39.0518 84.6729 35.7886 75 40.625C75 37.5 75 37.5 75 34.375Z" fill="#83feff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M65.625 9.375C60.9375 10.9375 60.9375 10.9375 56.25 12.5C63.792 23.813 64.1796 18.5157 59.375 28.125C70.2835 22.6708 65.625 27.3292 65.625 9.375Z" fill="#75feff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M93.75 12.5C87.5 10.9375 87.5 10.9375 81.25 9.375C82.8125 4.6875 82.8125 4.6875 84.375 0C87.5 0 87.5 0 90.625 0C92.1875 6.25 92.1875 6.25 93.75 12.5Z" fill="#befeff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M81.25 18.75C72.0537 14.1519 75.7366 17.8347 71.875 6.25C73.4375 9.375 73.4375 9.375 75 12.5C78.125 10.9375 78.125 10.9375 81.25 9.375C81.25 14.0625 81.25 14.0625 81.25 18.75Z" fill="#8dfeff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M81.25 9.375C78.125 10.9375 78.125 10.9375 75 12.5C71.875 7.8125 71.875 7.8125 68.75 3.125C75 6.25 75 6.25 81.25 9.375Z" fill="#91feff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M100 18.75C95.3125 17.1875 95.3125 17.1875 90.625 15.625C93.75 14.0625 93.75 14.0625 96.875 12.5C98.4375 15.625 98.4375 15.625 100 18.75Z" fill="#b8feff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M90.625 15.625C87.5 17.1875 87.5 17.1875 84.375 18.75C84.375 14.0625 84.375 14.0625 84.375 9.375C87.5 12.5 87.5 12.5 90.625 15.625Z" fill="#98feff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M75 25C75 21.875 75 21.875 75 18.75C78.125 18.75 78.125 18.75 81.25 18.75C78.125 21.875 78.125 21.875 75 25Z" fill="#3cfdff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M68.75 34.375C68.75 35.9375 68.75 35.9375 68.75 37.5C67.1875 37.5 67.1875 37.5 65.625 37.5C67.1875 35.9375 67.1875 35.9375 68.75 34.375Z" fill="#bfffff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M71.875 28.125C73.4375 26.5625 73.4375 26.5625 75 25C75 26.5625 75 26.5625 75 28.125C73.4375 28.125 73.4375 28.125 71.875 28.125Z" fill="#bfffff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M56.25 12.5C56.25 14.0625 56.25 14.0625 56.25 15.625C54.6875 15.625 54.6875 15.625 53.125 15.625C54.6875 14.0625 54.6875 14.0625 56.25 12.5Z" fill="#40feff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
<path d="M65.625 43.75C65.625 42.1875 65.625 42.1875 65.625 40.625C64.0625 42.1875 64.0625 42.1875 62.5 43.75C64.0625 43.75 64.0625 43.75 65.625 43.75Z" fill="#80feff" fill-rule="nonzero" opacity="1" stroke="#0df9fb" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
</g>
<path d="M0.701165 59.8273C12.1809 55.9906 29.4985 54.499 29.4985 54.499L47.7599 55.1321L57.1899 55.8429L61.1758 58.2548L62.2461 60.1348L62.4183 63.0732L62.3304 65.5861L62.3761 69.1299L62.1348 74.883L62.0817 80.9884L61.547 89.9043L60.0824 94.5294C60.0824 94.5294 59.102 98.4709 59.102 98.4269C59.102 98.3829 58.93 99.6551 58.93 99.6551L0.187334 99.9489L0.193103 59.9461" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" vectornator:layerName="Curve 2"/>
<path d="M0.101891 59.6442L0.321679 59.4463" fill="none" opacity="1" stroke="#80feff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" vectornator:layerName="Curve 1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with Vectornator (http://vectornator.io/) -->
<svg height="100%" stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1" viewBox="0 0 100 100" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:vectornator="http://vectornator.io" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g id="layer" vectornator:layerName="layer">
<path d="M16.7142 16.0914C16.7142 13.9256 18.5294 12.1699 20.7685 12.1699C23.0076 12.1699 24.8227 13.9256 24.8227 16.0914C24.8227 18.2572 23.0076 20.0129 20.7685 20.0129C18.5294 20.0129 16.7142 18.2572 16.7142 16.0914Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M32.5588 27.8707C32.5588 25.6661 34.3586 23.8788 36.5788 23.8788C38.799 23.8788 40.5989 25.6661 40.5989 27.8707C40.5989 30.0754 38.799 31.8626 36.5788 31.8626C34.3586 31.8626 32.5588 30.0754 32.5588 27.8707Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M42.9552 44.2334C42.9552 42.2822 44.7416 40.7004 46.9452 40.7004C49.1489 40.7004 50.9353 42.2822 50.9353 44.2334C50.9353 46.1845 49.1489 47.7663 46.9452 47.7663C44.7416 47.7663 42.9552 46.1845 42.9552 44.2334Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M52.7913 60.5762C52.7913 58.5469 54.4922 56.9018 56.5903 56.9018C58.6884 56.9018 60.3893 58.5469 60.3893 60.5762C60.3893 62.6054 58.6884 64.2505 56.5903 64.2505C54.4922 64.2505 52.7913 62.6054 52.7913 60.5762Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M62.7469 75.7602C62.7469 73.8706 64.4196 72.3388 66.483 72.3388C68.5464 72.3388 70.2191 73.8706 70.2191 75.7602C70.2191 77.6498 68.5464 79.1816 66.483 79.1816C64.4196 79.1816 62.7469 77.6498 62.7469 75.7602Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M2.69599 8.67142C2.69599 6.6263 4.24746 4.96841 6.1613 4.96841C8.07514 4.96841 9.62661 6.6263 9.62661 8.67142C9.62661 10.7165 8.07514 12.3744 6.1613 12.3744C4.24746 12.3744 2.69599 10.7165 2.69599 8.67142Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M6.37104 8.51295L20.6509 16.2716" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 1"/>
<path d="M76.1272 86.2275C76.1272 84.3244 77.7324 82.7817 79.7126 82.7817C81.6928 82.7817 83.298 84.3244 83.298 86.2275C83.298 88.1306 81.6928 89.6733 79.7126 89.6733C77.7324 89.6733 76.1272 88.1306 76.1272 86.2275Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M90.4953 90.8591C90.4953 87.9777 91.9568 85.6419 93.7596 85.6419C95.5625 85.6419 97.024 87.9777 97.024 90.8591C97.024 93.7404 95.5625 96.0762 93.7596 96.0762C91.9568 96.0762 90.4953 93.7404 90.4953 90.8591Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M5.26296 55.751C5.26296 53.1707 6.6501 51.079 8.36122 51.079C10.0723 51.079 11.4595 53.1707 11.4595 55.751C11.4595 58.3312 10.0723 60.4229 8.36122 60.4229C6.6501 60.4229 5.26296 58.3312 5.26296 55.751Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M26.1864 67.0811C26.1864 64.14 27.717 61.7558 29.605 61.7558C31.493 61.7558 33.0236 64.14 33.0236 67.0811C33.0236 70.0223 31.493 72.4065 29.605 72.4065C27.717 72.4065 26.1864 70.0223 26.1864 67.0811Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M45.101 10.0156C45.101 11.3508 45.5298 12.4332 46.0587 12.4332C46.5876 12.4332 47.0164 11.3508 47.0164 10.0156C47.0164 8.68035 46.5876 7.59794 46.0587 7.59794C45.5298 7.59794 45.101 8.68035 45.101 10.0156Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M69.5454 51.4254C69.5454 53.0473 70.0287 54.362 70.6248 54.362C71.2209 54.362 71.7042 53.0473 71.7042 51.4254C71.7042 49.8035 71.2209 48.4887 70.6248 48.4887C70.0287 48.4887 69.5454 49.8035 69.5454 51.4254Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M46.4667 89.0531C46.4667 86.9884 47.5735 85.3145 48.9389 85.3145C50.3043 85.3145 51.4112 86.9884 51.4112 89.0531C51.4112 91.1178 50.3043 92.7917 48.9389 92.7917C47.5735 92.7917 46.4667 91.1178 46.4667 89.0531Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<g opacity="1" vectornator:layerName="Group 1">
<path d="M71.9301 2.72895L72.1438 42.7952" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="Line"/>
<path d="M74.8726 9.55748L74.9741 37.9559" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M68.9517 10.862L69.1636 33.377" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M77.734 14.2218L77.7338 31.0169" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M80.5345 17.6154L80.6004 27.1415" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M83.4547 19.3471L83.5056 25.1163" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M66.0744 16.0072L66.1969 27.2049" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M63.1389 19.6295L63.1389 23.9515" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M59.9308 20.8338L59.9286 22.275" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M86.3889 22.7835L86.3889 20.6748" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M54.3645 21.5153L54.3849 21.4545" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M57.0188 21.2022L57.0192 21.8713" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
</g>
<path d="M89.606 21.6051L89.5477 21.663" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M92.4918 21.5637L92.5573 21.6287" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065"/>
<path d="M20.9371 16.2938L37.1192 28.3844" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 2"/>
<path d="M46.8938 44.3956L37.1141 28.4567" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 3"/>
<path d="M56.7631 60.5458L47.9016 45.8129" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 4"/>
<path d="M66.7214 75.9126L56.4789 60.1879" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 5"/>
<path d="M80.4646 86.5356L66.6498 75.9581" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 6"/>
<path d="M94.7094 91.2591L79.7266 85.8144" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 7"/>
<path d="M49.7241 90.1821L29.3477 65.2976" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 8"/>
<path d="M29.7239 67.2344L8.38409 55.9858" fill="none" opacity="1" stroke="#000000" stroke-linecap="butt" stroke-linejoin="round" stroke-width="3" vectornator:layerName="Line 9"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.9 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Vectornator (http://vectornator.io/) -->
<svg
height="100%"
stroke-miterlimit="10"
style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;"
version="1.1"
viewBox="0 0 100 100"
width="100%"
xml:space="preserve"
id="svg15"
sodipodi:docname="fft.svg"
inkscape:version="1.3.2 (091e20e, 2023-11-25)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview15"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="2.36"
inkscape:cx="49.788136"
inkscape:cy="83.898305"
inkscape:window-width="2560"
inkscape:window-height="1387"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="svg15" />
<defs
id="defs1">
</defs>
<path
d="M 3.1496114,57.810339 3.2267361,43.025935"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path1" /><path
d="m 7.0835621,68.530302 0.071598,-14.088504 0.027777,-5.459745 0.021874,-4.305628 0.064681,-12.72607"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path2" /><path
d="M 10.894021,76.13376 11.215652,23.486682"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path3" /><path
d="M 14.91196,83.414821 14.94727,12.998978"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path4" /><path
d="m 98.155188,6.1894706 -28.446619,0.026744 -0.0011,88.4303434"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="butt"
stroke-linejoin="round"
stroke-width="2.84842"
id="path5" /><path
d="M 30.83646,75.933531 V 49.005156 22.530797"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path6" /><path
d="m 26.925611,84.143977 -0.0089,-42.248007 0.0088,-29.540946"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path7" /><path
d="M 23.051449,96.426218 22.894599,3.3593011"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path8" /><path
d="M 94.027336,6.1894706 72.884314,15.89572 84.777513,19.587673 73.452899,24.616611 73.262043,34.724195 95.873969,41.55152 c 0,0 0.296605,12.954338 0.329199,13.016997 0.03259,0.06301 -21.291505,10.552638 -21.291505,10.552638 l 0.35781,10.230941 11.657073,8.041022 -14.373967,8.881495"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="butt"
stroke-linejoin="round"
stroke-width="2.13631"
id="path9" /><path
d="m 18.769716,16.166345 0.218308,64.160326"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path10" /><path
d="m 51.228479,54.257321 -0.04165,-6.31877 3.214133,-0.0028 0.0036,-4.909815 9.540272,7.929005 -9.543893,8.264355 v -4.960573 z"
fill="#000000"
fill-rule="nonzero"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="0.356052"
id="path11" /><path
d="m 34.84759,35.169389 0.133925,30.497145"
fill="#000000"
fill-rule="nonzero"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path12" /><path
d="m 46.502707,39.56288 0.129652,21.710164"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path13" /><path
d="M 42.573678,56.378281 42.5773,45.866949"
fill="none"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path14" /><path
d="M 38.708751,61.028008 38.636682,41.217221"
fill="#000000"
fill-rule="nonzero"
opacity="1"
stroke="#000000"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2.84842"
id="path15" />
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with Vectornator (http://vectornator.io/) -->
<svg height="100.0px" stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1" viewBox="0 0 100 100" width="100.0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:vectornator="http://vectornator.io" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g id="Layer-1" vectornator:layerName="Layer 1">
<path d="M22.8661 93.1624L34.1008 66.5688L50.9529 27.2473L52.8805 24.0168L55.5326 20.8446L58.163 18.3205L60.4511 16.5804L63.0203 15.1625L66.8114 13.4931L73.0881 12.2799L78.9831 12.2314L80.8814 12.2523" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="3.87464" vectornator:layerName="Curve 1"/>
<g opacity="1" vectornator:layerName="Group 1">
<path d="M24.8316 30.5047L25.102 72.6218" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="Line"/>
<path d="M28.4549 37.6833L28.7829 67.5342" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M21.1978 39.0535L21.1965 62.722" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M32.0727 42.5863L32.2778 60.2402" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M35.7188 46.1531L35.8021 56.1668" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M39.4137 44.8153L39.7258 58.7443" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M17.5159 44.4622L17.484 56.2338" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M13.7081 48.2703L13.7081 52.8135" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M9.64888 49.5363L9.64609 51.0512" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M43.1263 54.4343L43.1263 47.8829" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M2.60583 50.2526L2.63165 50.1887" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M5.96432 49.9235L5.96483 50.6269" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
</g>
<g opacity="1" vectornator:layerName="Group 2">
<path d="M68.4016 31.2736L68.5538 74.1202" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="Line"/>
<path d="M71.9812 38.4086L72.3091 68.2595" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M64.724 39.7788L64.7228 63.4473" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M75.5989 43.3116L75.804 60.9655" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M79.245 46.8784L79.3284 56.8921" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M82.9888 49.5549L83.0043 52.419" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M90.1665 44.3658L90.2309 57.6081" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path 1"/>
<path d="M93.8777 49.5413L93.8995 52.4326" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path 2"/>
<path d="M97.3942 51.0314L97.3916 51.2155" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.36423" vectornator:layerName="path 3"/>
<path d="M61.0421 45.1875L61.0102 56.9591" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M57.2343 46.8472L57.2343 54.906" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M53.2003 44.8905L53.1723 58.3195" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M86.6526 55.5621L86.6526 46.4118" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M46.1063 53.487L46.1321 48.487" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
<path d="M49.3862 61.2263L49.3473 40.7476" fill="none" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.38065" vectornator:layerName="path"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -131,8 +131,11 @@ public class ClickWaveTask extends OfflineTask<ClickDetection> {
// setParentDataBlock(clickControl.getClickDataBlock());
addAffectedDataBlock(clickControl.getClickDataBlock());
rawDataSource = (PamRawDataBlock) clickDetector.getRawSourceDataBlock(clickDetector.getSampleRate());
daqStatusDataBlock = ((AcquisitionProcess) rawDataSource.getParentProcess()).getDaqStatusDataBlock();
rawDataSource = (PamRawDataBlock) clickDetector.getRawSourceDataBlock();
if (rawDataSource!=null) {
daqStatusDataBlock = ((AcquisitionProcess) rawDataSource.getParentProcess()).getDaqStatusDataBlock();
}
//TODO- Should not hard wire these but this is not going to be used very often.
filterParams = new FilterParams(FilterType.BUTTERWORTH, FilterBand.HIGHPASS, 250000, 5000, 4);
@ -155,6 +158,12 @@ public class ClickWaveTask extends OfflineTask<ClickDetection> {
public void prepareTask() {
Debug.out.println("Load data units from: daqStatusDataBlock: " + daqStatusDataBlock.getUnitsCount());
if (daqStatusDataBlock==null) {
if (rawDataSource!=null) {
daqStatusDataBlock = ((AcquisitionProcess) rawDataSource.getParentProcess()).getDaqStatusDataBlock();
}
}
filterMethod = FilterMethod.createFilterMethod(clickDetector.getSampleRate(), filterParams);
daqStatusDataBlock.loadViewerData(new OfflineDataLoadInfo(clickControl.getClickDataBlock().getFirstUnit().getTimeMilliseconds()-DEFAULTDAQUNITLOAD,

View File

@ -587,10 +587,10 @@ public class ClicksOffline {
offlineTaskGroup.addTask(new EchoDetectionTask(clickControl));
offlineTaskGroup.addTask(new ClickDelayTask(clickControl));
offlineTaskGroup.addTask(new ClickBearingTask(clickControl));
if (JamieDev.isEnabled()) {
//re import waveform data from raw wave files.
offlineTaskGroup.addTask(new ClickWaveTask(clickControl));
}
// if (JamieDev.isEnabled()) {
// //re import waveform data from raw wave files.
// offlineTaskGroup.addTask(new ClickWaveTask(clickControl));
// }
/*
* Add the click detector tasks first since these will need to operate

View File

@ -55,16 +55,19 @@ public class ModuleIconFactory {
// return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/click.png")));
return getSVGIcon("/Resources/modules/Click Detector Icon.svg", Color.BLACK, 2);
case CLICK_TRAIN:
return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/clicktrain.png")));
// return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/clicktrain.png")));
return getSVGIcon("/Resources/modules/clicktrain.svg",Color.BLACK, 2);
case DATABASE:
// return PamGlyphDude.createModuleGlyph(FontAwesomeIcon.DATABASE);
return PamGlyphDude.createModuleIcon("mdi2d-database");
case DATAMAP:
return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/dataMap.png")));
case FFT:
return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/fft.png")));
// return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/fft.png")));
return getSVGIcon("/Resources/modules/fft.svg",Color.BLACK, 2);
case FILTER:
return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/filters.png")));
// return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/filters.png")));
return getSVGIcon("/Resources/modules/filters.svg",Color.BLACK, 2);
case GPS:
// return PamGlyphDude.createModuleGlyph(MaterialIcon.GPS_FIXED);
return PamGlyphDude.createModuleIcon("mdi2c-crosshairs-gps");
@ -126,8 +129,8 @@ public class ModuleIconFactory {
PamSVGIcon iconMaker= new PamSVGIcon();
PamSVGIcon svgsprite = iconMaker.create(getClass().getResource(resourcePath).toURI().toURL(), colour, lineWidth);
svgsprite.getSpriteNode().setStyle("-fx-text-color: black");
svgsprite.getSpriteNode().setStyle("-fx-fill: black");
// svgsprite.getSpriteNode().setStyle("-fx-text-color: black");
// svgsprite.getSpriteNode().setStyle("-fx-fill: black");
svgsprite.setFitHeight(DataModelStyle.iconSize-10);
svgsprite.setFitWidth(DataModelStyle.iconSize-10);

View File

@ -208,17 +208,20 @@ public class PamSettingsMenuPane extends PamVBox {
PamButton about=new PamButton("About...");
styleButton(about);
PamButton tip=new PamButton("Tip of the day...");
styleButton(tip);
// PamButton tip=new PamButton("Tip of the day...");
// styleButton(tip);
PamButton website=new PamButton("Website");
styleButton(website);
PamButton contact=new PamButton("Contact and Support");
PamButton contact=new PamButton("Found a bug?");
styleButton(contact);
PamButton checkForUpdates=new PamButton("Check for updates");
styleButton(contact);
this.getChildren().addAll(settingsLabel,saveConfig,saveConfigAs, new Separator(), mediumToggleBox, generalSettings, settings, new Separator(),
storageManager, database, binaryStorage, new Separator(), help, about, tip, website, contact);
storageManager, database, binaryStorage, new Separator(), help, checkForUpdates, website, contact, about);
}

View File

@ -4,6 +4,7 @@ import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.Node;
import javafx.scene.paint.Color;
import javafx.scene.shape.FillRule;
import javafx.scene.shape.SVGPath;
import pamViewFX.fxNodes.utilsFX.PamUtilsFX;
@ -65,9 +66,9 @@ public class PamSVGIcon {
public PamSVGIcon create(URL path, Color color, double lineWidth) throws Exception {
// System.out.println("Create icon start");
// System.out.println("Create icon start");
String col = PamUtilsFX.toRGBCode(color);
// String col = PamUtilsFX.toRGBCode(color);
// System.out.println("Create icon getDocument()");
@ -87,14 +88,27 @@ public class PamSVGIcon {
for(int i=0; i<svgPaths.getLength(); i++) {
try {
SVGPath shape = new SVGPath();
shape.setFillRule(FillRule.NON_ZERO);
NamedNodeMap map = svgPaths.item(i).getAttributes();
// System.out.println("Attributes: " + map.getLength());
// for (int ii=0; ii<map.getLength(); ii++) {
// System.out.println(map.item(ii).getNodeName() + " " + map.item(ii).getFirstChild().getNodeValue());
// }
shape.setContent(map.getNamedItem("d").getTextContent());
if(map.getNamedItem("style") != null) {
shape.setStyle(convertStyle(map.getNamedItem("style").getTextContent()));
} else {
shape.setStyle("-fx-fill: "+col+"; -fx-stroke-width: " + lineWidth + ";-fx-stroke: "+col);
// shape.setStyle("-fx-fill: "+col+"-fx-stroke: "+col);
}
//get the fx style form the svg data.
String style = convertShapeStyle(map);
shape.setStyle(style);
// if(map.getNamedItem("style") != null) {
// shape.setStyle(convertStyle(map.getNamedItem("style").getTextContent()));
// } else {
// shape.setStyle("-fx-fill: red;" + "-fx-stroke-width: " + lineWidth + ";-fx-stroke: "+col);
//// shape.setStyle("-fx-fill: "+col+"-fx-stroke: "+col);
// }
shapes.add(shape);
} catch (Exception e) {
e.printStackTrace();
@ -108,11 +122,51 @@ public class PamSVGIcon {
String textStyle = getTextStyle(document);
// System.out.println("Create icon finsihed");
return new PamSVGIcon(shapesPaths, textStyle, margin, path);
}
/*
* Convert SVG properties to an fx css style.
*/
private String convertShapeStyle(NamedNodeMap map) {
//Example of attributes map in SVG.
// fill none
// opacity 1
// stroke #000000
// stroke-linecap round
// stroke-linejoin round
// stroke-width 2.0144
//"-fx-fill: red;" + "-fx-stroke-width: " + lineWidth + ";-fx-stroke: "+col
String style = "";
for (int ii=0; ii<map.getLength(); ii++) {
String col;
// System.out.println(map.item(ii).getNodeName() + " " + map.item(ii).getFirstChild().getNodeValue());
switch (map.item(ii).getNodeName()) {
case "fill":
col = map.item(ii).getFirstChild().getNodeValue();
style += "-fx-fill: " + col+";";
break;
case "stroke":
col = map.item(ii).getFirstChild().getNodeValue();
style += ("-fx-stroke: " + col+";");
break;
case "stroke-linecap":
style += "-fx-stroke-line-cap: "+map.item(ii).getFirstChild().getNodeValue()+";";
break;
case "stroke-width":
style += ("-fx-stroke-width: " + map.item(ii).getFirstChild().getNodeValue()+";");
break;
}
}
return style;
}
// /**
@ -156,7 +210,7 @@ public class PamSVGIcon {
DocumentBuilder builder = factory.newDocumentBuilder();
// System.out.println("DocumentBuilderFactory.parse();");
//this takes a very long time!
return builder.parse(path.toString());

View File

@ -1,13 +1,16 @@
package pamViewFX.fxNodes.flipPane;
import javafx.application.Platform;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Orientation;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.Label;
import javafx.scene.control.Labeled;
import javafx.scene.control.MenuItem;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
@ -34,13 +37,24 @@ import pamViewFX.fxNodes.utilsFX.TextUtilsFX;
*
*/
public class PamFlipPane extends FlipPane {
public static final double FLIP_TIME =250; //milliseconds - the default is 700ms whihc is way too long.
/**
* The back is pressed- equivelent to an OK.
*/
private static final int OK_BACK_BUTTON = 0;
/**
* The back button is cancelled
*/
private static final int CANCEL_BACK_BUTTON = 0;
private PamBorderPane advPane;
private PamBorderPane frontPane;
private PamButton backButton;
@ -59,15 +73,20 @@ public class PamFlipPane extends FlipPane {
* then editable to change the name of a parameter.
*/
private Label postLabel;
/**
* Property for the response to the back button. The response can be OK_BACK_BUTTON or CANCEL_BACK_BUTTON.
*/
private SimpleIntegerProperty backButtonResponse = new SimpleIntegerProperty();
public PamFlipPane() {
super();
this.advPane = createAdvSettingsPane();
this.getFront().getChildren().add(frontPane = new PamBorderPane());
// this.getFront().setStyle("-fx-background-color: grey;");
// this.getBack().setStyle("-fx-background-color: grey;");
// this.getFront().setStyle("-fx-background-color: grey;");
// this.getBack().setStyle("-fx-background-color: grey;");
this.getBack().getChildren().add(advPane);
this.setFlipTime(FLIP_TIME);
@ -81,7 +100,7 @@ public class PamFlipPane extends FlipPane {
this.getBack().getChildren().add(advPane);
this.setFlipTime(FLIP_TIME);
}
/**
* Get the front pane.
* @return the front pane.
@ -89,7 +108,7 @@ public class PamFlipPane extends FlipPane {
public PamBorderPane getFrontPane() {
return frontPane;
}
/**
* Get the back pane.
* @return the back pane.
@ -105,16 +124,16 @@ public class PamFlipPane extends FlipPane {
public PamBorderPane getAdvPane() {
return advPane;
}
/**
* Set the advanced pane content.
* @param - the content to set.
*/
public void setAdvPaneContent(Node content) {
advPane.setCenter(content);
advPane.setCenter(content);
}
/**
* Set the front pane content.
* @param - the content to set.
@ -128,25 +147,41 @@ public class PamFlipPane extends FlipPane {
* Create the advanced settings pane which can be accessed by DAQ panes if needed.
*/
private PamBorderPane createAdvSettingsPane() {
backButton = new PamButton();
backButton.setGraphic(PamGlyphDude.createPamIcon("mdi2c-chevron-left", Color.WHITE, PamGuiManagerFX.iconSize));
// backButton.setStyle("-fx-background-color: -color-base-6");
// backButton.setStyle("-fx-background-color: -color-base-6");
//backButton.setStyle("-fx-padding: 0,0,0,0");
backButton.setOnAction((action)->{
// System.out.println("FLIP BACK TO FRONT");
this.flipToFront();
});
//make the back button blue so users can easily see the button.
backButton.setStyle("-fx-background-radius: 0 5 5 0; -fx-border-radius: 0 5 5 0; -fx-background-color: -color-accent-6");
backButton.setOnAction((action)->{
// System.out.println("FLIP BACK TO FRONT");
this.backButtonResponse.setValue(OK_BACK_BUTTON);
this.flipToFront();
});
//Allow the user to cancel instead of pressing back button to confirm.
ContextMenu contextMenu = new ContextMenu();
//Creating the menu Items for the context menu
MenuItem item1 = new MenuItem("Cancel");
item1.setStyle("-fx-background-color: red");
contextMenu.setStyle("-fx-background-color: red");
item1.setOnAction((action)->{
// System.out.println("FLIP BACK TO FRONT");
this.backButtonResponse.setValue(CANCEL_BACK_BUTTON);
this.flipToFront();
});
contextMenu.getItems().addAll(item1);
backButton.setContextMenu(contextMenu);
//create a title that can be set.
//backButton.setPrefWidth(150);
PamBorderPane advPane = new PamBorderPane();
//advPane.setPadding(new Insets(5,5,5,5));
// holds the title of the advanced pane. This consists of a label for a graphic,
// an editable text field and a label after the editable settings field
PamHBox titleHolder = new PamHBox();
@ -158,27 +193,27 @@ public class PamFlipPane extends FlipPane {
postLabel.setAlignment(Pos.CENTER_LEFT);
advLabel.setAlignment(Pos.CENTER);
// advLabel.prefColumnCountProperty().bind(advLabel.textProperty().length().subtract(3));
// advLabel.prefColumnCountProperty().bind(advLabel.textProperty().length().subtract(3));
// Set Max and Min Width to PREF_SIZE so that the TextField is always PREF
advLabel.setMinWidth(Region.USE_PREF_SIZE);
advLabel.setMaxWidth(Region.USE_PREF_SIZE);
//pretty complicated to make sure the text field is the same size as the text that is being typed.
advLabel.textProperty().addListener((ov, prevText, currText) -> {
// Do this in a Platform.runLater because of Textfield has no padding at first time and so on
Platform.runLater(() -> {
Text text = new Text(currText);
text.setFont(advLabel.getFont()); // Set the same font, so the size is the same
double width = text.getLayoutBounds().getWidth() // This big is the Text in the TextField
+ advLabel.getPadding().getLeft() + advLabel.getPadding().getRight() // Add the padding of the TextField
+ 2d; // Add some spacing
advLabel.setPrefWidth(width); // Set the width
advLabel.positionCaret(advLabel.getCaretPosition()); // If you remove this line, it flashes a little bit
});
// Do this in a Platform.runLater because of Textfield has no padding at first time and so on
Platform.runLater(() -> {
Text text = new Text(currText);
text.setFont(advLabel.getFont()); // Set the same font, so the size is the same
double width = text.getLayoutBounds().getWidth() // This big is the Text in the TextField
+ advLabel.getPadding().getLeft() + advLabel.getPadding().getRight() // Add the padding of the TextField
+ 2d; // Add some spacing
advLabel.setPrefWidth(width); // Set the width
advLabel.positionCaret(advLabel.getCaretPosition()); // If you remove this line, it flashes a little bit
});
});
advLabel.setId("label-title2");
advLabel.setStyle("-fx-background-color: transparent");
titleHolder.setMaxWidth(Double.MAX_VALUE); //need to make sure label is in center.
//holds the back button and the title pane.
@ -190,31 +225,31 @@ public class PamFlipPane extends FlipPane {
advLabel.setAlignment(Pos.CENTER);
advLabel.setMaxWidth(Double.MAX_VALUE); //need to make sure label is in center.
// PamGuiManagerFX.titleFont2style(advLabel);
// PamGuiManagerFX.titleFont2style(advLabel);
advLabel.setAlignment(Pos.CENTER);
HBox.setHgrow(titleHolder, Priority.ALWAYS);
advPane.setTop(buttonHolder);
return advPane;
}
public TextField getAdvLabel() {
return advLabel;
}
// public void setAdvLabel(Label advLabel) {
// this.advLabel = advLabel;
// }
// public void setAdvLabel(Label advLabel) {
// this.advLabel = advLabel;
// }
public PamButton getBackButton() {
return backButton;
}
/**
* Get the label located before the editable label in the title
* @return the label before the editable label
@ -222,7 +257,7 @@ public class PamFlipPane extends FlipPane {
public Label getPreAdvLabel() {
return preLabel;
}
/**
* Get the label located after the editable label in the title
* @return the label after the editable label
@ -240,7 +275,7 @@ public class PamFlipPane extends FlipPane {
public void setAdvLabelEditable(boolean b) {
this.advLabel.setEditable(b);
}

View File

@ -56,16 +56,17 @@ public class LatLongPane extends SettingsPane<LatLong>{
public LatLongPane(String title) {
super(null);
mainPane = new PamVBox();
mainPane.setSpacing(5);
mainPane.setAlignment(Pos.CENTER);
Label titleLabel = new Label(title);
titleLabel.maxWidth(Double.MAX_VALUE);
titleLabel.setTextAlignment(TextAlignment.LEFT);
titleLabel.setAlignment(Pos.CENTER_LEFT);
PamGuiManagerFX.titleFont2style(titleLabel);
mainPane.getChildren().add(titleLabel);
@ -109,7 +110,7 @@ public class LatLongPane extends SettingsPane<LatLong>{
cent.getChildren().add(latStrip = new LatLongStrip(true));
cent.getChildren().add(longStrip = new LatLongStrip(false));
//bit of a hack that makes sure controls are aligned for the latitude and longitude.
latStrip.getTitleLabel().prefWidthProperty().bind(longStrip.getTitleLabel().widthProperty());
@ -123,46 +124,24 @@ public class LatLongPane extends SettingsPane<LatLong>{
* @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
*/
public void actionPerformed(javafx.event.ActionEvent action) {
if (action.getSource() == decimalMinutes) {
LatLong.setFormatStyle(LatLong.FORMAT_DECIMALMINUTES);
// if (latStrip != null) {
// latStrip.setDecimalMinutes(true);
// longStrip.setDecimalMinutes(true);
// }
latStrip.showControls(LatLong.FORMAT_DECIMALMINUTES);
longStrip.showControls(LatLong.FORMAT_DECIMALMINUTES);
}
else if (action.getSource() == minutesSeconds){
LatLong.setFormatStyle(LatLong.FORMAT_MINUTESSECONDS);
// if (latStrip != null) {
// latStrip.setDecimalMinutes(false);
// longStrip.setDecimalMinutes(false);
//// latStrip.showControls();
//// longStrip.showControls();
// }
latStrip.showControls(LatLong.FORMAT_MINUTESSECONDS);
longStrip.showControls(LatLong.FORMAT_MINUTESSECONDS);
}
else if (action.getSource() == decimal){
LatLong.setFormatStyle(LatLong.FORMAT_DECIMAL);
latStrip.showControls(LatLong.FORMAT_DECIMAL);
longStrip.showControls(LatLong.FORMAT_DECIMAL);
}
int format = getSelectedLatLongFormat();
LatLong.setFormatStyle(format);
latStrip.showControls(format);
longStrip.showControls(format);
}
private void showLatLong() {
decimalMinutes .setSelected(LatLong.getFormatStyle() == LatLong.FORMAT_DECIMALMINUTES);
minutesSeconds .setSelected(LatLong.getFormatStyle() == LatLong.FORMAT_MINUTESSECONDS);
decimal .setSelected(LatLong.getFormatStyle() == LatLong.FORMAT_DECIMAL);
latStrip .showControls(LatLong.getFormatStyle() );
longStrip .showControls(LatLong.getFormatStyle() );
latStrip .showControls(LatLong.getFormatStyle());
longStrip .showControls(LatLong.getFormatStyle());
latStrip .setValue(latLong.getLatitude());
longStrip .setValue(latLong.getLongitude());
}
@ -174,21 +153,11 @@ public class LatLongPane extends SettingsPane<LatLong>{
*/
@Override
public LatLong getParams(LatLong currentParams) {
Toggle selectedButton = this.segmentedButton.getToggleGroup().getSelectedToggle();
if (selectedButton == decimalMinutes) {
LatLong.setFormatStyle(LatLong.FORMAT_DECIMALMINUTES);
}
else if (selectedButton == minutesSeconds){
LatLong.setFormatStyle(LatLong.FORMAT_MINUTESSECONDS);
}
else if (selectedButton == decimal){
LatLong.setFormatStyle(LatLong.FORMAT_DECIMAL);
}
int format = getSelectedLatLongFormat();
LatLong.setFormatStyle(format);
latLong = new LatLong(latStrip.getValue(), longStrip.getValue());
if (Double.isNaN(latLong.getLatitude()) || Double.isNaN(latLong.getLongitude())) {
return null;
@ -196,6 +165,26 @@ public class LatLongPane extends SettingsPane<LatLong>{
return latLong;
}
/**
* Get the selected format for showing latitude and longitude values.
* @return the selected format flag or -1 if no format is selected.
*/
private int getSelectedLatLongFormat() {
Toggle selectedButton = this.segmentedButton.getToggleGroup().getSelectedToggle();
if (selectedButton == decimalMinutes) {
return LatLong.FORMAT_DECIMALMINUTES;
}
else if (selectedButton == minutesSeconds){
return LatLong.FORMAT_MINUTESSECONDS;
}
else if (selectedButton == decimal){
return LatLong.FORMAT_DECIMAL;
}
return -1;
}
@Override
public void setParams(LatLong input) {
this.latLong=input;

View File

@ -12,7 +12,7 @@ import pamViewFX.fxNodes.PamHBox;
/**
* A pane which shows a latitude or longitude. Allows users to enter data as decimal or minutes/seconds.
* (copied ot FX from Doug Gillespie's LatLongDialogStrip)
* (copied to FX from Doug Gillespie's LatLongDialogStrip)
* @author Jamie Macaulay
*
*/
@ -39,6 +39,7 @@ public class LatLongStrip extends PamBorderPane {
* The format type e.g. LatLong.FORMAT_DECIMALMINUTES.
*/
private int formatType = LatLong.FORMAT_DECIMALMINUTES;
private Label titleLabel;
@ -152,7 +153,7 @@ public class LatLongStrip extends PamBorderPane {
this.setCenter(holder);
this.setBottom(formattedText);
showControls(formatType);
showControls(formatType, true);
}
private void newTypedValues(KeyEvent e) {
@ -170,10 +171,25 @@ public class LatLongStrip extends PamBorderPane {
// and say the formated version
sayFormattedValue(v);
}
/**
* Change the current controls for to show to show the current format of Latitude or Longitude.
* @param formatStyle - the style of Latitude or longitude e.g. LatLong.FORMAT_DECIMALMINUTES;
*/
public void showControls(int formatStyle) {
if (formatType==formatStyle) {
showControls(formatStyle, false);
}
/**
* Change the current controls for to show to show the current format of Latitude or Longitude.
* @param force - force a reset of controls even if the format style is the same as the current style.
* @param formatStyle - the style of Latitude or longitude e.g. LatLong.FORMAT_DECIMALMINUTES;
*/
private void showControls(int formatStyle, boolean force) {
if (formatType==formatStyle && !force) {
return;
}
@ -223,7 +239,7 @@ public class LatLongStrip extends PamBorderPane {
public void setValue(double value, boolean hiddenOnly) {
System.out.println("Set value: " + value);
// System.out.println("Set value: " + value);
if (value >= 0) {
nsew.getSelectionModel().select(0);
}