KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > columba > core > charset > CharsetOwnerInterface


1 // The contents of this file are subject to the Mozilla Public License Version
2
// 1.1
3
//(the "License"); you may not use this file except in compliance with the
4
//License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
5
//
6
//Software distributed under the License is distributed on an "AS IS" basis,
7
//WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
8
//for the specific language governing rights and
9
//limitations under the License.
10
//
11
//The Original Code is "The Columba Project"
12
//
13
//The Initial Developers of the Original Code are Frederik Dietz and Timo
14
// Stich.
15
//Portions created by Frederik Dietz and Timo Stich are Copyright (C) 2003.
16
//
17
//All Rights Reserved.undation, Inc., 59 Temple Place - Suite 330, Boston, MA
18
// 02111-1307, USA.
19
package org.columba.core.charset;
20
21 import java.nio.charset.Charset JavaDoc;
22
23
24 /**
25  * Should be implemented by objects encapsulating a charset. Enables
26  * interested objects to register listeners.
27  */

28 public interface CharsetOwnerInterface {
29     /**
30  * Returns the currently chosen charset. This method may return null
31  * if Columba should try to autodetect the charset.
32  */

33     public abstract Charset JavaDoc getCharset();
34
35     /**
36  * Sets the currently active charset. This method must notify all
37  * registered CharacterListener instances. If null is passed, the
38  * charset will be determined automatically.
39  */

40     public abstract void setCharset(Charset JavaDoc charset);
41
42     /**
43  * Registers a listener to get notified whenever the charset changes.
44  */

45     public abstract void addCharsetListener(CharsetListener l);
46
47     /**
48  * Unregisters a previously registered CharacterListener instance.
49  */

50     public abstract void removeCharsetListener(CharsetListener l);
51 }
52
Popular Tags