Updating localisation module.

This commit is contained in:
Jamie Mac 2023-07-26 12:22:37 +01:00
parent 31d0a8dc13
commit f55a6c030e
18 changed files with 727 additions and 50 deletions

30
.gitignore vendored
View File

@ -41,3 +41,33 @@ settings.xml
.classpath .classpath
.classpath .classpath
.classpath .classpath
.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
.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.location
.metadata/.lock

View File

@ -363,7 +363,7 @@
<dependency> <dependency>
<groupId>io.github.macster110</groupId> <groupId>io.github.macster110</groupId>
<artifactId>jdl4pam</artifactId> <artifactId>jdl4pam</artifactId>
<version>0.0.96</version> <version>0.0.97</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/gov.nist.math/jama --> <!-- https://mvnrepository.com/artifact/gov.nist.math/jama -->

View File

@ -426,7 +426,7 @@ public class Hydrophone implements Serializable, Cloneable, ManagedParameters {
this.symbol = symbol; this.symbol = symbol;
} }
protected int getStreamerId() { public int getStreamerId() {
return streamerId; return streamerId;
} }

View File

@ -5,19 +5,30 @@ import PamController.SettingsPane;
import javafx.geometry.Pos; import javafx.geometry.Pos;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.geometry.Insets;
import javafx.scene.layout.StackPane;
import javafx.scene.control.Button;
import pamViewFX.PamGuiManagerFX; import pamViewFX.PamGuiManagerFX;
import pamViewFX.fxGlyphs.PamGlyphDude; import pamViewFX.fxGlyphs.PamGlyphDude;
import pamViewFX.fxNodes.PamBorderPane;
import pamViewFX.fxNodes.PamButton; import pamViewFX.fxNodes.PamButton;
import pamViewFX.fxNodes.PamVBox; import pamViewFX.fxNodes.PamVBox;
import pamViewFX.fxNodes.PamBorderPane;
import pamViewFX.fxNodes.flipPane.PamFlipPane; import pamViewFX.fxNodes.flipPane.PamFlipPane;
import pamViewFX.fxNodes.flipPane.FlipPane;
import pamViewFX.fxNodes.PamHBox; import pamViewFX.fxNodes.PamHBox;
/** /**
* The main settings pane for settings up a hydrophone array. * The main settings pane for settings up a hydrophone array.
* *
* @author Jamie Macaulay * @author Jamie Macaulay
* @param <FlipPane>
* *
*/ */
public class ArraySettingsPane extends SettingsPane<PamArray >{ public class ArraySettingsPane extends SettingsPane<PamArray >{
@ -26,15 +37,45 @@ public class ArraySettingsPane extends SettingsPane<PamArray >{
private PamFlipPane mainPane; private PamFlipPane mainPane;
private HydrophonesPane hydrophonePane; private HydrophonesPane hydrophonePane;
private Pane holder;
public ArraySettingsPane() { public ArraySettingsPane() {
super(null); super(null);
mainPane = new PamFlipPane(); mainPane = new PamFlipPane();
mainPane.getFront().getChildren().add(createArrayPane()); mainPane.setFrontContent(createArrayPane());
mainPane.getAdvPane().setCenter(new Label("Advanced Settings")); mainPane.getAdvPane().setCenter(new Label("Advanced Settings"));
// //mainPane.getFront().setStyle("-fx-background-color: grey;");
// mainPane.setStyle("-fx-background-color: red;");
//
// FlipPane aflipPane = new FlipPane();
// aflipPane.setStyle("-fx-background-color: red;");
//
// PamHBox stackPane = new PamHBox();
// stackPane.setStyle("-fx-background-color: red;");
//
// Button button = new Button();
// button.setOnAction((action)->{
// System.out.println(" 1 " + stackPane.getPadding());
// System.out.println(" 2 " +PamBorderPane.getMargin(stackPane));
// System.out.println(" 3 " + holder.getPadding());
// });
//
// stackPane.getChildren().add(button);
//
//
// mainPane.setPadding(new Insets(0,0,0,0));
holder = new StackPane();
holder.getChildren().add(mainPane);
holder.setStyle("-fx-padding: 0,0,0,0");
} }
/** /**
@ -65,6 +106,7 @@ public class ArraySettingsPane extends SettingsPane<PamArray >{
advancedPane.getChildren().addAll(new Label("Advanced"), advancedButton); advancedPane.getChildren().addAll(new Label("Advanced"), advancedButton);
PamVBox vBox = new PamVBox(); PamVBox vBox = new PamVBox();
vBox.setSpacing(5); vBox.setSpacing(5);
vBox.getChildren().addAll(arrayLabel, basicArrayPane, hydrophoneLabel, vBox.getChildren().addAll(arrayLabel, basicArrayPane, hydrophoneLabel,
hydrophonePane, advancedPane); hydrophonePane, advancedPane);
@ -92,7 +134,8 @@ public class ArraySettingsPane extends SettingsPane<PamArray >{
@Override @Override
public Node getContentNode() { public Node getContentNode() {
return mainPane;
return holder;
} }
@Override @Override

View File

@ -0,0 +1,42 @@
package Array.layoutFX;
/**
* Default hydrophone parameters.
*
* @author Jamie Macaulay
*
*/
public enum DefaultHydrophone {
SoundTrap600HF("SoundTrap 600 HF", -176., 0), SoundTrap300HF("SoundTrap 300 HF", -176., 0), HydroMoth_1_0_0("HydroMoth 1.0.0", -180., 0);
/**
* The name of the hydrophones.
*/
private String name;
/**
* The sensitivity of the hydrophone in dB re 1V/uPa.
*/
private double sens;
/**
* The gain in dB.
*/
private double gain;
/**
* The name of the hydrophone.
* @param name - the name of the hydrophone.
* @param sens - the sensitivity of the hydrophone.
* @param gain - the gain of the hydrophone.
*/
DefaultHydrophone(String name, double sens, double gain) {
this.name = name;
this.sens = sens;
this.gain = gain;
}
}

View File

@ -4,16 +4,36 @@ import Array.Hydrophone;
import PamController.SettingsPane; import PamController.SettingsPane;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import pamViewFX.fxNodes.PamBorderPane; import Array.PamArray;
import PamController.PamController;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Labeled;
import javafx.scene.control.TextField;
import javafx.scene.layout.Pane;
import pamViewFX.PamGuiManagerFX;
import pamViewFX.fxNodes.PamVBox;
import pamViewFX.fxNodes.PamGridPane;
import pamViewFX.validator.PamValidator;
/**
* The settings pane for a single hydrophones.
*
*
* @author Jamie Macaulay
*
*/
public class HydrophoneSettingsPane extends SettingsPane<Hydrophone> { public class HydrophoneSettingsPane extends SettingsPane<Hydrophone> {
PamBorderPane mainPane; /**
*
public HydrophoneSettingsPane() { * Check inputs in real time
super(null); */
} PamValidator validator = new PamValidator();
@Override @Override
public Hydrophone getParams(Hydrophone currParams) { public Hydrophone getParams(Hydrophone currParams) {
@ -21,22 +41,15 @@ public class HydrophoneSettingsPane extends SettingsPane<Hydrophone> {
return null; return null;
} }
@Override
public void setParams(Hydrophone input) {
// TODO Auto-generated method stub
}
@Override @Override
public String getName() { public String getName() {
// TODO Auto-generated method stub return "Hydrophone Settings";
return null;
} }
@Override @Override
public Node getContentNode() { public Node getContentNode() {
// TODO Auto-generated method stub return mainPane;
return new Label("Hello Hydrophone");
} }
@Override @Override
@ -44,5 +57,334 @@ public class HydrophoneSettingsPane extends SettingsPane<Hydrophone> {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
private TextField iD;
private TextField yPos;
private TextField xPos;
private TextField zPos;
private TextField yPosErr;
private TextField xPosErr;
private TextField zPosErr;
private TextField hSens;
private TextField preampGain;
private ComboBox<String> streamers;
private ChoiceBox<DefaultHydrophone> defaultArrays;
private TextField nameField;
private PamArray currentArray;
///Labels which might change name if in air or water (i.e. hydrophone or microphone).
private Labeled depthLabel;
private Labeled depthLabel2;
private Label recieverIDLabel;
private Label recieverTypeLabel;
private Label recieverSensLabel;
private Label dBSensLabel;
/**
* The main holder pane.
*/
private PamVBox mainPane;
private InterpSettingsPane interpPane;
private ComboBox<DefaultHydrophone> defaultHydro;
//create the dialog
public HydrophoneSettingsPane() {
super(null);
mainPane = new PamVBox();
mainPane.setSpacing(5);
recieverIDLabel = new Label("General");
PamGuiManagerFX.titleFont2style(recieverIDLabel);
Label coOrdLabel = new Label("Coordinates");
PamGuiManagerFX.titleFont2style(coOrdLabel);
Label interpLabel = new Label("Interpolation");
PamGuiManagerFX.titleFont2style(interpLabel);
interpPane = new InterpSettingsPane();
mainPane.getChildren().addAll(recieverIDLabel, createGeneralPane(), coOrdLabel, createPositionPane(), interpLabel, interpPane);
}
//
// public Boolean getParams(){
// array.nameProperty().setValue(nameField.getText());
// array.hArrayTypeProperty().setValue(arrayType.getValue());
// try {
// array.xPosProperty().setValue(Double.valueOf(xPos.getText()));
// array.yPosProperty().setValue(Double.valueOf(yPos.getText()));
// array.zPosProperty().setValue(Double.valueOf(zPos.getText()));
// }
// catch (Exception e){
// System.err.println("Invalid field in Array Dialog");
// return false;
// }
// return true;
// }
//
// public void setParams(Hydrophone hydrophone){
//
// iD.setText(String.format("%d", hydrophone.getID()));
// streamers.getItems().clear();
//
// //set thre text values for the recieevrs.
//// setRecieverLabelText();
// if (currentArray != null) {
// Streamer s;
// for (int i = 0; i < currentArray.getNumStreamers(); i++) {
// s = currentArray.getStreamer(i);
// streamers.getItems().add(String.format("Streamer %d, x=%3.1f", i, s.getX()));
// }
// }
// if (hydrophone.getStreamerId() < currentArray.getNumStreamers()) {
// streamers.getSelectionModel().select(hydrophone.getStreamerId());
// }
// hSens.setText(String.format("%.1f", hydrophone.getSensitivity()-PamController.getInstance().getGlobalMediumManager().getdBSensOffset()));
// preampGain.setText(String.format("%.1f", hydrophone.getPreampGain()));
// // bandwidth0.setText(String.format("%.1f", hydrophone.getBandwidth()[0]));
// // bandwidth1.setText(String.format("%.1f", hydrophone.getBandwidth()[1]));
//
//
//// this.array=array;
//// nameField.setText(hydrophone.getType());
// parentArrayComboBox.setValue(array.get);
//
// //attachmentComboBox.setItems(ArrayModelControl.getInstance().getArrays());
// parentArrayComboBox.setValue(array.parentHArrayProperty().getValue());
//
// xPos.setText(Double.toString(hydrophone.);
// yPos.setText(Double.toString(array.yPosProperty().get()));
// zPos.setText(Double.toString(array.zPosProperty().get()));
//
// createArrayPane(array);
//
// }
/**
* Set the receiver labels depending on whether air or water is being used.
*/
private void setGeneralInfoLabelText() {
String recieverString = PamController.getInstance().getGlobalMediumManager().getRecieverString();
String dbSens = PamController.getInstance().getGlobalMediumManager().getdBSensString();
recieverIDLabel.setText(recieverString+ " ID Info");
recieverTypeLabel.setText(recieverString + " type ");
recieverSensLabel.setText(recieverString + " sensitivity ");
dBSensLabel.setText(dbSens);
}
/**
* Set the receiver labels depending on whether air or water is being used.
*/
private void setCoordsText() {
String recieverDepthString = PamController.getInstance().getGlobalMediumManager().getZString();
depthLabel.setText(recieverDepthString + " ");
switch (PamController.getInstance().getGlobalMediumManager().getCurrentMedium()) {
case Air:
depthLabel2.setText(" m (height above streamer)");
break;
case Water:
depthLabel2.setText(" m (depth below streamer)");
break;
}
}
/**
* Create the pane to allow users to change the position of hydrophones
*/
private Pane createGeneralPane() {
PamGridPane mainControls=new PamGridPane();
mainControls.setHgap(5);
mainControls.setVgap(5);
int gridy = 0;
Label parentArrayLabel = new Label("Parent Array");
parentArrayLabel.setAlignment(Pos.CENTER_RIGHT);
mainControls.add(parentArrayLabel, 0, gridy);
streamers = new ComboBox<String>();
mainControls.add(streamers, 1, gridy);
gridy++;
mainControls.add(recieverTypeLabel = new Label(""), 0, gridy);
recieverTypeLabel.setAlignment(Pos.CENTER_RIGHT);
defaultHydro = new ComboBox<DefaultHydrophone>();
mainControls.add(defaultHydro, 1, gridy);
gridy++;
mainControls.add(recieverSensLabel = new Label(""), 0, gridy);
recieverSensLabel.setAlignment(Pos.CENTER_RIGHT);
hSens = new TextField();
mainControls.add(hSens, 1, gridy);
mainControls.add(dBSensLabel = new Label(""), 2, gridy);
gridy++;
Label preAmpLabel = new Label("Preamplifier gain");
mainControls.add(preAmpLabel, 0, gridy);
preAmpLabel.setAlignment(Pos.CENTER_RIGHT);
preampGain = new TextField();
mainControls.add(preampGain, 1, gridy);
mainControls.add(new Label("dB"), 2, gridy);
setGeneralInfoLabelText();
return mainControls;
}
/**
* Create the pane to allow users to change the position of hydrophones
*/
private Pane createPositionPane( ){
double sectionPadding=15;
PamVBox mainControls=new PamVBox();
mainControls.setSpacing(5);
Insets h;
Label nameLabel=new Label("Array Name");
nameLabel.setPadding(new Insets(5,0,0,0));
nameField=new TextField();
//parent array.
Label parentArrayLabel=new Label("Parent Streamer");
parentArrayLabel.setPadding(new Insets(sectionPadding,0,0,0));
PamGridPane positionPane = new PamGridPane();
positionPane.setHgap(5);
positionPane.setVgap(5);
double maxWidth =10;
xPos=new TextField();
xPos.setMaxWidth(maxWidth);
addTextValidator(xPos, "x position");
yPos=new TextField();
yPos.setMaxWidth(maxWidth);
addTextValidator(yPos, "y position");
zPos=new TextField();
zPos.setMaxWidth(maxWidth);
addTextValidator(zPos, "z position");
depthLabel = new Label("Depth");
depthLabel.setAlignment(Pos.CENTER_RIGHT);
xPosErr=new TextField();
xPosErr.setMaxWidth(50);
addTextValidator(xPosErr, "x error");
yPosErr=new TextField();
yPosErr.setMaxWidth(50);
addTextValidator(yPosErr, "y error");
zPosErr=new TextField();
zPosErr.setMaxWidth(50);
depthLabel2 = new Label(""); //changes with air or water mode.
addTextValidator(zPosErr, "z error");
int y=0;
Label xLabel = new Label("x");
xLabel.setAlignment(Pos.CENTER_RIGHT);
positionPane.add(xLabel, 0, y);
positionPane.add(xPos, 1, y);
positionPane.add(new Label("\u00B1"), 2, y);
positionPane.add(xPosErr, 3, y);
positionPane.add(new Label("m (right of streamer)"), 4, y);
y++;
Label yLabel = new Label("y");
yLabel.setAlignment(Pos.CENTER_RIGHT);
positionPane.add(yLabel, 0, y);
positionPane.add(yPos, 1, y);
positionPane.add(new Label("\u00B1"), 2, y);
positionPane.add(yPosErr, 3, y);
positionPane.add(new Label("m (ahead of streamer)"), 4, y);
y++;
positionPane.add(depthLabel, 0, y);
positionPane.add(zPos, 1, y);
positionPane.add(new Label("\u00B1"), 2, y);
positionPane.add(zPosErr, 3, y);
positionPane.add(depthLabel2, 4, y);
// ColumnConstraints col1 = new ColumnConstraints();
// col1.setHgrow(Priority.ALWAYS);
// positionPane.getColumnConstraints().add(col1);
// Label positionLabel = new Label("Coordinates");
// PamGuiManagerFX.titleFont2style(positionLabel);
mainControls.getChildren().addAll(positionPane);
setCoordsText();
return mainControls;
}
/**
* Creates a text filed and adds a validator to check that the input is OK.
* @return
*/
private void addTextValidator(TextField userTextField, String description) {
userTextField.setPrefColumnCount(8);
validator.createCheck()
.dependsOn(description, userTextField.textProperty())
.withMethod(c -> {
String posVal = c.get(description);
try {
if (Double.valueOf(posVal)==null) {
c.error("The input for " + description + " is invalid");
}
}
catch (Exception e) {
c.error("The input for " + description + " is invalid");
}
})
.decorates(userTextField)
.immediate();
;
}
@Override
public void setParams(Hydrophone input) {
// TODO Auto-generated method stub
}
} }

View File

@ -1,12 +1,11 @@
package Array.layoutFX; package Array.layoutFX;
import Array.Hydrophone; import Array.Hydrophone;
import Array.Streamer;
import Array.layoutFX.BasicArrayPane.BasicArrayTable;
import javafx.collections.FXCollections; import javafx.collections.FXCollections;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
import javafx.geometry.Insets;
import javafx.scene.control.Dialog; import javafx.scene.control.Dialog;
import javafx.scene.control.Label; import javafx.scene.layout.Pane;
import javafx.scene.control.TableColumn; import javafx.scene.control.TableColumn;
import pamViewFX.fxNodes.PamBorderPane; import pamViewFX.fxNodes.PamBorderPane;
import pamViewFX.fxNodes.flipPane.PamFlipPane; import pamViewFX.fxNodes.flipPane.PamFlipPane;
@ -50,11 +49,17 @@ public class HydrophonesPane extends PamBorderPane {
tableArrayPane = new HydrophoneTable(hydrophoneList); tableArrayPane = new HydrophoneTable(hydrophoneList);
tableArrayPane.setPadding(new Insets(5,5,5,5));
pamFlipePane = new PamFlipPane(); pamFlipePane = new PamFlipPane();
pamFlipePane.getAdvLabel().setText("Hydrophone Settings"); pamFlipePane.getAdvLabel().setText("Hydrophone Settings");
((Pane) hydrophonePane.getContentNode()).setPadding(new Insets(5,5,5,5));
pamFlipePane.setAdvPaneContent(hydrophonePane.getContentNode()); pamFlipePane.setAdvPaneContent(hydrophonePane.getContentNode());
pamFlipePane.setFrontContent(tableArrayPane); pamFlipePane.setFrontContent(tableArrayPane);
//this.setStyle("-fx-background-color: grey;");
this.setCenter(pamFlipePane); this.setCenter(pamFlipePane);
} }

View File

@ -0,0 +1,108 @@
package Array.layoutFX;
import Array.PamArray;
import pamViewFX.fxNodes.PamBorderPane;
import pamViewFX.fxNodes.PamGridPane;
import pamViewFX.fxNodes.pamDialogFX.PamDialogFX;
import javafx.scene.control.RadioButton;
import javafx.scene.control.Tooltip;
import javafx.scene.control.ToggleGroup;
/**
* Dialog component used by both the streamer and the hydrophone dialogs
* @author Doug Gillespie
*
*/
public class InterpSettingsPane extends PamBorderPane {
private RadioButton useLatest, usePrevious, useInterpolate;
private int allowedValues = 0xFF; // bitmap of banned values !
public InterpSettingsPane() {
PamGridPane gridPane = new PamGridPane();
gridPane.setVgap(5);
int gridy=0;
gridPane.add(useLatest = new RadioButton("Use only the latest value"), 0, gridy);
gridy++;
gridPane.add(useInterpolate = new RadioButton("Interpolate between values"), 0, gridy);
gridy++;
gridPane.add(usePrevious = new RadioButton("Use the location for the time preceeding each data unit"), 0, gridy);
useLatest.setTooltip(new Tooltip(
"Select this option if you have a simple static array in a single location for the entire data set"));
useInterpolate.setTooltip(new Tooltip(
"Select this option if you are storing multiple locations for slowely moving (i.e. not quite fixed) devices"));
usePrevious.setTooltip(new Tooltip(
"Select this option if you have devices which are periodically moved from one spot to another"));
ToggleGroup group = new ToggleGroup();
useLatest.setToggleGroup(group);
useInterpolate.setToggleGroup(group);
usePrevious.setToggleGroup(group);
this.setCenter(gridPane);
}
public void setSelection(int option) {
useLatest.setSelected(option == PamArray.ORIGIN_USE_LATEST);
useInterpolate.setSelected(option == PamArray.ORIGIN_INTERPOLATE);
usePrevious.setSelected(option == PamArray.ORIGIN_USE_PRECEEDING);
}
public int getSelection() {
int sel = getSelectedButton();
if (((1<<sel) & allowedValues) == 0) {
PamDialogFX.showWarning("The selected interpolation is not available with the selected reference position");
return -1;
}
else {
return sel;
}
}
/**
* @return the allowedValues
*/
protected int getAllowedValues() {
return allowedValues;
}
/**
* @param allowedValues the allowedValues to set
*/
protected void setAllowedValues(int allowedValues) {
this.allowedValues = allowedValues;
enableControls();
}
private void enableControls() {
useLatest.setDisable((allowedValues & (1<<PamArray.ORIGIN_USE_LATEST)) == 0);
useInterpolate.setDisable((allowedValues & (1<<PamArray.ORIGIN_INTERPOLATE)) == 0);
usePrevious.setDisable((allowedValues & (1<<PamArray.ORIGIN_USE_PRECEEDING)) == 0);
}
private int getSelectedButton() {
if (useLatest.isSelected()) {
return PamArray.ORIGIN_USE_LATEST;
}
else if (useInterpolate.isSelected()) {
return PamArray.ORIGIN_INTERPOLATE;
}
else if (usePrevious.isSelected()) {
return PamArray.ORIGIN_USE_PRECEEDING;
}
return -1;
}
}

View File

@ -20,8 +20,12 @@ import Localiser.algorithms.locErrors.LikilihoodError;
import Localiser.algorithms.locErrors.LocaliserError; import Localiser.algorithms.locErrors.LocaliserError;
/** /**
* Time delay based simplex method for localisation. Note that a lot of the code here has been referenced directly from static MCMC functions. This is because both MCMC and Simplex are based on the forward time delay problem * Time delay based simplex method for localisation. Note that a lot of the code
* hence are mathematically very similar. Simplex is much faster than MCMC but does not provide a full 3D probability distribution. * here has been referenced directly from static MCMC functions. This is because
* both MCMC and Simplex are based on the forward time delay problem hence are
* mathematically very similar. Simplex is much faster than MCMC but does not
* provide a full 3D probability distribution.
*
* @author Jamie Macaulay * @author Jamie Macaulay
* *
*/ */

View File

@ -27,7 +27,7 @@ public class GlobalMediumManager implements PamSettings {
private GlobalMediumParams globalMediumParams = new GlobalMediumParams(); private GlobalMediumParams globalMediumParams = new GlobalMediumParams();
private String warning = " Changing to between air and water requires a PAMGuard restart\n" public String warning = " Changing to between air and water requires a PAMGuard restart\n"
+ " for some display changes to take effect. Settings such as\n" + " for some display changes to take effect. Settings such as\n"
+ " sound speed, reciever sensitivity values and data unit amplitudes\n" + " sound speed, reciever sensitivity values and data unit amplitudes\n"
+ " will be recalculated or set to new default values.\n" + " will be recalculated or set to new default values.\n"
@ -74,6 +74,7 @@ public class GlobalMediumManager implements PamSettings {
subMenu.add(rbMenuItem); subMenu.add(rbMenuItem);
} }
} }
/** /**

View File

@ -0,0 +1,35 @@
<?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="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="M9.54343 71.8115C9.54343 70.6319 9.94329 69.6757 10.4365 69.6757C10.9298 69.6757 11.3297 70.6319 11.3297 71.8115C11.3297 72.991 10.9298 73.9473 10.4365 73.9473C9.94329 73.9473 9.54343 72.991 9.54343 71.8115Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<path d="M24.905 65.838C24.905 64.4855 27.1175 63.3891 29.8468 63.3891C32.576 63.3891 34.7886 64.4855 34.7886 65.838C34.7886 67.1904 32.576 68.2868 29.8468 68.2868C27.1175 68.2868 24.905 67.1904 24.905 65.838Z" 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="M44.5535 89.9229C44.5535 88.5913 46.0673 87.5118 47.9347 87.5118C49.802 87.5118 51.3158 88.5913 51.3158 89.9229C51.3158 91.2545 49.802 92.334 47.9347 92.334C46.0673 92.334 44.5535 91.2545 44.5535 89.9229Z" fill="#000000" fill-rule="nonzero" opacity="1" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="0.112674"/>
<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="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="M57.0188 21.2022L57.0192 21.8713" 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="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"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -34,7 +34,7 @@ public class ModuleIconFactory {
*/ */
public enum ModuleIcon { public enum ModuleIcon {
DATAMAP, NMEA, GPS, MAP, SOUND_AQ, SOUND_OUTPUT, FFT, FILTER, CLICK, CLICK_TRAIN, RECORDER, WHISTLE_MOAN, DATAMAP, NMEA, GPS, MAP, SOUND_AQ, SOUND_OUTPUT, FFT, FILTER, CLICK, CLICK_TRAIN, RECORDER, WHISTLE_MOAN,
NOISE_BAND, NOISE_FILT, DATABASE, BINARY, TIME_DISPLAY, DETECTION_DISPLAY, ARRAY, DEEP_LEARNING NOISE_BAND, NOISE_FILT, DATABASE, BINARY, TIME_DISPLAY, DETECTION_DISPLAY, ARRAY, DEEP_LEARNING, MATCHED_CLICK_CLASSIFIER
} }
/** /**
@ -78,6 +78,8 @@ public class ModuleIconFactory {
return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/recorder.png"))); return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/recorder.png")));
case SOUND_AQ: case SOUND_AQ:
return getSVGIcon("/Resources/modules/noun_Soundwave_1786340.svg"); return getSVGIcon("/Resources/modules/noun_Soundwave_1786340.svg");
case MATCHED_CLICK_CLASSIFIER:
return getSVGIcon("/Resources/modules/matched_click_classifier.svg");
//return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/aquisition.png"))); //return new ImageView(new Image(getClass().getResourceAsStream("/Resources/modules/aquisition.png")));
case SOUND_OUTPUT: case SOUND_OUTPUT:
// return PamGlyphDude.createModuleGlyph(MaterialDesignIcon.HEADPHONES); // return PamGlyphDude.createModuleGlyph(MaterialDesignIcon.HEADPHONES);
@ -114,6 +116,7 @@ public class ModuleIconFactory {
svgsprite.getSpriteNode().setStyle("-fx-fill: black"); svgsprite.getSpriteNode().setStyle("-fx-fill: black");
svgsprite.setFitHeight(DataModelStyle.iconSize-10); svgsprite.setFitHeight(DataModelStyle.iconSize-10);
svgsprite.setFitWidth(DataModelStyle.iconSize-10); svgsprite.setFitWidth(DataModelStyle.iconSize-10);
return svgsprite.getSpriteNode(); return svgsprite.getSpriteNode();
} }
catch (Exception e) { catch (Exception e) {
@ -162,7 +165,7 @@ public class ModuleIconFactory {
* @return the module icon enum * @return the module icon enum
*/ */
public ModuleIcon getModuleIcon(String className) { public ModuleIcon getModuleIcon(String className) {
//System.out.println("CLASS NAME: " + className); System.out.println("CLASS NAME: " + className);
ModuleIcon icon = null; ModuleIcon icon = null;
switch (className) { switch (className) {
case "Acquisition.AcquisitionControl": case "Acquisition.AcquisitionControl":
@ -207,6 +210,9 @@ public class ModuleIconFactory {
case "rawDeepLearningClassifier.DLControl": case "rawDeepLearningClassifier.DLControl":
icon=ModuleIcon.DEEP_LEARNING; icon=ModuleIcon.DEEP_LEARNING;
break; break;
case "matchedTemplateClassifer.MTClassifierControl":
icon=ModuleIcon.MATCHED_CLICK_CLASSIFIER;
break;
} }
return icon; return icon;
} }

View File

@ -13,24 +13,35 @@ import PamController.PamSettingManager;
import PamController.SettingsPane; import PamController.SettingsPane;
import PamController.StorageOptions; import PamController.StorageOptions;
import PamController.StorageParameters; import PamController.StorageParameters;
import PamController.soundMedium.GlobalMedium;
import PamController.soundMedium.GlobalMedium.SoundMedium;
import PamModel.PamModuleInfo; import PamModel.PamModuleInfo;
import PamView.dialog.warn.WarnOnce;
import pamViewFX.fxNodes.PamButton; import pamViewFX.fxNodes.PamButton;
import pamViewFX.fxNodes.PamVBox; import pamViewFX.fxNodes.PamVBox;
import pamViewFX.fxNodes.PamHBox;
import pamViewFX.fxNodes.pamDialogFX.PamDialogFX; import pamViewFX.fxNodes.pamDialogFX.PamDialogFX;
import pamViewFX.fxNodes.pamDialogFX.PamSettingsDialogFX; import pamViewFX.fxNodes.pamDialogFX.PamSettingsDialogFX;
import pamViewFX.fxNodes.utilityPanes.SettingsDialog; import pamViewFX.fxNodes.utilityPanes.SettingsDialog;
import pamViewFX.fxSettingsPanes.StorageOptionsPane; import pamViewFX.fxSettingsPanes.StorageOptionsPane;
import javafx.geometry.Insets; import javafx.geometry.Insets;
import javafx.geometry.Pos; import javafx.geometry.Pos;
import javafx.geometry.Side;
import javafx.scene.control.Label; import javafx.scene.control.Label;
import javafx.scene.control.Labeled; import javafx.scene.control.Labeled;
import javafx.scene.control.MenuButton; import javafx.scene.control.MenuButton;
import javafx.scene.control.MenuItem; import javafx.scene.control.MenuItem;
import javafx.scene.control.Separator;
import javafx.scene.text.TextAlignment; import javafx.scene.text.TextAlignment;
import javafx.scene.control.ToggleButton;
import javafx.scene.control.ToggleGroup;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.Priority;
/** /**
* Pane which holds settings menu. All primary settings are accessed from this pane which sits in a hiding pane to the right * Pane which holds settings menu. All primary settings are accessed from this pane which sits in a hiding pane to the right
* of the main GUI. * of the main GUI.
*
* @author Jamie Macaulay * @author Jamie Macaulay
* *
*/ */
@ -41,6 +52,12 @@ public class PamSettingsMenuPane extends PamVBox {
StorageOptionsPane storageOptionPane; StorageOptionsPane storageOptionPane;
public String warning = " Changing to between air and water requires a PAMGuard restart\n"
+ " for some display changes to take effect. Settings such as\n"
+ " sound speed, reciever sensitivity values and data unit amplitudes\n"
+ " will be recalculated or set to new default values.\n"
+ " <p>Data processing changes are ready to use immediately.";
public PamSettingsMenuPane(){ public PamSettingsMenuPane(){
this.setSpacing(0); this.setSpacing(0);
@ -53,7 +70,7 @@ public class PamSettingsMenuPane extends PamVBox {
settingsLabel.setPadding(new Insets(14,0,10,0)); settingsLabel.setPadding(new Insets(14,0,10,0));
settingsLabel.setAlignment(Pos.CENTER); settingsLabel.setAlignment(Pos.CENTER);
settingsLabel.setPrefWidth(Double.MAX_VALUE); settingsLabel.setPrefWidth(Double.MAX_VALUE);
settingsLabel.setTextAlignment(TextAlignment.CENTER); settingsLabel.setTextAlignment(TextAlignment.LEFT);
settingsLabel.setStyle("-fx-font-weight: bold;"); settingsLabel.setStyle("-fx-font-weight: bold;");
PamButton saveConfig=new PamButton("Save"); PamButton saveConfig=new PamButton("Save");
@ -68,12 +85,55 @@ public class PamSettingsMenuPane extends PamVBox {
}); });
styleButton(saveConfigAs); styleButton(saveConfigAs);
//Air or water mode
ToggleButton toggleButton1 = new ToggleButton("Water");
toggleButton1.setPrefWidth(60);
toggleButton1.setTooltip(new Tooltip(GlobalMedium.getToolTip(SoundMedium.Water)));
toggleButton1.setOnAction((action)->{
if (PamController.getInstance().getGlobalMediumManager().getGlobalMediumParameters().currentMedium==SoundMedium.Air) return; //do nothing.
int goAhead = WarnOnce.showWarning("Changing Medium", warning , WarnOnce.OK_CANCEL_OPTION);
// System.out.println("WarnOnce: " + goAhead);
if (goAhead==WarnOnce.OK_OPTION || goAhead<0) PamController.getInstance().getGlobalMediumManager().setCurrentMedium(SoundMedium.Air);
});
ToggleButton toggleButton2 = new ToggleButton("Air");
toggleButton2.setPrefWidth(60);
toggleButton1.setTooltip(new Tooltip(GlobalMedium.getToolTip(SoundMedium.Air)));
ToggleGroup toggleGroup = new ToggleGroup();
toggleButton1.setToggleGroup(toggleGroup);
toggleButton2.setToggleGroup(toggleGroup);
toggleGroup.selectToggle(toggleButton1);
Label mediumLabel = new Label("Sound Medium");
mediumLabel.setAlignment(Pos.CENTER_LEFT);
mediumLabel.setPadding(new Insets(0,0,0,15));
//styleButton(mediumLabel);
PamHBox toggleButtonBox = new PamHBox();
toggleButtonBox.setAlignment(Pos.CENTER_RIGHT);
toggleButtonBox.setSpacing(5);
toggleButtonBox.getChildren().addAll(toggleButton1, toggleButton2);
toggleButtonBox.setMaxWidth(Double.MAX_VALUE);
PamHBox mediumToggleBox = new PamHBox(mediumLabel,toggleButtonBox);
PamHBox.setHgrow(toggleButtonBox, Priority.ALWAYS);
mediumToggleBox.setAlignment(Pos.CENTER_LEFT);
mediumToggleBox.setSpacing(5);
PamButton generalSettings=new PamButton("General Settings..."); PamButton generalSettings=new PamButton("General Settings...");
styleButton(generalSettings); styleButton(generalSettings);
MenuButton settings=new MenuButton("Module Settings"); MenuButton settings=new MenuButton("Module Settings");
settings.setStyle("-fx-background-radius: 0;" settings.setPopupSide(Side.RIGHT);
+ " -fx-border-color: transparent; -fx-padding: 0 0 0 0;"); // settings.setStyle("-fx-background-radius: 0;"
// + " -fx-border-color: transparent; -fx-padding: 0 0 0 0;");
styleButton(settings);
settings.setAlignment(Pos.CENTER_LEFT); settings.setAlignment(Pos.CENTER_LEFT);
settings.setPrefWidth(Double.MAX_VALUE); settings.setPrefWidth(Double.MAX_VALUE);
settings.setPrefHeight(40); settings.setPrefHeight(40);
@ -155,7 +215,8 @@ public class PamSettingsMenuPane extends PamVBox {
PamButton contact=new PamButton("Contact and Support"); PamButton contact=new PamButton("Contact and Support");
styleButton(contact); styleButton(contact);
this.getChildren().addAll(settingsLabel,saveConfig,saveConfigAs, generalSettings, settings, storageManager, database, binaryStorage, help, about, tip, website, contact); this.getChildren().addAll(settingsLabel,saveConfig,saveConfigAs, new Separator(), mediumToggleBox, generalSettings, settings, new Separator(),
storageManager, database, binaryStorage, new Separator(), help, about, tip, website, contact);
} }
@ -168,6 +229,7 @@ public class PamSettingsMenuPane extends PamVBox {
public void styleButton(Labeled control){ public void styleButton(Labeled control){
Insets buttonInsets=new Insets(0,leftInset,0,leftInset); Insets buttonInsets=new Insets(0,leftInset,0,leftInset);
control.setAlignment(Pos.CENTER_LEFT); control.setAlignment(Pos.CENTER_LEFT);
control.setStyle("-fx-alignment: center-left;");
control.setPadding(buttonInsets); control.setPadding(buttonInsets);
control.getStyleClass().add("square-button-trans"); control.getStyleClass().add("square-button-trans");
control.setPrefWidth(Double.MAX_VALUE); control.setPrefWidth(Double.MAX_VALUE);
@ -198,6 +260,4 @@ public class PamSettingsMenuPane extends PamVBox {
} }
} }
} }

