From c57c07b11021bad60e661e975cfec8ec6f70d7bc Mon Sep 17 00:00:00 2001 From: Nathanael Jourdane Date: Fri, 11 Mar 2016 12:29:44 +0100 Subject: [PATCH] Add the bottom bar, containing status bar and Send button. --- src/main/java/eu/omp/irap/vespa/epntapclient/view/BottomBar.java | 44 ++++++++++++++++++++++++++++++++++++++++++++ src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java | 12 ++++++++++++ 2 files changed, 56 insertions(+), 0 deletions(-) create mode 100644 src/main/java/eu/omp/irap/vespa/epntapclient/view/BottomBar.java diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/view/BottomBar.java b/src/main/java/eu/omp/irap/vespa/epntapclient/view/BottomBar.java new file mode 100644 index 0000000..a0d364a --- /dev/null +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/view/BottomBar.java @@ -0,0 +1,44 @@ +/* + * This file is a part of EpnTAPClient. + * This program aims to provide EPN-TAP support for software clients, like CASSIS spectrum analyzer. + * See draft specifications: https://voparis-confluence.obspm.fr/pages/viewpage.action?pageId=559861 + * Copyright (C) 2016 Institut de Recherche en Astrophysique et Planétologie. + * + * This program is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public License as published + * by the Free Software Foundation, either version 3 of the License, or (at your option) any later + * version. This program is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. You should have received a copy of + * the GNU General Public License along with this program. If not, see + * . + */ + +package eu.omp.irap.vespa.epntapclient.view; + +import java.awt.BorderLayout; +import java.util.logging.Logger; + +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; + +/** + * @author N. Jourdane + */ +public class BottomBar extends JPanel { + /** The logger for the class BottomBar. */ + private static final Logger logger = Logger.getLogger(BottomBar.class.getName()); + JLabel infoLabel; + + BottomBar(EpnTapMainView mainView) { + setLayout(new BorderLayout()); + infoLabel = new JLabel(); + this.add(infoLabel); + this.add(new JButton("Get File"), BorderLayout.EAST); + } + + public void setInfoText(String infoText) { + infoLabel.setText(infoText); + } +} diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java b/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java index f0b88d6..25c22b9 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/view/EpnTapMainView.java @@ -48,6 +48,9 @@ public class EpnTapMainView extends JPanel { /** The JPanel where the user put requests. */ private RequestView requestView; + /** The JPanel where the user put requests. */ + private BottomBar bottomBar; + /** The main EPN-TAP main controller */ private EpnTapController controller; @@ -82,6 +85,7 @@ public class EpnTapMainView extends JPanel { this.servicesView = servicesView; this.resultsView = resultsView; this.requestView = new RequestView(this); + this.bottomBar = new BottomBar(this); setLayout(new BorderLayout()); buildWindow(); @@ -124,6 +128,13 @@ public class EpnTapMainView extends JPanel { } /** + * @return The JPanel where the list of services is displayed. + */ + public BottomBar getBottomBar() { + return bottomBar; + } + + /** * Build and fill the GUI. */ public void buildWindow() { @@ -145,6 +156,7 @@ public class EpnTapMainView extends JPanel { JSplitPane mainPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, northPanel, resultsView); add(mainPanel, BorderLayout.CENTER); + add(bottomBar, BorderLayout.SOUTH); } /** -- libgit2 0.21.2