Commit c57c07b11021bad60e661e975cfec8ec6f70d7bc
1 parent
3d80f3c3
Exists in
master
Add the bottom bar, containing status bar and Send button.
Showing
2 changed files
with
56 additions
and
0 deletions
Show diff stats
src/main/java/eu/omp/irap/vespa/epntapclient/view/BottomBar.java
0 → 100644
... | ... | @@ -0,0 +1,44 @@ |
1 | +/* | |
2 | + * This file is a part of EpnTAPClient. | |
3 | + * This program aims to provide EPN-TAP support for software clients, like CASSIS spectrum analyzer. | |
4 | + * See draft specifications: https://voparis-confluence.obspm.fr/pages/viewpage.action?pageId=559861 | |
5 | + * Copyright (C) 2016 Institut de Recherche en Astrophysique et Planétologie. | |
6 | + * | |
7 | + * This program is free software: you can | |
8 | + * redistribute it and/or modify it under the terms of the GNU General Public License as published | |
9 | + * by the Free Software Foundation, either version 3 of the License, or (at your option) any later | |
10 | + * version. This program is distributed in the hope that it will be useful, but WITHOUT ANY | |
11 | + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | |
12 | + * PURPOSE. See the GNU General Public License for more details. You should have received a copy of | |
13 | + * the GNU General Public License along with this program. If not, see | |
14 | + * <http://www.gnu.org/licenses/>. | |
15 | + */ | |
16 | + | |
17 | +package eu.omp.irap.vespa.epntapclient.view; | |
18 | + | |
19 | +import java.awt.BorderLayout; | |
20 | +import java.util.logging.Logger; | |
21 | + | |
22 | +import javax.swing.JButton; | |
23 | +import javax.swing.JLabel; | |
24 | +import javax.swing.JPanel; | |
25 | + | |
26 | +/** | |
27 | + * @author N. Jourdane | |
28 | + */ | |
29 | +public class BottomBar extends JPanel { | |
30 | + /** The logger for the class BottomBar. */ | |
31 | + private static final Logger logger = Logger.getLogger(BottomBar.class.getName()); | |
32 | + JLabel infoLabel; | |
33 | + | |
34 | + BottomBar(EpnTapMainView mainView) { | |
35 | + setLayout(new BorderLayout()); | |
36 | + infoLabel = new JLabel(); | |
37 | + this.add(infoLabel); | |
38 | + this.add(new JButton("Get File"), BorderLayout.EAST); | |
39 | + } | |
40 | + | |
41 | + public void setInfoText(String infoText) { | |
42 | + infoLabel.setText(infoText); | |
43 | + } | |
44 | +} | ... | ... |
src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java
... | ... | @@ -48,6 +48,9 @@ public class EpnTapMainView extends JPanel { |
48 | 48 | /** The JPanel where the user put requests. */ |
49 | 49 | private RequestView requestView; |
50 | 50 | |
51 | + /** The JPanel where the user put requests. */ | |
52 | + private BottomBar bottomBar; | |
53 | + | |
51 | 54 | /** The main EPN-TAP main controller */ |
52 | 55 | private EpnTapController controller; |
53 | 56 | |
... | ... | @@ -82,6 +85,7 @@ public class EpnTapMainView extends JPanel { |
82 | 85 | this.servicesView = servicesView; |
83 | 86 | this.resultsView = resultsView; |
84 | 87 | this.requestView = new RequestView(this); |
88 | + this.bottomBar = new BottomBar(this); | |
85 | 89 | |
86 | 90 | setLayout(new BorderLayout()); |
87 | 91 | buildWindow(); |
... | ... | @@ -124,6 +128,13 @@ public class EpnTapMainView extends JPanel { |
124 | 128 | } |
125 | 129 | |
126 | 130 | /** |
131 | + * @return The JPanel where the list of services is displayed. | |
132 | + */ | |
133 | + public BottomBar getBottomBar() { | |
134 | + return bottomBar; | |
135 | + } | |
136 | + | |
137 | + /** | |
127 | 138 | * Build and fill the GUI. |
128 | 139 | */ |
129 | 140 | public void buildWindow() { |
... | ... | @@ -145,6 +156,7 @@ public class EpnTapMainView extends JPanel { |
145 | 156 | |
146 | 157 | JSplitPane mainPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, northPanel, resultsView); |
147 | 158 | add(mainPanel, BorderLayout.CENTER); |
159 | + add(bottomBar, BorderLayout.SOUTH); | |
148 | 160 | } |
149 | 161 | |
150 | 162 | /** | ... | ... |