1 /*
2  * Created on 11-Sep-2005
3  * Created by Paul Gardner
4  * Copyright (C) Azureus Software, Inc, All Rights Reserved.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * 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, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
17  *
18  */
19 
20 package org.gudy.azureus2.plugins.ui;
21 
22 public interface
23 UIManagerEvent
24 {
25 	public static final int MT_NONE			= 0x00000000;
26 	public static final int MT_OK			= 0x00000001;
27 	public static final int MT_CANCEL		= 0x00000002;
28 	public static final int MT_YES			= 0x00000004;
29 	public static final int MT_NO			= 0x00000008;
30 	public static final int MT_YES_DEFAULT	= 0x00000010;	// as for YES but makes it the default selection
31 	public static final int MT_NO_DEFAULT	= 0x00000020;	// as for NO but makes it the default selection
32 	public static final int MT_OK_DEFAULT	= 0x00000040;	// as for OK but makes it the default selection
33 
34 
35 	public static final int ET_SHOW_TEXT_MESSAGE				= 1;		// data is String[] - title, message, text
36 	public static final int ET_OPEN_TORRENT_VIA_FILE			= 2;		// data is File
37 	public static final int ET_OPEN_TORRENT_VIA_URL				= 3;		// data is Object[]{URL,URL,Boolean} - { torrent_url, referrer url, auto_download, Map request_properties}
38 	public static final int ET_PLUGIN_VIEW_MODEL_CREATED		= 4;		// data is PluginViewModel (or subtype)
39 	public static final int ET_PLUGIN_CONFIG_MODEL_CREATED		= 5;		// data is PluginConfigModel (or subtype)
40 	public static final int ET_COPY_TO_CLIPBOARD				= 6;		// data is String
41 	public static final int ET_PLUGIN_VIEW_MODEL_DESTROYED		= 7;		// data is PluginViewModel (or subtype)
42 	public static final int ET_PLUGIN_CONFIG_MODEL_DESTROYED	= 8;		// data is PluginConfigModel (or subtype)
43 	public static final int ET_OPEN_URL							= 9;		// data is URL
44 	public static final int ET_CREATE_TABLE_COLUMN				= 10;		// data is String[] - table_id, cell_id: result is TableColumn
45 	public static final int ET_ADD_TABLE_COLUMN					= 11;		// data is TableColumn previously created
46 	public static final int ET_ADD_TABLE_CONTEXT_MENU_ITEM		= 12;		// data is TableContextMenuItem
47 	public static final int ET_SHOW_CONFIG_SECTION		        = 13;		// data is String - section id
48 	public static final int ET_ADD_TABLE_CONTEXT_SUBMENU_ITEM	= 14;		// data is TableContextMenuItem[] - child, parent
49 	public static final int ET_ADD_MENU_ITEM					= 15;		// data is MenuItem
50 	public static final int ET_ADD_SUBMENU_ITEM		            = 16;		// data is MenuItem[] - child, parent
51 	public static final int ET_REMOVE_TABLE_CONTEXT_MENU_ITEM   = 17;       // data is MenuItem
52 	public static final int ET_REMOVE_TABLE_CONTEXT_SUBMENU_ITEM = 18;      // data is MenuItem[] - child, parent
53 	public static final int ET_REMOVE_MENU_ITEM                 = 19;       // data is MenuItem
54 	public static final int ET_REMOVE_SUBMENU_ITEM              = 20;       // data is MenuItem[] - child, parent
55 	public static final int ET_SHOW_MSG_BOX						= 21;		// data is Object[]{ String,String,Long} - title, message, MT options
56 	public static final int ET_OPEN_TORRENT_VIA_TORRENT			= 22;		// data is Torrent
57 	public static final int ET_FILE_SHOW                        = 23;       // data is File
58 	public static final int ET_FILE_OPEN                        = 24;       // data is File
59 	public static final int ET_REGISTER_COLUMN                  = 25;       // data is Class, String, TableColumnCreationListener
60 	public static final int ET_UNREGISTER_COLUMN                = 26;       // data is Class, String, TableColumnCreationListener
61 	public static final int ET_HIDE_ALL			                = 27;       // data is Boolean
62 
63 
64 	public static final int ET_CALLBACK_MSG_SELECTION			= 100;		// data is Long - MT_OK etc
65 
66 	public int
getType()67 	getType();
68 
69 	public Object
getData()70 	getData();
71 
72 	public void
setResult( Object result )73 	setResult(
74 		Object	result );
75 
76 	public Object
getResult()77 	getResult();
78 }
79