|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface UIService
The UIService offers generic access to the graphical user interface for all modules that would like to interact with the user.
Through the UIService all modules can add their own components in different menus, toolbars, etc. within the ui. Each UIService implementation should export its supported "plugable" containers - a set of Containers corresponding to different "places" in the application, where a module can add a component.
The UIService provides also methods that would allow to other modules to control the visibility, size and position of the main application window. Some of these methods are: setVisible, minimize, maximize, resize, move, etc.
A way to show different types of simple windows is provided to allow other modules to show different simple messages, like warning or error messages. In order to show a simple warning message, a module should invoke the getPopupDialog method and then one of the showXXX methods, which corresponds best to the required dialog.
Certain components within the GUI, like "AddContact" window for example,
could be also shown from outside the UI bundle. To make one of these
component exportable, the UIService implementation should attach to
it an WindowID. A window then could be shown, by invoking
getExportedWindow(WindowID) and then show. The
WindowID above should be obtained from
getSupportedExportedWindows.
| Method Summary | |
|---|---|
void |
addChatListener(ChatListener listener)
Registers a NewChatListener to be informed when new Chats are created. |
void |
addWindowListener(WindowListener l)
Adds the given WindowListener listening for events triggered by the main UIService component. |
void |
bringToFront()
Brings the focus to the main application window. |
void |
createCall(String[] participants)
Creates a new Call with a specific set of participants. |
ContactList |
createContactListComponent()
Creates a contact list component. |
WizardContainer |
getAccountRegWizardContainer()
Returns the WizardContainer for the current UIService implementation. |
Collection<Chat> |
getAllChats()
Provides all currently instantiated Chats. |
Chat |
getChat(ChatRoom chatRoom)
Returns the Chat corresponding to the given ChatRoom. |
Chat |
getChat(Contact contact)
Returns the Chat corresponding to the given Contact. |
MetaContact |
getChatContact(Chat chat)
Get the MetaContact corresponding to the chat. |
List<Chat> |
getChats()
Returns a list of all open Chats |
ConfigurationContainer |
getConfigurationContainer()
Returns the ConfigurationContainer associated with this UIService. |
CreateAccountWindow |
getCreateAccountWindow()
Returns the create account window. |
Chat |
getCurrentChat()
Returns the selected Chat. |
String |
getCurrentPhoneNumber()
Returns the phone number currently entered in the phone number field. |
SecurityAuthority |
getDefaultSecurityAuthority(ProtocolProviderService protocolProvider)
Returns a default implementation of the SecurityAuthority interface that can be used by non-UI components that would like to launch the registration process for a protocol provider. |
boolean |
getExitOnMainWindowClose()
Returns TRUE if the application could be exited by closing the main application window, otherwise returns FALSE. |
ExportedWindow |
getExportedWindow(WindowID windowID)
Returns an exported window given by the WindowID. |
ExportedWindow |
getExportedWindow(WindowID windowID,
Object[] params)
Returns an exported window given by the WindowID. |
Point |
getLocation()
Returns the current location of the main application window. |
PopupDialog |
getPopupDialog()
Returns a configurable popup dialog, that could be used to show either a warning message, error message, information message, etc. |
Dimension |
getSize()
Returns the size of the main application window. |
Iterator<Container> |
getSupportedContainers()
Returns an iterator over a set containing containerID-s pointing to containers supported by the current UI implementation. |
Iterator<WindowID> |
getSupportedExportedWindows()
Returns an iterator over a set of windowID-s. |
boolean |
isContainerSupported(Container containderID)
Checks if the container with the given Container is supported from the current UI implementation. |
boolean |
isExportedWindowSupported(WindowID windowID)
Checks if a window with the given WindowID is contained in the current UI implementation. |
boolean |
isVisible()
Returns TRUE if the application is visible and FALSE otherwise. |
void |
maximize()
Maximizes the main application window. |
void |
minimize()
Minimizes the main application window. |
void |
move(int x,
int y)
Moves the main application window to the given coordinates. |
void |
removeChatListener(ChatListener listener)
Removes the registration of a NewChatListener. |
void |
removeWindowListener(WindowListener l)
Removes the given WindowListener from the list of registered listener. |
void |
repaintUI()
Repaints and revalidates the whole UI. |
void |
resize(int width,
int height)
Resizes the main application window with the given width and height. |
void |
restore()
Restores the main application window. |
void |
setConfigurationWindowVisible(boolean visible)
Deprecated. instead use getConfigurationContainer().setVisible(visible) |
void |
setCurrentPhoneNumber(String phoneNumber)
Sets the phone number in the phone number field. |
void |
setExitOnMainWindowClose(boolean exitOnClose)
Sets the exitOnClose property. |
void |
setLocation(int x,
int y)
Locates the main application window to the new x and y coordinates. |
void |
setSize(int width,
int height)
Sets the size of the main application window. |
void |
setVisible(boolean visible)
Shows or hides the main application window depending on the value of parameter visible. |
void |
startChat(String[] participants)
Starts a new Chat with a specific set of participants. |
boolean |
useMacOSXScreenMenuBar()
Determines whether the Mac OS X screen menu bar is being used by the UI for its main menu instead of the Windows-like menu bars at the top of the windows. |
| Method Detail |
|---|
boolean isVisible()
true if the application is visible and
false otherwise.setVisible(boolean)void setVisible(boolean visible)
visible. Meant to be used by the systray when it
needs to show or hide the application.
visible - if true, shows the main application window;
otherwise, hides the main application window.isVisible()Point getLocation()
void setLocation(int x,
int y)
x - The new x coordinate.y - The new y coordinate.Dimension getSize()
void setSize(int width,
int height)
width - The width of the window.height - The height of the window.void minimize()
void maximize()
void restore()
void resize(int width,
int height)
width - The new width.height - The new height.
void move(int x,
int y)
x - The x coordinate.y - The y coordinate.void bringToFront()
void setExitOnMainWindowClose(boolean exitOnClose)
exitOnClose - When TRUE, the user could exit the application by
simply closing the main application window (by clicking the X
button or pressing Alt-F4). When set to FALSE the main
application window will be only hidden.boolean getExitOnMainWindowClose()
ExportedWindow getExportedWindow(WindowID windowID)
throws IllegalArgumentException
windowID - One of the WINDOW_XXX WindowID-s.
IllegalArgumentException - if the specified windowID is
not recognized by the implementation (note that
implementations MUST properly handle all WINDOW_XXX ID-s.
ExportedWindow getExportedWindow(WindowID windowID,
Object[] params)
throws IllegalArgumentException
windowID - One of the WINDOW_XXX WindowID-s.params - The parameters to be passed to the returned exported
window.
IllegalArgumentException - if the specified windowID is
not recognized by the implementation (note that
implementations MUST properly handle all WINDOW_XXX ID-s.PopupDialog getPopupDialog()
PopupDialog.PopupDialogChat getChat(Contact contact)
contact - the Contact for which the searched chat is about.
Chat getChat(ChatRoom chatRoom)
chatRoom - the ChatRoom for which the searched chat is
about.
List<Chat> getChats()
MetaContact getChatContact(Chat chat)
chat - The chat to get the MetaContact from
Chat getCurrentChat()
String getCurrentPhoneNumber()
void setCurrentPhoneNumber(String phoneNumber)
phoneNumber - the phone number to enter.SecurityAuthority getDefaultSecurityAuthority(ProtocolProviderService protocolProvider)
protocolProvider - the ProtocolProviderService for which
the authentication window is about.
Iterator<WindowID> getSupportedExportedWindows()
boolean isExportedWindowSupported(WindowID windowID)
windowID - one of the WindowID-s, defined in the
ExportedWindow interface.
true if the component with the given
WindowID is contained in the current UI implementation,
false otherwise.WizardContainer getAccountRegWizardContainer()
Iterator<Container> getSupportedContainers()
boolean isContainerSupported(Container containderID)
containderID - One of the CONTAINER_XXX Container-s.
true if the container with the given
Container is supported from the current UI
implementation, false otherwise.boolean useMacOSXScreenMenuBar()
A common use of the returned indicator is for the purposes of platform-sensitive UI since Mac OS X employs a single screen menu bar, Windows and Linux/GTK+ use per-window menu bars and it is inconsistent on Mac OS X to have the Window-like menu bars.
@Deprecated void setConfigurationWindowVisible(boolean visible)
The method hides the implementation-specific details of the configuration window from its clients and allows the UI to completely control, for example, how many instances of it are visible at one and the same time.
visible - true to show the "Tools > Settings"
configuration window; false to hide itConfigurationContainer getConfigurationContainer()
CreateAccountWindow getCreateAccountWindow()
void addWindowListener(WindowListener l)
l - the WindowListener to addvoid removeWindowListener(WindowListener l)
l - the WindowListener to removeCollection<Chat> getAllChats()
void addChatListener(ChatListener listener)
listener - listener to be registeredvoid removeChatListener(ChatListener listener)
listener - listener to be unregisteredvoid repaintUI()
void createCall(String[] participants)
participants - an array of String values specifying the
participants to be included into the newly created Callvoid startChat(String[] participants)
participants - an array of String values specifying the
participants to be included into the newly created ChatContactList createContactListComponent()
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||