// // // Generated by StarUML(tm) Java Add-In // // @ Project : Untitled // @ File Name : Figure.java // @ Date : 20/01/2008 // @ Author : // // package Documents; public class Figure extends Element { public int hauteur; public String legende; public int largeur; public Figure(int ID, int haut, int larg, String lgd) { this.hauteur = haut; this.reference = ID; this.largeur = larg; this.legende = lgd; this.type = "figure"; } public String getLegende() { return this.legende; } public int getOrdre() { return this.Conteneur.Elements.indexOf(this); } public int getPoids() { return this.largeur*this.hauteur+legende.length(); } public Element GetChild(int i) { return null; } public String afficher() { String rep = "Element N°" + this.reference; rep+= '\n' + "Contenu par N°: " + this.Conteneur.reference; rep += '\n' + "Hauteur: "+this.hauteur + " Largeur: "+this.largeur; rep += '\n' + "Legende: "+this.legende; rep+= '\n' + "Annotation: " + this.annotation + " Coef:" + this.coefficient; rep += '\n' + "Poids: " + this.getPoids() + " Lv: " + this.getNiveau() + '\n'; return rep; } }