All Packages Class Hierarchy This Package Previous Next Index
Class scrobble.Word
java.lang.Object
|
+----scrobble.Word
- public class Word
- extends Object
- implements Serializable
Word.java
is a Vector of Letter or SquarePositioner.
There are indeed two kinds of letters : letters of player, or letters
of the Board. The letters of the Board can be get with SquarePositioner.
-
scoring
- Scoring of the Word
-
vectorWord
- List containing the ordered letters of the word or SquarePositioner.
-
wordPanel
- The panel which represents the Word.
-
Word()
- Creates a new Word
-
Word(Vector)
- Creates a new Word with the given vectorWord
-
Word(Vector, int)
- Creates a new Word with the given vectorWord and the given scoring
-
addLetter(Letter)
- Adds a letter to the word at the final position
-
addSquarePositioner(SquarePositioner)
- Adds a squarepositioner to the word at the final position
-
getComponent()
- Returns a Panel containing the letters or squarepositioner of the word .
-
getNbLetters()
- Returns the number of letters (or squarepositioners) vectorWord.
-
getScoring()
- Returns the scoring of the Word
-
getVectorWord()
- Returns the vectorWord of the Word
-
insertLetterAtFirstPosition(Letter)
- Insert a letter at the beginning of the word
-
removeElement(Object)
- Remove a specified letter or a squarepositionner of the word.
-
removeElementAt(int)
- Remove a letter or a squarepositionner at the position index.
-
setScoring(int)
- Modifies the scoring of the Word
-
setVectorWord(Vector)
- Modifies the vectorWord of the Word, that is : modifies the letters or
the SquarePositioner of the Word
-
updateWordPanel()
- [DESCRIBE ME]
-
wordToString()
-
Converts a given Word into a String.
vectorWord
Vector vectorWord
- List containing the ordered letters of the word or SquarePositioner.
There are indeed two kinds of letters : letters of player, or letters
of the Board. The letters of the Board can be get with SquarePositioner.
wordPanel
transient JPanel wordPanel
- The panel which represents the Word.
scoring
int scoring
- Scoring of the Word
Word
public Word()
- Creates a new Word
Word
public Word(Vector vectorWord)
- Creates a new Word with the given vectorWord
- Parameters:
- vectorWord - the vectorWord of the new Word being created
Word
public Word(Vector vectorWord,
int scoring)
- Creates a new Word with the given vectorWord and the given scoring
- Parameters:
- vectorWord - the vectorWord of the new Word being created
- scoring - the scoring of the new Word being created
setVectorWord
public void setVectorWord(Vector newVectorWord)
- Modifies the vectorWord of the Word, that is : modifies the letters or
the SquarePositioner of the Word
- Parameters:
- newVectorWord - the new vectorWord of the Word
getVectorWord
public Vector getVectorWord()
- Returns the vectorWord of the Word
- Returns:
- the vectorWord
setScoring
public void setScoring(int newScoring)
- Modifies the scoring of the Word
- Parameters:
- newScoring - the new scoring of the Word
getScoring
public int getScoring()
- Returns the scoring of the Word
- Returns:
- the scoring
wordToString
public String wordToString()
- Converts a given Word into a String.
This method is used by the method isWord in the class Dico.
- Returns:
- the string.
addLetter
public void addLetter(Letter letter)
- Adds a letter to the word at the final position
- Parameters:
- letter - the letter to be added
addSquarePositioner
public void addSquarePositioner(SquarePositioner square)
- Adds a squarepositioner to the word at the final position
- Parameters:
- square - the squarepositioner to be added
removeElementAt
public void removeElementAt(int index)
- Remove a letter or a squarepositionner at the position index.
- Parameters:
- index - the index of the letter or the squarepositionner to be removed.
removeElement
public void removeElement(Object object)
- Remove a specified letter or a squarepositionner of the word.
- Parameters:
- object - the object of the letter or the squarepositionner to be removed.
insertLetterAtFirstPosition
public void insertLetterAtFirstPosition(Letter letter)
- Insert a letter at the beginning of the word
- Parameters:
- letter - the letter to be inserted
getNbLetters
public int getNbLetters()
- Returns the number of letters (or squarepositioners) vectorWord.
getComponent
public Component getComponent()
- Returns a Panel containing the letters or squarepositioner of the word .
updateWordPanel
public void updateWordPanel()
- [DESCRIBE ME]
All Packages Class Hierarchy This Package Previous Next Index