blob: a23b6c5dc24d051d266f7d837675be048b8f3aa6 [file] [log] [blame]
Francesco Furfariec7e1752006-10-02 13:37:04 +00001/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
Francesco Furfari91af5da2006-04-04 23:44:23 +00009 *
Francesco Furfariec7e1752006-10-02 13:37:04 +000010 * http://www.apache.org/licenses/LICENSE-2.0
Francesco Furfari91af5da2006-04-04 23:44:23 +000011 *
Francesco Furfariec7e1752006-10-02 13:37:04 +000012 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
Francesco Furfari91af5da2006-04-04 23:44:23 +000018 */
19
20package org.apache.felix.upnp.tester;
21
22
23import javax.swing.*;
24
25import org.apache.felix.upnp.tester.discovery.*;
26import org.apache.felix.upnp.tester.gui.*;
27
Francesco Furfarif2a67912006-07-17 17:08:02 +000028/*
Karl Paulsd312acc2007-06-18 20:38:33 +000029* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
Francesco Furfarif2a67912006-07-17 17:08:02 +000030*/
Francesco Furfari91af5da2006-04-04 23:44:23 +000031public class Mediator {
32 static PropertiesViewer props;
33 static JTree tree;
34 static JFrame frame;
35 static DriverProxy driverProxy;
36 static RootDeviceListener rootDeviceListener;
37 static ControlPoint controlPoint;
38 static TreeViewer treeViewer;
39
40
41 public static void setPropertiesViewer(PropertiesViewer props){
42 Mediator.props=props;
43 }
44 public static PropertiesViewer getPropertiesViewer(){
45 return props;
46 }
47
48 public static void setUPnPDeviceTree(JTree tree){
49 Mediator.tree=tree;
50 }
51 public static JTree getUPnPDeviceTree(){
52 return tree;
53 }
54
55 public static void setTreeViewer(TreeViewer treeViewer){
56 Mediator.treeViewer=treeViewer;
57 }
58 public static TreeViewer getTreeViewer(){
59 return treeViewer;
60 }
61
62 public static void setMainFrame(JFrame frame){
63 Mediator.frame=frame;
64 }
65 public static JFrame getMainFrame(){
66 return frame;
67 }
68 public static void setControlPoint(ControlPoint controlPoint){
69 Mediator.controlPoint=controlPoint;
70 }
71 public static ControlPoint getControlPoint(){
72 return controlPoint;
73 }
74
75 public static void setDriverProxy(DriverProxy driverProxy) {
76 Mediator.driverProxy = driverProxy;
77 }
78
79 public static DriverProxy getDriverProxy(){
80 return driverProxy;
81 }
82
83 public static void setRootDeviceListener(RootDeviceListener listener) {
84 Mediator.rootDeviceListener = listener;
85 }
86
87 public static RootDeviceListener getRootDeviceListener(){
88 return rootDeviceListener;
89 }
90}