+ /**
+ * Reload backend options from System properties.
+ */
+ public void reloadOptions() {
+ for (Backend backend: backends) {
+ backend.reloadOptions();
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // MultiBackend -----------------------------------------------------------
+ // ------------------------------------------------------------------------
+
+ /**
+ * Add a backend to the list.
+ *
+ * @param backend the backend to add
+ */
+ public void addBackend(final Backend backend) {
+ backends.add(backend);
+ if (backend instanceof TWindowBackend) {
+ multiScreen.addScreen(((TWindowBackend) backend).getOtherScreen());
+ } else {
+ multiScreen.addScreen(backend.getScreen());
+ }
+ if (backend instanceof GenericBackend) {
+ ((GenericBackend) backend).abortOnDisconnect = false;
+ }
+ }
+
+ /**
+ * Remove a backend from the list.
+ *
+ * @param backend the backend to remove
+ */
+ public void removeBackend(final Backend backend) {
+ if (backends.size() > 1) {
+ if (backend instanceof TWindowBackend) {
+ multiScreen.removeScreen(((TWindowBackend) backend).getOtherScreen());
+ } else {
+ multiScreen.removeScreen(backend.getScreen());
+ }
+ backends.remove(backend);
+ }
+ }
+