2 * Copyright (C) 2016 - 2022 Free Software Foundation
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.
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.
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/>.
17 package org.mxchange.jcoreswing.client.gui;
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;
26 * An interface for applications with a Swing frame
28 * @author Roland Häder<roland@mxchange.org>
30 public interface ClientFrame extends FrameworkInterface {
33 * Shows the user the "add contact" form with some special text
35 * @return Contact instance
37 Contact doEnterOwnData ();
45 * Enables main window (frame)
47 void enableMainWindow ();
50 * Setups the frame (and starts it). You have to call init() before you can
53 * @param client Client instance
55 * @throws java.io.IOException If an IO error was found
57 void setupFrame (final Client client) throws IOException;
62 * @throws org.mxchange.jcore.exceptions.FrameAlreadyInitializedException If
63 * this method has been called twice
65 void init () throws FrameAlreadyInitializedException;
68 * Returns field isInitialized. This flag indicates whether this frame has
69 * been initialized or not.
71 * @return Field isInitialized
73 boolean isInitialized ();
76 * Logs any exceptions or errors
78 * @param throwable Throwable
80 void logException (final Throwable throwable);
83 * Shuts down application
85 void shutdownApplication ();