Package main

Examples of main.Dimension


     * @param newNameRoom El nombre del mapa.
     * @param data El conjunto de puertas.
     * @param data2 El conjunto de ventanas.    
     */
    public Map(int dimX, int dimY, int newIdRoom, String newNameRoom, int[][] data, int[][] data2){             
        this.dimensionMap = new Dimension(dimX, dimY);
        this.idRoom = newIdRoom;
        this.nameRoom = newNameRoom;
        this.doors = data;
        this.windows = data2;
    }
View Full Code Here


     * Interpreta y prepara los elementos seleccionados para que el algoritmo pueda utilizarlos.    
     */
    public Stack<AuxiliarElement> interpretData(){
        Stack<AuxiliarElement> queue = new Stack();
        AuxiliarElement elem;
        Dimension dim;
        Sequence seq;
        areaOc = 0;
        seq = new Sequence(1,0,1,false);       
        for(int id : idList){           
            dim = this.configurationController.getCjtElementsController().getElement(id).getDimension();
            elem = new AuxiliarElement();
            elem.setObjectId(id);
            elem.setDim(dim);
            elem.setName(this.configurationController.getCjtElementsController().getElement(id).getName());
            elem.setId(seq.getValue());
            seq.increase();
            areaOc = areaOc + (dim.getX() * dim.getY());
            queue.push(elem);
        }       
        return queue;
    }
View Full Code Here

     * @param newStackable El del elemento.
     * @param newType El del elemento.
     */
    public Element(String newName, int newX, int newY, int dimMaxX, int dimMaxY, int dimMinX, int dimMinY, boolean newIsTall, boolean newStackable, String newType){
        this.name = newName;
        this.dimensions = new Dimension(newX, newY);
        this.dimensionMax = new Dimension(dimMaxX, dimMaxY);
        this.dimensionMin = new Dimension(dimMinX, dimMinY);
        this.isTall = newIsTall;      
        this.stackable = newStackable;
        this.type = newType;       
    }
View Full Code Here

     * Crea un elemento a partir del elemento pasado.
     * @param elem El elemento del que se quiere hacer copia.    
     */
    public Element(Element elem){       
        this.name = elem.getName();
        this.dimensions = new Dimension(elem.dimensions.getX(), elem.dimensions.getY());
        this.dimensionMax = new Dimension(elem.dimensionMax.getX(), elem.dimensionMax.getY());
        this.dimensionMin = new Dimension(elem.dimensionMin.getX(), elem.dimensionMin.getY());
        this.isTall = elem.getIsTall();
        this.stackable = elem.getIsStackable();
        this.type = elem.getType();
    }
View Full Code Here

   
    /**
     * Modificadora de la dimension.    
     */
    public void setDim(int x, int y){
        this.dimensions = new Dimension(x, y);
    }
View Full Code Here

     * @param list Vector de string que contendra los parametros del elemento.
     * @return Retorna 'true' si existia el elemento, 'false' en caso contrario.
     * Comprueba que existe el elemento y introduce sus parametros en 'list'.
     */
    public boolean getObject(int id, String[] list){
        Dimension dim, dimMax, dimMin;
        boolean exist = this.cjtElements.existsKey(id);
        if(exist){           
            Element ob = this.cjtElements.getElement(id);
            dim = ob.getDimension();
            dimMax = ob.getDimensionMax();
            dimMin = ob.getDimensionMin();
       
            list[0] = ob.getName();
            list[1] = Integer.toString(dim.getX());
            list[2] = Integer.toString(dim.getY());
            list[3] = Integer.toString(dimMax.getX());
            list[4] = Integer.toString(dimMax.getY());
            list[5] = Integer.toString(dimMin.getX());
            list[6] = Integer.toString(dimMin.getY());
            if(ob.getIsTall()) {
View Full Code Here

TOP

Related Classes of main.Dimension

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.