/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package csa.tiletools.tiles;

import java.awt.image.BufferedImage;

/** Shallow tiles are as of now only used for "building" wrapping tiles in visualizations of a map 
 *
 * @author salchr
 */
public class ShallowTile extends Tile
{
    Tile tile =null;
    public Tile getParent()
    {
        return tile;
    }

    public ShallowTile(Tile t)
    {
        super();
        tile = t;
    
        X=tile.X;
        Y=tile.Y;
        XScaled=tile.XScaled;
        YScaled=tile.YScaled;
        maxWS = tile.maxWS;
        maxHS = tile.maxHS;
        maxWO = tile.maxWO;
        maxHO = tile.maxHO;
        
	maxHSReal = tile.maxHSReal;
	maxHOReal = tile.maxHOReal;
	minHeightScaledReal = tile.minHeightScaledReal;
	minHeightUnscaledReal = tile.minHeightUnscaledReal;
        
        scalePercent = tile.scalePercent;
    
        mBData = tile.mBData;

        data  = tile.data;
        panel  = tile.panel;

        accumulatedProbabilityGrowing  = tile.accumulatedProbabilityGrowing;
    
        layer  = tile.layer;
        tileInLayer = tile.tileInLayer;
    }
    @Override public boolean isShallowTile()
    {
        return true;
    }
    @Override public boolean isCompositeTile()
    {
        return false;
    }
    
    public boolean setScalePercent(int s)
    {
        if (!tile.setScalePercent(s)) return false;
        X=tile.X;
        Y=tile.Y;
        XScaled=tile.XScaled;
        YScaled=tile.YScaled;
        maxWS = tile.maxWS;
        maxHS = tile.maxHS;
        maxWO = tile.maxWO;
        maxHO = tile.maxHO;
        scalePercent = tile.scalePercent;
        return true;
    }
    
    public BufferedImage getImage()
    {
        return tile.getImage();
    }
     
}
