Official Website of Peeranha42 Peeranha42

Peeranha42
HOME

ABOUT
peeranha42
news
team

DOWNLOAD

DOCUMENTATION
description
handbook
tutorials
api
license

COMMUNITY
forum
bugs

CONTACT

Universität Bremen
 

Using the P42 GUI

Peeranha42 offers a default GUI-Manager with the possibility to display one or more GUI-panels in a common tabbed window or each GUIpanel in an own frame.

Most public functions can be called with "P42_gui_default.[function()]". Since there is no sense in instantiating more than one user interface, the public functions (to be used by the Plugins) are static. The constructor itself is private and invoked indirectly by a public static method which checks that there isn't another instantiation running yet before actually invoking it.

To integrate an own GUI-panel in the common GUI, a developer just has to use a P42_application_pane. This is an extended class from javax.swing.Jpanel and can be either still extended or simply instantiated.

The swing components and layout inside the panel are completely up to the plugin programmer. The panel(s) shall then be added to a dynamic list and this list added to the GUI-manager.

After use, e.g. when the stop () method of the plugin is invoked, the panels that aren't needed shall be removed. Bellow there is a short list of the most important methods needed by plugin developers for using the common GUI. For more detailed information about the respective methods, constructors or classes, please refer to the online APIdocumentation. The constructors from the P42_application_pane:

public P42_application_pane(String title, 
				int state, 
				PluginID pid)

The public methods from the P42_application_pane:

public PluginID getPluginID()
public void setPluginID(PluginID pid)
public String getTitle()
public int getPreferredState()
public void setPreferredState(int state)

The public field constants from the P42_default_gui:

public static final int NON_DETACHEABLE public static final int ATTACHED public static final int DETACHED

The public methods from the P42_default_gui:

public static void startGUI()
public static void main(String args[])
	//(intended to start just the GUI
for debugging purposes)
public static void addAppPanes(final Vector tempApps
public static void removeAppPanes(final Vector tempApps)
public static void removeAppPanes(final PluginID pId)
public static boolean addPrefPanels(PluginID pid,
	JPanel p_panels[])

>> back
 
Latest News
01.07.2005 : Release of Peeranha42 1.3 and P42 Chat 1.2

29.06.2005 : Release of P42 Programer's Guide

13.06.2005 : Release of Peeranha42 1.2.1

09.06.2005 : Release of Peeranha42 1.2, P42 Chat 1.1 and P42 Pirate Radio 0.2.5

07.06.2005 : Release of P42 Chess 1.0.1, P42 Filesharing 1.0, P42 GameLobby 0.6 and P42 Peerbay 0.4

22.05.2005 : Release of Peeranha42 1.1, P42 Chat 1.0, P42 Chess 1.0 and P42 Filesharing 0.9

16.05.2005 : Release of P42 Chat 0.9.2 and initial release of P42 Peerbay 0.3

newsarchiv

SourceForge.net

printable version | imprint | disclaimer | contact
© Copyright 2005 - University Bremen, Germany. All rights reserved.