* New variables: MYLOCATORSHORT, MYQRGSHORT, QRZNAME (Viliam Petrik)

* Sendtext-field focus is now on the text field when clicking on the list of people in the chat. You can just begin to type after clicking a callsign (Gian Luca)
* Worked-station-filter (tnx Gianluca) Filter is now live, if you activate the worked-filter, the worked (and user tagged not-qrv-for-this-band) will disappear without manually reactivating the filter
* Chatters list sorting by QRB (tnx Alessandro); sorting, was lexicographically, now it's handled as numbers
* Airscout-showpath-button works now
This commit is contained in:
Marc Froehlich
2024-05-16 10:08:47 +02:00
parent 1663b0fd7f
commit 5cca2923c2
13 changed files with 757 additions and 40 deletions

View File

@@ -9,7 +9,7 @@ public class ApplicationConstants {
/**
* Name of file to store preferences in.
*/
public static final double APPLICATION_CURRENTVERSIONNUMBER = 1.17;
public static final double APPLICATION_CURRENTVERSIONNUMBER = 1.22;
public static final String VERSIONINFOURLFORUPDATES_KST4CONTEST = "https://do5amf.funkerportal.de/kst4ContestVersionInfo.xml";
public static final String VERSIONINFDOWNLOADEDLOCALFILE = "kst4ContestVersionInfo.xml";

View File

@@ -11,6 +11,7 @@ import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.LinkedBlockingQueue;
import javafx.beans.Observable;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.transformation.FilteredList;
@@ -108,6 +109,7 @@ public class ChatController {
String myCallAndMyLocString = chatPreferences.getLoginCallSign() + "," + chatPreferences.getLoginLocator();
String remoteCallAndLocString = remoteChatMember.getCallSign() +"," + remoteChatMember.getQra();
String host = "255.255.255.255";
// int port = 9872;
int port = chatPreferences.getAirScout_asCommunicationPort();
@@ -118,7 +120,7 @@ public class ChatController {
String queryStringToAirScout = "";
queryStringToAirScout += prefix_asSetpath + bandString + "," + myCallAndMyLocString + "," + remoteCallAndLocString;
queryStringToAirScout += prefix_asSetpath + bandString + "," + myCallAndMyLocString + "," + remoteCallAndLocString+ "Å";
byte[] queryStringToAirScoutMSG = queryStringToAirScout.getBytes();
@@ -338,7 +340,7 @@ public class ChatController {
private String chatState;
private String hostname = "109.90.0.130";
private String praktiKSTVersion = "praktiKST 1.0";
// private String praktiKSTVersion = "praktiKST 1.0";
private String praktiKSTVersionInfo = "2022-10 - 2022-12\ndeveloped by DO5AMF, Marc\nContact: praktimarc@gmail.com\nDonations via paypal are welcome";
private int port = 23001; // kst4contest.test 4 23001
@@ -400,8 +402,15 @@ public class ChatController {
// mine
private FilteredList<ChatMessage> lst_toOtherMessageList = new FilteredList<>(lst_globalChatMessageList);
private ObservableList<ChatMember> chatMemberList = FXCollections.observableArrayList(); // List of active stations
/**
* we do some trick here with the chatmemberlist to not make it neccessary to change all boolean properties if the
* chatmember object to observables. We trigger the list for changes on an object which we change whenever a list
* update will be neccessary to process (important for correct lifetime filtering!)
*/
// private ObservableList<ChatMember> chatMemberList = FXCollections.observableArrayList(workedInfoChange -> new Observable[] {workedInfoChange.workedInfoChangeFireListEventTriggerProperty()}); // List of active stations
// in chat
private ObservableList<ChatMember> chatMemberList = FXCollections.observableArrayList(); // List of active stations
private ObservableList<ChatMember> lst_chatMemberList = FXCollections.synchronizedObservableList(chatMemberList); // List
// of active stn in chat
private FilteredList<ChatMember> lst_chatMemberListFiltered = new FilteredList<ChatMember>(chatMemberList);
@@ -503,13 +512,13 @@ public class ChatController {
this.messageTXBus = messageTXBus;
}
public String getPraktiKSTVersion() {
return praktiKSTVersion;
}
// public String getPraktiKSTVersion() {
// return praktiKSTVersion;
// }
public void setPraktiKSTVersion(String praktiKSTVersion) {
this.praktiKSTVersion = praktiKSTVersion;
}
// public void setPraktiKSTVersion(String praktiKSTVersion) {
// this.praktiKSTVersion = praktiKSTVersion;
// }
public String getPraktiKSTVersionInfo() {
return praktiKSTVersionInfo;
@@ -1035,7 +1044,7 @@ category = new ChatCategory(2);
String loginString = "";
loginString = "LOGINC|" + chatPreferences.getLoginCallSign() + "|" + chatPreferences.getLoginPassword()
+ "|" + chatPreferences.getLoginChatCategory().getCategoryNumber() + "|" + praktiKSTVersion
+ "|" + chatPreferences.getLoginChatCategory().getCategoryNumber() + "|praktiKST v" + ApplicationConstants.APPLICATION_CURRENTVERSIONNUMBER
+ "|25|0|1|" + getCurrentEpochTime() + "|0|";
// System.out.println(loginString);

View File

@@ -1128,8 +1128,9 @@ public class MessageBusManagementThread extends Thread {
} catch (InterruptedException e1) {
this.interrupt();
// TODO Auto-generated catch block
e1.printStackTrace();
break;// TODO Change at may24, avoid uncloability. Check if this could lead to further errors on instable link!
// client.getMessageRXBus().clear();
}
{

View File

@@ -10,6 +10,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import kst4contest.ApplicationConstants;
import kst4contest.view.GuiUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -309,7 +310,18 @@ public class ReadUDPbyUCXMessageThread extends Thread {
.get(client.checkListForChatMemberIndexByCallSign(modifyThat))
.setWorked10G(true);
}
/**
* //TODO: following line is a quick fix to making disappear worked chatmembers of the list
* Thats uncomfortable due to this also causes selection changes,
* Better way is to change all worked and qrv values to observables and then trigger the underlying
* list to fire an invalidationevent. Really Todo!
*/
try{
GuiUtils.triggerGUIFilteredChatMemberListChange(client); //not clean at all
} catch (Exception IllegalStateException) {
//do nothing, as it works...
}
}
}

View File

@@ -37,7 +37,7 @@ public class UCXLogFileToHashsetParser {
*/
private ChatMember checkIfLineInhibitsCallSign(String line) {
Pattern pattern = Pattern.compile(PTRN_CallSign); // TODO: PTRN should depend to category-selection of own stn
Pattern pattern = Pattern.compile(PTRN_CallSign);
Matcher matcher = pattern.matcher(line);
String matchedString = "";

View File

@@ -9,6 +9,7 @@ import java.util.TimerTask;
import javafx.collections.ObservableList;
import kst4contest.model.ChatMember;
import kst4contest.model.ClusterMessage;
import kst4contest.view.GuiUtils;
public class UserActualizationTask extends TimerTask {
@@ -89,6 +90,7 @@ public class UserActualizationTask extends TimerTask {
// chatMember.setWorked(true);
// System.out.println("[USERACT, info:] marking Chatuser " + chatMember.getCallSign() + " as worked, based on UDPLsnBackup-Logfile.");
// }
// GuiUtils.triggerGUIFilteredChatMemberListChange(this.client); //todo: quick and dirty gui fix
}
ObservableList<ClusterMessage> praktiKSTClusterList = this.client.getLst_clusterMemberList();

View File

@@ -2,11 +2,14 @@ package kst4contest.model;
import java.util.Date;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class ChatMember {
// private final BooleanProperty workedInfoChangeFireListEventTrigger = new SimpleBooleanProperty();
AirPlaneReflectionInfo airPlaneReflectInfo;
String callSign;
String qra;
@@ -54,6 +57,8 @@ public class ChatMember {
public boolean isInAngleAndRange() {
return isInAngleAndRange;
}
@@ -307,6 +312,8 @@ public class ChatMember {
public void setWorked(boolean worked) {
this.worked = worked;
// this.workedInfoChangeFireListEventTriggerProperty().setValue(true);
// this.workedInfoChangeFireListEventTriggerProperty().setValue(false);
}
/**

View File

@@ -1,5 +1,10 @@
package kst4contest.view;
import kst4contest.controller.ChatController;
import kst4contest.model.ChatMember;
import java.util.function.Predicate;
public class GuiUtils {
/**
@@ -11,5 +16,29 @@ public class GuiUtils {
static boolean isNumeric(String str){
return str != null && str.matches("[0-9.]+");
}
public static void triggerGUIFilteredChatMemberListChange(ChatController chatController) {
{
//trick to trigger gui changes on property changes of obects
Predicate<ChatMember> dummyPredicate = new Predicate<ChatMember>() {
@Override
public boolean test(ChatMember chatMember) {
return true;
}
};
/**
* //TODO: following 2 lines are a quick fix to making disappear worked chatmembers of the list
* Thats uncomfortable due to this also causes selection changes,
* Better way is to change all worked and qrv values to observables and then trigger the underlying
* list to fire an invalidationevent. Really Todo!
*/
chatController.getLst_chatMemberListFilterPredicates().add(dummyPredicate);
chatController.getLst_chatMemberListFilterPredicates().remove(dummyPredicate);
}
}
}

View File

@@ -7,6 +7,8 @@ import java.util.*;
import java.util.function.Consumer;
import java.util.function.Predicate;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.beans.binding.Bindings;
import javafx.scene.control.*;
import javafx.scene.input.*;
@@ -156,10 +158,7 @@ public class Kst4ContestApplication extends Application {
chatcontroller.getDbHandler().updateNotQRVInfoOnChatMember(selectedCallSignInfoStageChatMember);
// double[] deviderPos = selectedCallSignSplitPane.getDividerPositions();
// for (int i = 0; i<deviderPos.length;i++) {
// System.out.println("<<<<<<<<<<<<<<<DEVIDER " + deviderPos[i]);
// }
GuiUtils.triggerGUIFilteredChatMemberListChange(chatcontroller);
} catch (Exception e) {
//do nothing, upodate was not possible
@@ -181,6 +180,7 @@ public class Kst4ContestApplication extends Application {
try {
chatcontroller.getDbHandler().updateNotQRVInfoOnChatMember(selectedCallSignInfoStageChatMember);
GuiUtils.triggerGUIFilteredChatMemberListChange(chatcontroller);
} catch (Exception e) {
//do nothing, upodate was not possible
}
@@ -201,6 +201,7 @@ public class Kst4ContestApplication extends Application {
try {
chatcontroller.getDbHandler().updateNotQRVInfoOnChatMember(selectedCallSignInfoStageChatMember);
GuiUtils.triggerGUIFilteredChatMemberListChange(chatcontroller);
} catch (Exception e) {
//do nothing, upodate was not possible
}
@@ -221,6 +222,7 @@ public class Kst4ContestApplication extends Application {
try {
chatcontroller.getDbHandler().updateNotQRVInfoOnChatMember(selectedCallSignInfoStageChatMember);
GuiUtils.triggerGUIFilteredChatMemberListChange(chatcontroller);
} catch (Exception e) {
//do nothing, upodate was not possible
}
@@ -241,6 +243,7 @@ public class Kst4ContestApplication extends Application {
try {
chatcontroller.getDbHandler().updateNotQRVInfoOnChatMember(selectedCallSignInfoStageChatMember);
GuiUtils.triggerGUIFilteredChatMemberListChange(chatcontroller);
} catch (Exception e) {
//do nothing, upodate was not possible
}
@@ -256,11 +259,13 @@ public class Kst4ContestApplication extends Application {
selectedCallSignInfoStageChatMember.setQrv5600(true);
} else {
selectedCallSignInfoStageChatMember.setQrv5600(false);
}
try {
chatcontroller.getDbHandler().updateNotQRVInfoOnChatMember(selectedCallSignInfoStageChatMember);
GuiUtils.triggerGUIFilteredChatMemberListChange(chatcontroller);
} catch (Exception e) {
//do nothing, upodate was not possible
}
@@ -281,6 +286,7 @@ public class Kst4ContestApplication extends Application {
try {
chatcontroller.getDbHandler().updateNotQRVInfoOnChatMember(selectedCallSignInfoStageChatMember);
GuiUtils.triggerGUIFilteredChatMemberListChange(chatcontroller);
} catch (Exception e) {
//do nothing, upodate was not possible
}
@@ -312,6 +318,7 @@ public class Kst4ContestApplication extends Application {
try {
chatcontroller.getDbHandler().updateNotQRVInfoOnChatMember(selectedCallSignInfoStageChatMember);
GuiUtils.triggerGUIFilteredChatMemberListChange(chatcontroller);
} catch (Exception e) {
//do nothing, upodate was not possible
}
@@ -594,11 +601,9 @@ public class Kst4ContestApplication extends Application {
}
});
// asd hier weiter machen, für bold state
callSignCol.setCellFactory(new Callback<TableColumn<ChatMember, String>, TableCell<ChatMember, String>>() {
public TableCell call(TableColumn param) {
// param.getProperties().
return new TableCell<ChatMember, String>() {
@@ -706,6 +711,26 @@ public class Kst4ContestApplication extends Application {
return qra;
}
});
qtfCol.setComparator(new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
double doubleDegreesObj1 = Double.parseDouble(o1.split("°")[0]); //filter the "°"
double doubleDegreesObj2 = Double.parseDouble(o2.split("°")[0]); //filter the "°"
if (doubleDegreesObj1 < doubleDegreesObj2) {
return -1;
} else if (doubleDegreesObj1 == doubleDegreesObj2) {
return 0;
} else if (doubleDegreesObj1 > doubleDegreesObj2) {
return 1;
}
return 0;//should never happen!
}
});
qtfCol.prefWidthProperty().bind(tbl_chatMemberTable.widthProperty().divide(15));
TableColumn<ChatMember, String> qrgCol = new TableColumn<ChatMember, String>("QRG");
@@ -1131,6 +1156,28 @@ public class Kst4ContestApplication extends Application {
Thread.currentThread().setName("chatMemberTableSortTimer");
System.out.println("[KST4CApp, Info:] Chatmemberlist-Filterlist predicates size: " + chatcontroller.getLst_chatMemberListFilterPredicates().size());
// {
// //trick to trigger gui changes on property changes of obects
//
// Predicate<ChatMember> dummyPredicate = new Predicate<ChatMember>() {
// @Override
// public boolean test(ChatMember chatMember) {
// return true;
// }
// };
//
// /**
// * //TODO: following 2 lines are a quick fix to making disappear worked chatmembers of the list
// * Thats uncomfortable due to this also causes selection changes,
// * Better way is to change all worked and qrv values to observables and then trigger the underlying
// * list to fire an invalidationevent. Really Todo!
// */
// chatcontroller.getLst_chatMemberListFilterPredicates().add(dummyPredicate);
//// chatcontroller.getLst_chatMemberListFilterPredicates().remove(dummyPredicate);
//
// }
// System.out.println("[KST4CApp, Info:] Deviderpos: " + spl);
// for (int i = 0; i < chatcontroller.getLst_chatMemberListFilterPredicates().size(); i++) {
//
@@ -1149,8 +1196,11 @@ public class Kst4ContestApplication extends Application {
System.out.println("[Main.java, Warning:] Table sorting (actualizing) failed this time.");
}
tbl_chatMemberTable.refresh();
// tbl_chatMemberTable.
});
}
}, new Date(), 5000);
@@ -1257,6 +1307,8 @@ public class Kst4ContestApplication extends Application {
menuItem.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent event) {
txt_chatMessageUserInput.setText(txt_chatMessageUserInput.getText() + menuItem.getText());
txt_chatMessageUserInput.requestFocus();
txt_chatMessageUserInput.selectEnd();
}
});
@@ -3304,6 +3356,7 @@ public class Kst4ContestApplication extends Application {
// txt_ownqrg.setMinSize(40, 0);
txt_myQTF.setAlignment(Pos.BASELINE_RIGHT);
txt_myQTF.setTooltip(new Tooltip("Enter/update your actual qtf here for using path suggestions"));
txt_myQTF.setFocusTraversable(false);
SplitPane mainWindowLeftSplitPane = new SplitPane();
mainWindowLeftSplitPane.setOrientation(Orientation.HORIZONTAL);
@@ -3391,7 +3444,8 @@ public class Kst4ContestApplication extends Application {
txt_chatMessageUserInput.setText("/cq " + selectedCallSignInfoStageChatMember.getCallSign() + " " + chatcontroller.getChatPreferences().getLst_txtSnipList().get(9));
}
txt_chatMessageUserInput.requestFocus(); //in every case, focus the textfield for further edits
txt_chatMessageUserInput.selectEnd();
}
} catch (Exception nullPointerExc) {
System.out.println("There are no predifined textsnippets for this keycombo! -> " + nullPointerExc.getMessage());
@@ -3448,6 +3502,7 @@ public class Kst4ContestApplication extends Application {
// TextField txt_chatMessageUserInput
// txt_chatMessageUserInput.setPrefWidth("80%");
txt_chatMessageUserInput.setFocusTraversable(false);
txt_chatMessageUserInput.setPrefSize(500, 0);
txt_chatMessageUserInput.setText("");
txt_chatMessageUserInput.setTooltip(new Tooltip("Textmessage to Chat"));
@@ -3472,7 +3527,17 @@ public class Kst4ContestApplication extends Application {
@Override
public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
if (txt_chatMessageUserInput.getText().contains("MYQRG")) {
if (txt_chatMessageUserInput.getText().contains("MYQRGSHORT")) {
System.out.println("MYQRGSHORT erkannt");
// txt_chatMessageUserInput.getText().replaceAll("MYQRG", chatcontroller.getChatPreferences().getMYQRG());
// txt_chatMessageUserInput.setText(txt_chatMessageUserInput.getText().replaceAll("MYQRG", chatcontroller.getChatPreferences().getMYQRG()));
txt_chatMessageUserInput.setText(txt_chatMessageUserInput.getText().replaceAll("MYQRGSHORT",
chatcontroller.getChatPreferences().getMYQRG().getValue().substring(0,7)));
}
if (txt_chatMessageUserInput.getText().contains("MYQRG") && !txt_chatMessageUserInput.getText().contains("MYQRGSHORT")) {
System.out.println("MYQRG erkannt");
// txt_chatMessageUserInput.getText().replaceAll("MYQRG", chatcontroller.getChatPreferences().getMYQRG());
@@ -3480,9 +3545,19 @@ public class Kst4ContestApplication extends Application {
txt_chatMessageUserInput.setText(txt_chatMessageUserInput.getText().replaceAll("MYQRG",
chatcontroller.getChatPreferences().getMYQRG().getValue()));
}
;
if (txt_chatMessageUserInput.getText().contains("MYLOCATOR")) {
if (txt_chatMessageUserInput.getText().contains("MYLOCATORSHORT")) {
System.out.println("MYLOCATORSHORT erkannt");
// txt_chatMessageUserInput.getText().replaceAll("MYQRG", chatcontroller.getChatPreferences().getMYQRG());
txt_chatMessageUserInput.setText(txt_chatMessageUserInput.getText().replaceAll("MYLOCATORSHORT",
chatcontroller.getChatPreferences().getLoginLocator().substring(0,4))); //JO51 instead of JO51JL
}
if (txt_chatMessageUserInput.getText().contains("MYLOCATOR") && !txt_chatMessageUserInput.getText().contains("MYLOCATORSHORT")) {
System.out.println("MYLOCATOR erkannt");
// txt_chatMessageUserInput.getText().replaceAll("MYQRG", chatcontroller.getChatPreferences().getMYQRG());
@@ -3490,6 +3565,7 @@ public class Kst4ContestApplication extends Application {
chatcontroller.getChatPreferences().getLoginLocator()));
}
boolean noAirplaneHere = false;
if (txt_chatMessageUserInput.getText().contains("FIRSTAP")) {
@@ -3554,6 +3630,35 @@ public class Kst4ContestApplication extends Application {
}
}
if (txt_chatMessageUserInput.getText().contains("QRZNAME")) {
if (selectedCallSignInfoStageChatMember != null) {
/**
* for any reason there is a (not critical) exception if i use String[] here, so I
* decided to use the whole name
*/
// try {
//
// String[] firstName = selectedCallSignInfoStageChatMember.getName().split(" ");
// String splitFirst ="";
//
// if (firstName.length > 1) {
// splitFirst = firstName[0];
// } else splitFirst = selectedCallSignInfoStageChatMember.getName();
//
// txt_chatMessageUserInput.setText(txt_chatMessageUserInput.getText().replaceAll("QRZNAME",
// splitFirst)); //only first word of name field will be inserted
// } catch (Exception jfxBugExc) {
//
// }
txt_chatMessageUserInput.setText(txt_chatMessageUserInput.getText().replaceAll("QRZNAME",
selectedCallSignInfoStageChatMember.getName()));
}
}
if (txt_chatMessageUserInput.getText().startsWith("/cq " + chatcontroller.getChatPreferences().getLoginCallSign())) {
txt_chatMessageUserInput.setText(" "); //prevent user sends a message to himself, that will cause errors
}
@@ -3570,6 +3675,7 @@ public class Kst4ContestApplication extends Application {
txt_ownqrg.setPrefSize(80, 0);
// txt_ownqrg.setMinSize(40, 0);
txt_ownqrg.setAlignment(Pos.BASELINE_RIGHT);
txt_ownqrg.setFocusTraversable(false);
// System.out.println(txt_ownqrg.textProperty();
primaryStage.setTitle(chatcontroller.getChatPreferences().getChatState());
@@ -3669,23 +3775,31 @@ public class Kst4ContestApplication extends Application {
*/
if (selectedChatMemberPrivateChat.getList().get(0).getSender().getCallSign().equals(chatcontroller.getChatPreferences().getLoginCallSign()) ) {
//selected message of own callsign ... now filter the foreign callsign and fill it in after /cq
System.out.println("////////////////////////////// rx in orginal message: " + selectedChatMemberPrivateChat.getList().get(0).getReceiver().getCallSign());
System.out.println("privChat selected ChatMember: was own object...!" + "rx was: " + selectedChatMemberPrivateChat.getList().get(0).getMessageText().substring(2,(selectedChatMemberPrivateChat.getList().get(0).getMessageText().indexOf(")"))));
txt_chatMessageUserInput.clear();
txt_chatMessageUserInput.setText("/cq "
+ selectedChatMemberPrivateChat.getList().get(0).getMessageText().substring(2,(selectedChatMemberPrivateChat.getList().get(0).getMessageText().indexOf(")"))) + " "); //here1
txt_chatMessageUserInput.requestFocus();
txt_chatMessageUserInput.selectEnd();
} else {
txt_chatMessageUserInput.clear();
txt_chatMessageUserInput.setText("/cq "
+ selectedChatMemberPrivateChat.getList().get(0).getSender().getCallSign() + " ");
txt_chatMessageUserInput.requestFocus();
txt_chatMessageUserInput.selectEnd();
try {
selectedCallSignFurtherInfoPane.getChildren().clear();
selectedCallSignInfoStageChatMember = selectedChatMemberPrivateChat.getList().get(0).getSender();
selectedCallSignFurtherInfoPane.getChildren().add(generateFurtherInfoAbtSelectedCallsignBP(selectedCallSignInfoStageChatMember));
txt_chatMessageUserInput.requestFocus();
txt_chatMessageUserInput.selectEnd();
} catch (Exception exception) {
System.out.println("KST4CApp, <<<catched error>>>>: message sender is not in the userlist any more!");
}
@@ -3743,6 +3857,8 @@ public class Kst4ContestApplication extends Application {
txt_chatMessageUserInput.clear();
txt_chatMessageUserInput.setText("/cq "
+ selectedChatMemberGeneralChat.getList().get(0).getSender().getCallSign() + " ");
txt_chatMessageUserInput.requestFocus();
txt_chatMessageUserInput.selectEnd();
System.out.println("privChat selected ChatMember: "
+ selectedChatMemberGeneralChat.getList().get(0).getSender());
@@ -3750,6 +3866,8 @@ public class Kst4ContestApplication extends Application {
selectedCallSignFurtherInfoPane.getChildren().clear();
selectedCallSignInfoStageChatMember = selectedChatMemberGeneralChat.getList().get(0).getSender();
selectedCallSignFurtherInfoPane.getChildren().add(generateFurtherInfoAbtSelectedCallsignBP(selectedCallSignInfoStageChatMember));
txt_chatMessageUserInput.requestFocus();
txt_chatMessageUserInput.selectEnd();
} catch (Exception exception) {
System.out.println("KST4CApp, <<<catched error>>>>: message sender is not in the userlist any more!");
}
@@ -3819,6 +3937,8 @@ public class Kst4ContestApplication extends Application {
txt_chatMessageUserInput.clear();
txt_chatMessageUserInput
.setText("/cq " + selectedChatMember.getList().get(0).getCallSign() + " ");
txt_chatMessageUserInput.requestFocus();
txt_chatMessageUserInput.selectEnd();
// System.out.println(
// "##################selected ChatMember: " + selectedChatMember.getList().get(0));
// selectedChatMemberList.clear();
@@ -3883,6 +4003,7 @@ public class Kst4ContestApplication extends Application {
chatMemberTableFilterQRBHBox.setPrefWidth(210);
TextField chatMemberTableFilterMaxQrbTF = new TextField(chatcontroller.getChatPreferences().getStn_maxQRBDefault() + "");
chatMemberTableFilterMaxQrbTF.setFocusTraversable(false);
ToggleButton tglBtnQRBEnable = new ToggleButton("Show only QRB [km] <= ");
tglBtnQRBEnable.selectedProperty().addListener(new ChangeListener<Boolean>() {
Predicate<ChatMember> maxQrbPredicate = new Predicate<ChatMember>() {
@@ -3933,6 +4054,7 @@ public class Kst4ContestApplication extends Application {
CheckBox chatMemberTableFilterQtfEnableChkbx = new CheckBox("Show only QTF:");
TextField chatMemberTableFilterQtfTF = new TextField(chatcontroller.getChatPreferences().getStn_qtfDefault()+"");
chatMemberTableFilterQtfTF.setFocusTraversable(false);
chatMemberTableFilterQtfTF.textProperty().addListener(new ChangeListener<String>() {
@Override
public void changed(ObservableValue<? extends String> observableValue, String oldValue, String newValue) {
@@ -4064,6 +4186,7 @@ public class Kst4ContestApplication extends Application {
TextField chatMemberTableFilterTextField = new TextField("Find...");
chatMemberTableFilterTextField.setFocusTraversable(false);
chatMemberTableFilterTextField.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> observableValue, Boolean aBoolean, Boolean t1) {
@@ -4685,6 +4808,7 @@ public class Kst4ContestApplication extends Application {
Label lblCallSign = new Label("Login-Callsign:");
// TextField txtFldCallSign = new TextField("dm5m");
TextField txtFldCallSign = new TextField(this.chatcontroller.getChatPreferences().getLoginCallSign());
txtFldCallSign.setFocusTraversable(false);
txtFldCallSign.textProperty().addListener(new ChangeListener<String>() {
@@ -4711,6 +4835,7 @@ public class Kst4ContestApplication extends Application {
Label lblName = new Label("Name in Chat:");
TextField txtFldName = new TextField(this.chatcontroller.getChatPreferences().getLoginName());
txtFldName.setFocusTraversable(false);
txtFldName.textProperty().addListener(new ChangeListener<String>() {
@@ -4724,6 +4849,8 @@ public class Kst4ContestApplication extends Application {
Label lblLocator = new Label("Locator in Chat:");
TextField txtFldLocator = new TextField(this.chatcontroller.getChatPreferences().getLoginLocator());
txtFldLocator.setFocusTraversable(false);
txtFldLocator.textProperty().addListener(new ChangeListener<String>() {
@@ -4774,6 +4901,7 @@ public class Kst4ContestApplication extends Application {
// labeledSeparator.setAlignment(Pos.CENTER);
TextField txtFldstn_antennaBeamWidthDeg = new TextField(this.chatcontroller.getChatPreferences().getStn_antennaBeamWidthDeg() + "");
txtFldstn_antennaBeamWidthDeg.setFocusTraversable(false);
txtFldstn_antennaBeamWidthDeg.setTooltip(new Tooltip("Your antenna beamwidth in DEG\n\nEnter correct values here due it´s used for path suggestions!!!"));
txtFldstn_antennaBeamWidthDeg.textProperty().addListener(new ChangeListener<String>() {
@@ -4794,6 +4922,7 @@ public class Kst4ContestApplication extends Application {
});
TextField txtFldstn_maxQRBDefault = new TextField(this.chatcontroller.getChatPreferences().getStn_maxQRBDefault() + "");
txtFldstn_maxQRBDefault.setFocusTraversable(false);
txtFldstn_maxQRBDefault.textProperty().addListener(new ChangeListener<String>() {
@@ -4814,6 +4943,7 @@ public class Kst4ContestApplication extends Application {
});
TextField txtFldstn_qtfDefault = new TextField(this.chatcontroller.getChatPreferences().getStn_qtfDefault() + "");
txtFldstn_qtfDefault.setFocusTraversable(false);
txtFldstn_qtfDefault.textProperty().addListener(new ChangeListener<String>() {
@@ -5030,6 +5160,7 @@ public class Kst4ContestApplication extends Application {
Label lblUDPByUCX = new Label("UDP-Port for message-listener (default is 12060)");
TextField txtFldUDPPortforUCX = new TextField("");
txtFldUDPPortforUCX.setFocusTraversable(false);
txtFldUDPPortforUCX
.setText(this.chatcontroller.getChatPreferences().getLogsynch_ucxUDPWkdCallListenerPort() + "");
txtFldUDPPortforUCX.focusedProperty().addListener(new ChangeListener<Boolean>() {
@@ -5211,6 +5342,7 @@ public class Kst4ContestApplication extends Application {
TextField txtFld_asServerNameString = new TextField(
chatcontroller.getChatPreferences().getAirScout_asServerNameString());
txtFld_asServerNameString.setFocusTraversable(false);
txtFld_asServerNameString.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue,
@@ -5236,6 +5368,7 @@ public class Kst4ContestApplication extends Application {
TextField txtFld_asClientNameString = new TextField(
chatcontroller.getChatPreferences().getAirScout_asClientNameString());
txtFld_asClientNameString.setFocusTraversable(false);
txtFld_asClientNameString.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue,
@@ -5261,6 +5394,7 @@ public class Kst4ContestApplication extends Application {
TextField txtFld_asUDPPortInt = new TextField(
chatcontroller.getChatPreferences().getAirScout_asCommunicationPort() + "");
txtFld_asUDPPortInt.setFocusTraversable(false);
txtFld_asUDPPortInt.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue,
@@ -5284,6 +5418,7 @@ public class Kst4ContestApplication extends Application {
});
TextField txtFld_asQRGInt = new TextField(chatcontroller.getChatPreferences().getAirScout_asBandString() + "");
txtFld_asQRGInt.setFocusTraversable(false);
txtFld_asQRGInt.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue,
@@ -5512,6 +5647,7 @@ public class Kst4ContestApplication extends Application {
grdPnlBeacon.add(new Label("Beacon message [<100 Chars]:"), 0, 2);
TextField txtFldBeaconText = new TextField(this.chatcontroller.getChatPreferences().getBcn_beaconText());
txtFldBeaconText.setFocusTraversable(false);
grdPnlBeacon.add(txtFldBeaconText, 1, 2);
txtFldBeaconText.focusedProperty().addListener(new ChangeListener<Boolean>() {
@Override