Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2021 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -257,6 +257,16 @@ public void setSettings(AppSettings settings) {
}
}

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
@Override
public SystemListener getSystemListener() {
return listener;
}

@Override
public void setSystemListener(SystemListener listener) {
this.listener = listener;
Expand Down
9 changes: 8 additions & 1 deletion jme3-core/src/main/java/com/jme3/system/JmeContext.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2021 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -92,6 +92,13 @@ public enum Type {
*/
public void setSettings(AppSettings settings);

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
public SystemListener getSystemListener();

/**
* Sets the listener that will receive events relating to context
* creation, update, and destroy.
Expand Down
12 changes: 11 additions & 1 deletion jme3-core/src/main/java/com/jme3/system/NullContext.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2020 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -64,6 +64,16 @@ public Type getType() {
return Type.Headless;
}

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
@Override
public SystemListener getSystemListener() {
return listener;
}

@Override
public void setSystemListener(SystemListener listener){
this.listener = listener;
Expand Down
12 changes: 11 additions & 1 deletion jme3-desktop/src/main/java/com/jme3/system/AWTContext.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2018 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -149,6 +149,16 @@ public void setSettings(AppSettings settings) {
this.backgroundContext.setSettings(settings);
}

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
@Override
public SystemListener getSystemListener() {
return backgroundContext.getSystemListener();
}

@Override
public void setSystemListener(final SystemListener listener) {
backgroundContext.setSystemListener(listener);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2021 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -120,6 +120,16 @@ public Type getType() {
return Type.OffscreenSurface;
}

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
@Override
public SystemListener getSystemListener() {
return listener;
}

@Override
public void setSystemListener(SystemListener listener) {
this.listener = listener;
Expand Down
13 changes: 12 additions & 1 deletion jme3-ios/src/main/java/com/jme3/system/ios/IGLESContext.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2012 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -83,6 +83,17 @@ public void setSettings(AppSettings settings) {
}
}

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
@Override
public SystemListener getSystemListener() {
logger.log(Level.FINE, "IGLESContext getSystemListener");
return listener;
}

@Override
public void setSystemListener(SystemListener listener) {
logger.log(Level.FINE, "IGLESContext setSystemListener");
Expand Down
12 changes: 11 additions & 1 deletion jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglContext.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2022 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -91,6 +91,16 @@ public abstract class LwjglContext implements JmeContext {
protected LwjglPlatform clPlatform;
protected com.jme3.opencl.lwjgl.LwjglContext clContext;

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
@Override
public SystemListener getSystemListener() {
return listener;
}

@Override
public void setSystemListener(SystemListener listener) {
this.listener = listener;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2022 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -133,6 +133,16 @@ public abstract class LwjglContext implements JmeContext {

protected com.jme3.opencl.lwjgl.LwjglContext clContext;

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
@Override
public SystemListener getSystemListener() {
return listener;
}

@Override
public void setSystemListener(final SystemListener listener) {
this.listener = listener;
Expand Down
12 changes: 11 additions & 1 deletion jme3-vr/src/main/java/com/jme3/system/lwjgl/LwjglContextVR.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.jme3.system.lwjgl;

/*
* Copyright (c) 2009-2022 jMonkeyEngine
* Copyright (c) 2009-2023 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -79,6 +79,16 @@ public abstract class LwjglContextVR implements JmeContext {
protected Timer timer;
protected SystemListener listener;

/**
* Accesses the listener that receives events related to this context.
*
* @return the pre-existing instance
*/
@Override
public SystemListener getSystemListener() {
return listener;
}

@Override
public void setSystemListener(SystemListener listener) {
this.listener = listener;
Expand Down