From a84cb3ecc6e7f31e1a2ec2989e6fcb6691fa2f72 Mon Sep 17 00:00:00 2001 From: Yana Stamcheva Date: Tue, 12 Dec 2006 16:55:22 +0000 Subject: [PATCH] implements now ApplicationWIndow --- .../impl/gui/main/message/ChatPanel.java | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/message/ChatPanel.java b/src/net/java/sip/communicator/impl/gui/main/message/ChatPanel.java index 822e6a99a..a332d0e0b 100644 --- a/src/net/java/sip/communicator/impl/gui/main/message/ChatPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/message/ChatPanel.java @@ -40,7 +40,7 @@ */ public class ChatPanel extends JPanel - implements ExportedDialog, + implements ApplicationWindow, ChatConversationContainer { @@ -635,7 +635,7 @@ public PresenceStatus getDefaultContactStatus() { /** - * Implements the ExportedDialog.isDialogVisible method, to + * Implements the ApplicationWindow.isVisible method, to * check whether this chat panel is currently visible. * @return true if this chat panel is currently visible, * false otherwise. @@ -645,10 +645,10 @@ public boolean isDialogVisible() { } /** - * Implements the ExportedDialog.showDialog method, to + * Implements the ApplicationWindow.show method, to * make a chat panel visible. */ - public void showDialog() { + public void show() { if(Constants.TABBED_CHAT_WINDOW) { if(!chatWindow.containsContactChat(this)) @@ -665,10 +665,10 @@ public void showDialog() { } /** - * Implements the ExportedDialog.hideDialog method, to - * hide a chat panel. + * Implements the ApplicationWindow.hide method. Hides the chat + * panel. */ - public void hideDialog() { + public void hide() { this.isVisible = false; if(Constants.TABBED_CHAT_WINDOW) { @@ -680,25 +680,43 @@ public void hideDialog() { } /** - * Implements the ExportedDialog.resizeDialog method, to - * resize the chat window to the given width and height. + * Implements the ApplicationWindow.resize method. Resizes the + * chat window to the given width and height. * @param width The new width to set. * @param height The new height to set. */ - public void resizeDialog(int width, int height) { + public void resize(int width, int height) { this.chatWindow.setSize(width, height); } /** - * Implements the ExportedDialog.moveDialog method, to - * move the chat window to the given x and y coordinates. + * Implements the ApplicationWindow.move method. Moves + * the chat window to the given x and y coordinates. * @param x The x coordinate. * @param y The y coordinate. */ - public void moveDialog(int x, int y) { + public void move(int x, int y) { this.chatWindow.setLocation(x, y); } + /** + * Implements the ApplicationWindow.minimize method. Minimizes + * the chat window. + */ + public void minimize() + { + this.chatWindow.setState(JFrame.ICONIFIED); + } + + /** + * Implements the ApplicationWindow.maximize method. Maximizes + * the chat window. + */ + public void maximize() + { + this.chatWindow.setState(JFrame.MAXIMIZED_BOTH); + } + /** * Sets the chat isVisible variable to true or * false to indicate that this chat panel is visible or @@ -813,4 +831,5 @@ public void renameContact(String newName) } } + }