2 * Copyright (C) 2015 Roland Haeder
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.jcore.client.gui;
19 import java.io.IOException;
20 import org.mxchange.jcore.FrameworkInterface;
21 import org.mxchange.jcore.client.Client;
22 import org.mxchange.jcore.contact.Contact;
23 import org.mxchange.jcore.exceptions.BadTokenException;
24 import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
27 * An interface for applications with a frame
29 * @author Roland Haeder
31 public interface ClientFrame extends FrameworkInterface {
34 * Shows the user the "add contact" form with some special text
36 * @return Contact instance
38 public Contact doEnterOwnData ();
43 public void doShutdown ();
46 * Enables main window (frame)
48 public void enableMainWindow ();
51 * Setups the frame (and starts it). You have to call init() before you can
54 * @param client Client instance
55 * @throws java.io.IOException If an IO error was found
56 * @throws org.mxchange.jcore.exceptions.BadTokenException If a bad token was found
58 public void setupFrame (final Client client) throws IOException, BadTokenException;
64 * org.mxchange.jcore.exceptions.FrameAlreadyInitializedException If
65 * this method has been called twice
67 public void init () throws FrameAlreadyInitializedException;
70 * Returns field isInitialized. This flag indicates whether this frame has
71 * been initialized or not.
73 * @return Field isInitialized
75 public boolean isInitialized ();
78 * Shuts down application
80 public void shutdownApplication ();