mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-03-30 04:31:04 +02:00
@@ -490,6 +490,9 @@ public class MessageBusManagementThread extends Thread {
|
|||||||
// if someone sent a message without being in the userlist (cause
|
// if someone sent a message without being in the userlist (cause
|
||||||
// on4kst missed implementing....), callsign will be marked
|
// on4kst missed implementing....), callsign will be marked
|
||||||
} else {
|
} else {
|
||||||
|
AirPlaneReflectionInfo preventNullpointerExc = new AirPlaneReflectionInfo();
|
||||||
|
preventNullpointerExc.setAirPlanesReachableCntr(0);
|
||||||
|
sender.setAirPlaneReflectInfo(preventNullpointerExc);
|
||||||
newMessage.setSender(sender); //my own call is the sender
|
newMessage.setSender(sender); //my own call is the sender
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -540,6 +543,7 @@ public class MessageBusManagementThread extends Thread {
|
|||||||
|
|
||||||
// System.out.println("message directed to: " + newMessage.getReceiver().getCallSign() + ". EQ?: " + this.client.getownChatMemberObject().getCallSign() + " sent by: " + newMessage.getSender().getCallSign().toUpperCase() + " -> EQ?: "+ this.client.getChatPreferences().getLoginCallSign().toUpperCase());
|
// System.out.println("message directed to: " + newMessage.getReceiver().getCallSign() + ". EQ?: " + this.client.getownChatMemberObject().getCallSign() + " sent by: " + newMessage.getSender().getCallSign().toUpperCase() + " -> EQ?: "+ this.client.getChatPreferences().getLoginCallSign().toUpperCase());
|
||||||
|
|
||||||
|
try {
|
||||||
if (newMessage.getReceiver().getCallSign()
|
if (newMessage.getReceiver().getCallSign()
|
||||||
.equals(this.client.getChatPreferences().getLoginCallSign())) {
|
.equals(this.client.getChatPreferences().getLoginCallSign())) {
|
||||||
|
|
||||||
@@ -547,19 +551,24 @@ public class MessageBusManagementThread extends Thread {
|
|||||||
|
|
||||||
System.out.println("message directed to me: " + newMessage.getReceiver().getCallSign() + ".");
|
System.out.println("message directed to me: " + newMessage.getReceiver().getCallSign() + ".");
|
||||||
|
|
||||||
} else if (newMessage.getSender().getCallSign().toUpperCase() // if you sent the message to another station, it will be sorted in to
|
} else if (newMessage.getSender().getCallSign().toUpperCase()
|
||||||
// the "to me message list" with modified messagetext, added rxers callsign
|
|
||||||
.equals(this.client.getChatPreferences().getLoginCallSign().toUpperCase())) {
|
.equals(this.client.getChatPreferences().getLoginCallSign().toUpperCase())) {
|
||||||
String originalMessage = newMessage.getMessageText();
|
String originalMessage = newMessage.getMessageText();
|
||||||
newMessage
|
newMessage
|
||||||
.setMessageText("(>" + newMessage.getReceiver().getCallSign() + ")" + originalMessage);
|
.setMessageText("(>" + newMessage.getReceiver().getCallSign() + ")" + originalMessage);
|
||||||
this.client.getLst_toMeMessageList().add(0, newMessage); // TODO:check
|
this.client.getLst_toMeMessageList().add(0, newMessage);
|
||||||
|
// if you sent the message to another station, it will be sorted in to
|
||||||
|
// the "to me message list" with modified messagetext, added rxers callsign
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.client.getLst_toOtherMessageList().add(0, newMessage);
|
this.client.getLst_toOtherMessageList().add(0, newMessage);
|
||||||
|
|
||||||
// System.out.println("MSGBS bgfx: tx call = " + newMessage.getSender().getCallSign() + " / rx call = " + newMessage.getReceiver().getCallSign());
|
// System.out.println("MSGBS bgfx: tx call = " + newMessage.getSender().getCallSign() + " / rx call = " + newMessage.getReceiver().getCallSign());
|
||||||
}
|
}
|
||||||
|
} catch (NullPointerException referenceDeletedByUserLeftChatDuringMessageprocessing) {
|
||||||
|
System.out.println("MSGBS bgfx, catched error: referenced user left the chat during messageprocessing: ");
|
||||||
|
referenceDeletedByUserLeftChatDuringMessageprocessing.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
// sdtout to me message-List
|
// sdtout to me message-List
|
||||||
|
|
||||||
@@ -613,24 +622,13 @@ public class MessageBusManagementThread extends Thread {
|
|||||||
} else {
|
} else {
|
||||||
/**
|
/**
|
||||||
* User is in the list...
|
* User is in the list...
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
this.client.getLst_chatMemberList().get(index).setFrequency(qrg);
|
this.client.getLst_chatMemberList().get(index).setFrequency(qrg);
|
||||||
System.out.println("[MSGBUSMGT:] Frequency for " + splittedMessageLine[3] + " setted: "
|
System.out.println("[MSGBUSMGT:] Frequency for " + splittedMessageLine[3] + " setted: "
|
||||||
+ locatedFrequencies);
|
+ locatedFrequencies);
|
||||||
|
|
||||||
// this.client.getLst_chatMemberList().
|
|
||||||
|
|
||||||
// ChatMember dummy = new ChatMember();
|
|
||||||
//
|
|
||||||
// dummy.setAirPlaneReflectInfo(new AirPlaneReflectionInfo()); //TODO: check if this is neccessary
|
|
||||||
// this.client.getLst_chatMemberList().add(dummy); // TODO: Bugfix for UI actualization, maybe we dont need that any more
|
|
||||||
// this.client.getLst_chatMemberList().remove(dummy);
|
|
||||||
// this.client.getLst_chatMemberList().sorted();
|
|
||||||
|
|
||||||
//
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Next: get frequency infos out of name?
|
// TODO: Next: get frequency infos out of name?
|
||||||
@@ -822,9 +820,13 @@ public class MessageBusManagementThread extends Thread {
|
|||||||
int index = checkListForChatMemberIndexByCallSign(this.client.getLst_chatMemberList(),
|
int index = checkListForChatMemberIndexByCallSign(this.client.getLst_chatMemberList(),
|
||||||
stateChangeMember);
|
stateChangeMember);
|
||||||
|
|
||||||
|
//-1 could be the case if mycall is processed
|
||||||
|
if (index != -1) {
|
||||||
this.client.getLst_chatMemberList().get(index).setName(stateChangeMember.getName());
|
this.client.getLst_chatMemberList().get(index).setName(stateChangeMember.getName());
|
||||||
this.client.getLst_chatMemberList().get(index).setQra(stateChangeMember.getQra());
|
this.client.getLst_chatMemberList().get(index).setQra(stateChangeMember.getQra());
|
||||||
this.client.getLst_chatMemberList().get(index).setState(stateChangeMember.getState());
|
this.client.getLst_chatMemberList().get(index).setState(stateChangeMember.getState());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// this.client.getChatMemberTable().get(stateChangeMember.getCallSign())
|
// this.client.getChatMemberTable().get(stateChangeMember.getCallSign())
|
||||||
// .setName(stateChangeMember.getName());
|
// .setName(stateChangeMember.getName());
|
||||||
|
|||||||
@@ -834,6 +834,7 @@ public class Kst4ContestApplication extends Application {
|
|||||||
public ObservableValue<String> call(CellDataFeatures<ChatMessage, String> cellDataFeatures) {
|
public ObservableValue<String> call(CellDataFeatures<ChatMessage, String> cellDataFeatures) {
|
||||||
SimpleStringProperty airPlaneInfo = new SimpleStringProperty();
|
SimpleStringProperty airPlaneInfo = new SimpleStringProperty();
|
||||||
|
|
||||||
|
try {
|
||||||
if (cellDataFeatures.getValue().getSender().getAirPlaneReflectInfo().getRisingAirplanes() == null) {
|
if (cellDataFeatures.getValue().getSender().getAirPlaneReflectInfo().getRisingAirplanes() == null) {
|
||||||
airPlaneInfo.setValue("nil");
|
airPlaneInfo.setValue("nil");
|
||||||
}
|
}
|
||||||
@@ -860,6 +861,9 @@ public class Kst4ContestApplication extends Application {
|
|||||||
|
|
||||||
airPlaneInfo.setValue(apInfoText);
|
airPlaneInfo.setValue(apInfoText);
|
||||||
}
|
}
|
||||||
|
} catch (NullPointerException thereIsNoApReflectionInfo) {
|
||||||
|
//e.g. in case of mycall it´s not possible to set!
|
||||||
|
}
|
||||||
|
|
||||||
return airPlaneInfo;
|
return airPlaneInfo;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user