All Packages Class Hierarchy This Package Previous Next Index
Class scrobble.Letter
java.lang.Object
|
+----scrobble.Letter
- public class Letter
- extends Object
- implements Serializable
Letter is able to give its name and its value.
-
letterPanel
- The panel which represents the letter;
-
name
- Name of Letter
-
nameLabel
- The label which contains the name of the letter;
-
value
- Value of Letter
-
valueLabel
- The label which contains the value of the letter;
-
Letter()
- Creates a new Letter without any parameter
-
Letter(char)
- Creates a new Letter with the given name
and the value 1 if nothing is given.
-
Letter(char, int)
- Creates a new Letter with the given name
and the given value.
-
equals(Letter)
- Tests if Letter has the same name and the same value
that the Letter in parameter has.
-
getComponent()
- Returns a label containing the letter (his name and his value).
-
getName()
- Returns the name of the Letter
-
getValue()
- Returns the value of the Letter
-
setName(char)
- Changes the name of the Letter
-
setValue(int)
- Changes the value of the Letter
-
toString()
- Returns a string representation of the object.
name
char name
- Name of Letter
value
int value
- Value of Letter
nameLabel
protected JLabel nameLabel
- The label which contains the name of the letter;
valueLabel
protected JLabel valueLabel
- The label which contains the value of the letter;
letterPanel
protected JPanel letterPanel
- The panel which represents the letter;
Letter
public Letter(char name)
- Creates a new Letter with the given name
and the value 1 if nothing is given.
- Parameters:
- name - the name of the new Letter being created
Letter
public Letter(char name,
int value)
- Creates a new Letter with the given name
and the given value.
- Parameters:
- name - the name of the new Letter being created
- value - the value of the new letter being created
Letter
public Letter()
- Creates a new Letter without any parameter
setName
public void setName(char newname)
- Changes the name of the Letter
- Parameters:
- newname - the new name of the Letter
getName
public char getName()
- Returns the name of the Letter
- Returns:
- the name
setValue
public void setValue(int newvalue)
- Changes the value of the Letter
- Parameters:
- newvalue - the new value of the Letter
getValue
public int getValue()
- Returns the value of the Letter
- Returns:
- the value
equals
public boolean equals(Letter letter)
- Tests if Letter has the same name and the same value
that the Letter in parameter has.
- Parameters:
- letter - the other letter.
- Returns:
- true or false
toString
public String toString()
- Returns a string representation of the object.
- Overrides:
- toString in class Object
getComponent
public Component getComponent()
- Returns a label containing the letter (his name and his value).
All Packages Class Hierarchy This Package Previous Next Index