]> git.mxchange.org Git - jcore-swing.git/blob - src/org/mxchange/jcoreswing/client/gui/ClientFrame.java
0bb6c7683df33f2191e2540449d1b6e549fb1357
[jcore-swing.git] / src / org / mxchange / jcoreswing / client / gui / ClientFrame.java
1 /*
2  * Copyright (C) 2016 - 2022 Free Software Foundation
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17 package org.mxchange.jcoreswing.client.gui;
18
19 import java.io.IOException;
20 import org.mxchange.jcontacts.model.contact.Contact;
21 import org.mxchange.jcore.FrameworkInterface;
22 import org.mxchange.jcore.client.Client;
23 import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
24
25 /**
26  * An interface for applications with a Swing frame
27  * <p>
28  * @author Roland Häder<roland@mxchange.org>
29  */
30 public interface ClientFrame extends FrameworkInterface {
31
32         /**
33          * Shows the user the "add contact" form with some special text
34          * <p>
35          * @return Contact instance
36          */
37         Contact doEnterOwnData ();
38
39         /**
40          * Shutdown this frame
41          */
42         void doShutdown ();
43
44         /**
45          * Enables main window (frame)
46          */
47         void enableMainWindow ();
48
49         /**
50          * Setups the frame (and starts it). You have to call init() before you can
51          * call this method.
52          * <p>
53          * @param client Client instance
54          * <p>
55          * @throws java.io.IOException If an IO error was found
56          */
57         void setupFrame (final Client client) throws IOException;
58
59         /**
60          * Initializes frame
61          * <p>
62          * @throws org.mxchange.jcore.exceptions.FrameAlreadyInitializedException If
63          * this method has been called twice
64          */
65         void init () throws FrameAlreadyInitializedException;
66
67         /**
68          * Returns field isInitialized. This flag indicates whether this frame has
69          * been initialized or not.
70          * <p>
71          * @return Field isInitialized
72          */
73         boolean isInitialized ();
74
75         /**
76          * Logs any exceptions or errors
77          * <p>
78          * @param throwable Throwable
79          */
80         void logException (final Throwable throwable);
81
82         /**
83          * Shuts down application
84          */
85         void shutdownApplication ();
86
87 }