ter.util
Class DictionnaryWordStyle

java.lang.Object
  |
  +--ter.util.DictionnaryWordStyle

public class DictionnaryWordStyle
extends java.lang.Object

Title: DictionnaryWordStyle

Description: this class represent a dictionnary of words that are associated with some Style. This class is usefull with the JTextPaneAutoStyled.

Copyright: Copyright (c) 2003

Company:

Version:
1.0
Author:
Zerbib Gabriel - Charbit Lucas - Galbois Xavier - Gahide Jérôme
See Also:
Style, JTextPaneAutoStyled

Constructor Summary
DictionnaryWordStyle()
          Create a new empty dictionnary.
 
Method Summary
 void addEntrie(java.lang.String word, java.lang.String styleName)
          Add an entrie to the dictionnary
 java.lang.String getStyleForThisWord(java.lang.String aWord)
           
 void SetStyleForThisWord(java.lang.String aWord, java.lang.String c)
          Set the word to the new Style.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DictionnaryWordStyle

public DictionnaryWordStyle()
Create a new empty dictionnary.

Method Detail

addEntrie

public void addEntrie(java.lang.String word,
                      java.lang.String styleName)
Add an entrie to the dictionnary

Parameters:
word - the word to be styled
styleName - the name of the style

getStyleForThisWord

public java.lang.String getStyleForThisWord(java.lang.String aWord)
Parameters:
aWord - the word we want the associated style.
Returns:
the name of the style if the word exist, else return null .

SetStyleForThisWord

public void SetStyleForThisWord(java.lang.String aWord,
                                java.lang.String c)
Set the word to the new Style. If the word don't exist, the procedure do nothing.

Parameters:
aWord - the word to change the style
c - the new name of the style.