From 50f6ae3407de95079d4036016e7065cfc35470ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Clermont=C3=A9?= Date: Sun, 27 Mar 2016 12:50:01 +0200 Subject: [PATCH] Added Class Tab. --- src/siba/cli/{Sibacli.java => SibaCLI.java} | 2 +- src/siba/gui/AboutDialog.java | 61 +++++++++++++++++ src/siba/gui/BackupPanel.java | 16 +++++ src/siba/gui/CheckPanel.java | 16 +++++ src/siba/gui/SibaGUI.java | 73 +++++++++++++++++++++ src/siba/gui/SibaGui.java | 6 -- 6 files changed, 167 insertions(+), 7 deletions(-) rename src/siba/cli/{Sibacli.java => SibaCLI.java} (53%) create mode 100644 src/siba/gui/AboutDialog.java create mode 100644 src/siba/gui/BackupPanel.java create mode 100644 src/siba/gui/CheckPanel.java create mode 100644 src/siba/gui/SibaGUI.java delete mode 100644 src/siba/gui/SibaGui.java diff --git a/src/siba/cli/Sibacli.java b/src/siba/cli/SibaCLI.java similarity index 53% rename from src/siba/cli/Sibacli.java rename to src/siba/cli/SibaCLI.java index 40c92a1..4f58aed 100644 --- a/src/siba/cli/Sibacli.java +++ b/src/siba/cli/SibaCLI.java @@ -1,6 +1,6 @@ package siba.cli; -public class Sibacli +public class SibaCLI { } diff --git a/src/siba/gui/AboutDialog.java b/src/siba/gui/AboutDialog.java new file mode 100644 index 0000000..740fe67 --- /dev/null +++ b/src/siba/gui/AboutDialog.java @@ -0,0 +1,61 @@ +package siba.gui; + +import java.awt.BorderLayout; +import java.awt.FlowLayout; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.border.EmptyBorder; + +public class AboutDialog extends JDialog +{ + + private final JPanel contentPanel = new JPanel(); + + /** + * Launch the application. + */ + public static void main(String[] args) + { + try + { + AboutDialog dialog = new AboutDialog(); + dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); + dialog.setVisible(true); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + + /** + * Create the dialog. + */ + public AboutDialog() + { + setBounds(100, 100, 450, 300); + getContentPane().setLayout(new BorderLayout()); + contentPanel.setLayout(new FlowLayout()); + contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); + getContentPane().add(contentPanel, BorderLayout.CENTER); + { + JPanel buttonPane = new JPanel(); + buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); + getContentPane().add(buttonPane, BorderLayout.SOUTH); + { + JButton okButton = new JButton("OK"); + okButton.setActionCommand("OK"); + buttonPane.add(okButton); + getRootPane().setDefaultButton(okButton); + } + { + JButton cancelButton = new JButton("Cancel"); + cancelButton.setActionCommand("Cancel"); + buttonPane.add(cancelButton); + } + } + } + +} diff --git a/src/siba/gui/BackupPanel.java b/src/siba/gui/BackupPanel.java new file mode 100644 index 0000000..b473cac --- /dev/null +++ b/src/siba/gui/BackupPanel.java @@ -0,0 +1,16 @@ +package siba.gui; + +import javax.swing.JPanel; + +public class BackupPanel extends JPanel +{ + + /** + * Create the panel. + */ + public BackupPanel() + { + + } + +} diff --git a/src/siba/gui/CheckPanel.java b/src/siba/gui/CheckPanel.java new file mode 100644 index 0000000..7629d55 --- /dev/null +++ b/src/siba/gui/CheckPanel.java @@ -0,0 +1,16 @@ +package siba.gui; + +import javax.swing.JPanel; + +public class CheckPanel extends JPanel +{ + + /** + * Create the panel. + */ + public CheckPanel() + { + + } + +} diff --git a/src/siba/gui/SibaGUI.java b/src/siba/gui/SibaGUI.java new file mode 100644 index 0000000..4a3c4f6 --- /dev/null +++ b/src/siba/gui/SibaGUI.java @@ -0,0 +1,73 @@ +package siba.gui; + +import java.awt.EventQueue; + +import javax.swing.JFrame; +import java.awt.Color; +import java.awt.Font; +import javax.swing.JTabbedPane; +import java.awt.BorderLayout; +import javax.swing.JPanel; + + +public class SibaGUI +{ + + private JFrame frmSimpleBackup; + + /** + * Launch the application. + */ + public static void main(String[] args) + { + EventQueue.invokeLater(new Runnable() + { + public void run() + { + try + { + SibaGUI window = new SibaGUI(); + window.frmSimpleBackup.setVisible(true); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the application. + */ + public SibaGUI() + { + initialize(); + } + + /** + * Initialize the contents of the frame. + */ + private void initialize() + { + frmSimpleBackup = new JFrame(); + frmSimpleBackup.getContentPane().setBackground(new Color(173, 255, 47)); + + JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); + frmSimpleBackup.getContentPane().add(tabbedPane, BorderLayout.CENTER); + + JPanel panel = new JPanel(); + panel.setBackground(new Color(152, 251, 152)); + tabbedPane.addTab("BackUp", null, panel, null); + + JPanel panel_1 = new JPanel(); + panel_1.setBackground(new Color(144, 238, 144)); + tabbedPane.addTab("Check", null, panel_1, null); + frmSimpleBackup.setFont(new Font("DejaVu Sans", Font.BOLD, 12)); + frmSimpleBackup.setForeground(new Color(0, 100, 0)); + frmSimpleBackup.setBackground(new Color(102, 205, 170)); + frmSimpleBackup.setTitle("Simple Backup"); + frmSimpleBackup.setBounds(100, 100, 450, 300); + frmSimpleBackup.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } +} diff --git a/src/siba/gui/SibaGui.java b/src/siba/gui/SibaGui.java deleted file mode 100644 index c2dbaab..0000000 --- a/src/siba/gui/SibaGui.java +++ /dev/null @@ -1,6 +0,0 @@ -package siba.gui; - -public class SibaGui -{ - -}