60 lines
1.3 KiB
Java
60 lines
1.3 KiB
Java
//
|
|
//
|
|
// Generated by StarUML(tm) Java Add-In
|
|
//
|
|
// @ Project : Untitled
|
|
// @ File Name : Texte.java
|
|
// @ Date : 20/01/2008
|
|
// @ Author :
|
|
//
|
|
//
|
|
|
|
package Documents;
|
|
|
|
|
|
public class Texte extends Element {
|
|
public String txt;
|
|
public String auteur;
|
|
|
|
public Texte(int ID, String text, String aut) {
|
|
this.reference=ID;
|
|
this.txt = text;
|
|
this.auteur = aut;
|
|
this.type = "texte";
|
|
}
|
|
|
|
|
|
public String getTxt() {
|
|
return this.txt;
|
|
}
|
|
|
|
public void ModifyTxt(String newt) {
|
|
this.txt=newt;
|
|
}
|
|
|
|
public int getOrdre() {
|
|
return this.Conteneur.Elements.indexOf(this);
|
|
}
|
|
|
|
public int getPoids() {
|
|
return this.txt.length();
|
|
}
|
|
|
|
public Element GetChild(int indice) {
|
|
return null;
|
|
}
|
|
|
|
public String afficher() {
|
|
String rep = "Element N°" + this.reference;
|
|
rep+= '\n' + "Contenu par N°: " + this.Conteneur.reference;
|
|
rep += '\n'+"Auteur:" + this.auteur;
|
|
rep+= '\n' + this.txt;
|
|
rep+= '\n' + "Annotation: " + this.annotation + " Coef:" + this.coefficient;
|
|
rep += '\n' + "Poids: " + this.getPoids() + " Lv: " + this.getNiveau() + '\n';
|
|
|
|
return rep;
|
|
}
|
|
|
|
|
|
}
|