This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
/
FakeConnectionPlot.java
65 lines (57 loc) · 1.91 KB
/
FakeConnectionPlot.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*******************************************************************************
* Copyright (c) 2015 UT-Battelle, LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Jordan Deyton - Initial API and implementation and/or initial documentation
*
*******************************************************************************/
package org.eclipse.ice.viz.service.connections.test;
import java.io.IOException;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.ice.viz.service.IVizService;
import org.eclipse.ice.viz.service.connections.ConnectionPlot;
import org.eclipse.ice.viz.service.connections.ConnectionPlotRender;
import org.eclipse.swt.widgets.Composite;
/**
* This class provides a fake {@link ConnectionPlot}.
*
* @author Jordan Deyton
*
*/
public class FakeConnectionPlot extends ConnectionPlot<FakeClient> {
/**
* The plot types to use for this fake plot. Defaults to an empty map.
*/
public final Map<String, String[]> plotTypes = new HashMap<String, String[]>();
/**
* The default constructor.
*
* @param vizService
* The visualization service responsible for this plot.
*/
public FakeConnectionPlot(IVizService vizService) {
super(vizService);
}
/*
* Implements an abstract method from ConnectionPlot.
*/
@Override
protected ConnectionPlotRender<FakeClient> createConnectionPlotRender(
Composite parent) {
return new FakeConnectionPlotRender(parent, this);
}
/*
* Implements an abstract method from ConnectionPlot.
*/
@Override
protected Map<String, String[]> findPlotTypes(URI file)
throws IOException, Exception {
return plotTypes;
}
}