View File

@ -73,7 +73,7 @@ public class FlipPane extends StackPane {
flipTime = 700; flipTime = 700;
flipDirection = FLIP_DIRECTION; flipDirection = FLIP_DIRECTION;
flippedFrontProperty.setValue(true); flippedFrontProperty.setValue(true);
registerListeners(); registerListeners();
} }

View File

@ -45,6 +45,10 @@ public class PamFlipPane extends FlipPane {
super(); super();
this.advPane = createAdvSettingsPane(); this.advPane = createAdvSettingsPane();
this.getFront().getChildren().add(frontPane = new PamBorderPane()); this.getFront().getChildren().add(frontPane = new PamBorderPane());
// this.getFront().setStyle("-fx-background-color: grey;");
// this.getBack().setStyle("-fx-background-color: grey;");
this.getBack().getChildren().add(advPane); this.getBack().getChildren().add(advPane);
this.setFlipTime(FLIP_TIME); this.setFlipTime(FLIP_TIME);
@ -107,6 +111,7 @@ public class PamFlipPane extends FlipPane {
backButton = new PamButton(); backButton = new PamButton();
backButton.setGraphic(PamGlyphDude.createPamIcon("mdi2c-chevron-left", Color.WHITE, PamGuiManagerFX.iconSize)); backButton.setGraphic(PamGlyphDude.createPamIcon("mdi2c-chevron-left", Color.WHITE, PamGuiManagerFX.iconSize));
//backButton.setStyle("-fx-padding: 0,0,0,0");
backButton.setOnAction((action)->{ backButton.setOnAction((action)->{
// System.out.println("FLIP BACK TO FRONT"); // System.out.println("FLIP BACK TO FRONT");
@ -116,7 +121,7 @@ public class PamFlipPane extends FlipPane {
//backButton.setPrefWidth(150); //backButton.setPrefWidth(150);
PamBorderPane advPane = new PamBorderPane(); PamBorderPane advPane = new PamBorderPane();
advPane.setPadding(new Insets(5,5,5,5)); //advPane.setPadding(new Insets(5,5,5,5));
PamHBox buttonHolder = new PamHBox(); PamHBox buttonHolder = new PamHBox();

View File

@ -20,6 +20,7 @@ import javafx.stage.Window;
/** /**
* Creates a dialog with some useful PAMGUARD customisation. * Creates a dialog with some useful PAMGUARD customisation.
*
* @author Jamie Macaulay * @author Jamie Macaulay
* *
*/ */

View File

@ -9,6 +9,8 @@ import javafx.scene.control.TableRow;
import javafx.scene.control.TableView; import javafx.scene.control.TableView;
import javafx.scene.layout.BorderPane; import javafx.scene.layout.BorderPane;
import javafx.scene.layout.Pane; import javafx.scene.layout.Pane;
import javafx.geometry.Insets;
/** /**
* Pane which holds data within a table and has add, settings and delete buttons. * Pane which holds data within a table and has add, settings and delete buttons.
@ -88,7 +90,7 @@ public abstract class TableSettingsPane<T> extends PamBorderPane {
//make sure table resized with pane to stop blank column //make sure table resized with pane to stop blank column
getTableView().setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY); getTableView().setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
getButtonPane().getSettingsButton().setDisable(table.getItems().size()<=0); getButtonPane().getSettingsButton().setDisable(table.getItems().size()<=0);
getButtonPane().getDeleteButton().setDisable(table.getItems().size()<=0); getButtonPane().getDeleteButton().setDisable(table.getItems().size()<=0);

View File

@ -21,7 +21,6 @@
package userDisplay; package userDisplay;
import java.awt.Frame; import java.awt.Frame;
import java.awt.MenuItem;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.Serializable; import java.io.Serializable;
@ -31,18 +30,14 @@ import javax.swing.JMenu;
import javax.swing.JMenuBar; import javax.swing.JMenuBar;
import javax.swing.JMenuItem; import javax.swing.JMenuItem;
import clickDetector.ClickClassifiers.UserTypesPanel;
import dataPlots.TDDisplayProvider; import dataPlots.TDDisplayProvider;
import dataPlotsFX.JamieDev;
import dataPlotsFX.TDDisplayProviderFX; import dataPlotsFX.TDDisplayProviderFX;
import radardisplay.RadarDisplay;
import radardisplay.RadarDisplayProvider; import radardisplay.RadarDisplayProvider;
import radardisplay.RadarParameters; import radardisplay.RadarParameters;
import radardisplay.RadarParametersDialog; import radardisplay.RadarParametersDialog;
import radardisplay.RadarProjector; import radardisplay.RadarProjector;
import soundPlayback.PlaybackControl; import soundPlayback.PlaybackControl;
import fftManager.FFTDataUnit; import fftManager.FFTDataUnit;
import localiserDisplay.LocaliserDisplayProvider;
import pamScrollSystem.AbstractScrollManager; import pamScrollSystem.AbstractScrollManager;
import pamScrollSystem.coupling.ScrollerCoupling; import pamScrollSystem.coupling.ScrollerCoupling;
//import localiserDisplay.LocaliserDisplayProvider; //import localiserDisplay.LocaliserDisplayProvider;
@ -55,8 +50,6 @@ import PamController.PamSettings;
import PamModel.PamDependency; import PamModel.PamDependency;
import PamModel.PamDependent; import PamModel.PamDependent;
import PamModel.PamModel; import PamModel.PamModel;
import PamModel.SMRUEnable;
import PamView.MenuItemEnabler;
import PamView.PamGui; import PamView.PamGui;
import Spectrogram.SpectrogramDiplayProvider; import Spectrogram.SpectrogramDiplayProvider;
import Spectrogram.SpectrogramParameters; import Spectrogram.SpectrogramParameters;
@ -95,10 +88,10 @@ public class UserDisplayControl extends PamControlledUnit implements
TDDisplayProvider.register(); TDDisplayProvider.register();
TDDisplayProviderFX.register(); TDDisplayProviderFX.register();
//register the localiser display. // //register the localiser display.
if (JamieDev.isEnabled()) { // if (JamieDev.isEnabled()) {
LocaliserDisplayProvider.register(); // LocaliserDisplayProvider.register();
} // }
} }