blob: 494885d3a58991a092a2f60121de2f3f431b5206 [file] [log] [blame]
Simon Huntfb940112015-07-29 18:36:35 -07001/*
2 * Copyright 2015 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18package org.meowster.over;
19
20import org.onosproject.ui.UiTopoOverlay;
21import org.onosproject.ui.topo.PropertyPanel;
22import org.onosproject.ui.topo.TopoConstants.Glyphs;
23
24import static org.onosproject.ui.topo.TopoConstants.Properties.*;
25
26/**
27 * Our topology overlay.
28 */
29public class AppUiTopoOverlay extends UiTopoOverlay {
30
31 // NOTE: this must match the ID defined in topov.js
32 private static final String OVERLAY_ID = "meowster-overlay";
33
34 private static final String MY_TITLE = "I changed the title";
35 private static final String MY_VERSION = "Beta-1.0.0042";
36 private static final String FOO = "foo";
37 private static final String BAR = "bar";
38
39
40 public AppUiTopoOverlay() {
41 super(OVERLAY_ID);
42 }
43
44
45 @Override
46 public void modifySummary(PropertyPanel pp) {
47 pp.title("My App Rocks!")
48 .typeId(Glyphs.CROWN)
49 .removeProps(
50 TOPOLOGY_SSCS,
51 INTENTS,
52 TUNNELS,
53 FLOWS,
54 VERSION
55 )
56 .addProp(VERSION, MY_VERSION);
57
58 }
59
60 @Override
61 public void modifyDeviceDetails(PropertyPanel pp) {
62 pp.title(MY_TITLE);
63 pp.removeProps(LATITUDE, LONGITUDE);
64 pp.addButton(FOO).addButton(BAR);
65 }
66
67// TODO: override more methods, as required...
68
69}