/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 Joseph Hendrix
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.svg.transform;

/**
 * @author Joe Hendrix
 */
public class Translate implements Transform
{
    Number x;
    Number y;

    public Translate(Number x, Number y)
    {
        this.x = x;
        this.y = y;
    }
    
    public Translate(Number x)
    {
        this.x = x;
    }

    public String toString()
    {
        StringBuilder sb = new StringBuilder("translate(").append(x);
        
        if(y != null)
            sb.append(",").append(y);
        
        return .append(")").toString();
    }
}

/*
 *  The MIT License (MIT)
 *
 *  View the full license at:
 *  https://github.com/hendrixjoseph/FamilyTree/blob/master/LICENSE.md
 *
 *  Copyright (c) 2015 Joseph Hendrix
 *
 *  Hosted on GitHub at https://github.com/hendrixjoseph/FamilyTree
 *
 */

package edu.wright.hendrix11.svg.transform;

/**
 * @author Joe Hendrix
 */
public class Translate extends XyTransform
{
    public Translate(Number x, Number y)
    {
        super(x,y);
    }
    
    public Translate(Number x)
    {
        super(x);
    }

    public String toString()
    {
        StringBuilder sb = new StringBuilder("translate(").append(x);
        
        if(y != null)
            sb.append(",").append(y);
        
        return .append(")").toString();
    }
}

Update Translate.java