Francesco Furfari | ec7e175 | 2006-10-02 13:37:04 +0000 | [diff] [blame] | 1 | /*
|
| 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 Furfari | 91af5da | 2006-04-04 23:44:23 +0000 | [diff] [blame] | 9 | *
|
Francesco Furfari | ec7e175 | 2006-10-02 13:37:04 +0000 | [diff] [blame] | 10 | * http://www.apache.org/licenses/LICENSE-2.0
|
Francesco Furfari | 91af5da | 2006-04-04 23:44:23 +0000 | [diff] [blame] | 11 | *
|
Francesco Furfari | ec7e175 | 2006-10-02 13:37:04 +0000 | [diff] [blame] | 12 | * 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 Furfari | 91af5da | 2006-04-04 23:44:23 +0000 | [diff] [blame] | 18 | */
|
| 19 |
|
| 20 | package org.apache.felix.upnp.tester;
|
| 21 |
|
| 22 |
|
| 23 | import javax.swing.*;
|
| 24 |
|
| 25 | import org.apache.felix.upnp.tester.discovery.*;
|
| 26 | import org.apache.felix.upnp.tester.gui.*;
|
| 27 |
|
Francesco Furfari | f2a6791 | 2006-07-17 17:08:02 +0000 | [diff] [blame] | 28 | /*
|
Karl Pauls | d312acc | 2007-06-18 20:38:33 +0000 | [diff] [blame^] | 29 | * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
|
Francesco Furfari | f2a6791 | 2006-07-17 17:08:02 +0000 | [diff] [blame] | 30 | */
|
Francesco Furfari | 91af5da | 2006-04-04 23:44:23 +0000 | [diff] [blame] | 31 | public 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 | }
|