//==============================================================================
// The Society of Actuaries (SOA) makes this computer model and its computer
// code available to its members for educational purposes. The model and its
// code may be modified and redistributed without prior authorization from the
// SOA. The SOA distributes this computer model and its computer code in the
// hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
// implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE.
//==============================================================================

package styles;

//==============================================================================
//Import statements
//------------------------------------------------------------------------------
import java.awt.Color;
import java.awt.Font;
import agents.PremiumRateLimitAgency;
import repast.simphony.visualizationOGL2D.StyleOGL2D;
import saf.v3d.ShapeFactory2D;
import saf.v3d.scene.Position;
import saf.v3d.scene.VSpatial;


public class PremiumRateLimitAgencyStyle implements StyleOGL2D<PremiumRateLimitAgency>
{
    private ShapeFactory2D shapeFactory;

//==============================================================================
// Method: These first methods implement the label methods of StyleOGL2D.
//------------------------------------------------------------------------------
    @Override
    public String getLabel(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return premiumRateLimitAgency.getAgentName();
    }

    @Override
    public Font getLabelFont(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return new Font("sansserif", Font.BOLD, 30);
    }

    @Override
    public float getLabelXOffset(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return 0;
    }

    @Override
    public float getLabelYOffset(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return (float) 0.0;
    }

    @Override
    public Position getLabelPosition(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return Position.SOUTH;
    }

    @Override
    public Color getLabelColor(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return new Color (0, 0, 0); //Black
    }
//==============================================================================


//==============================================================================
// This method sets the shape of the icon representing the PremiumRateLimitAgency to a circle.
//------------------------------------------------------------------------------
    @Override
    public VSpatial getVSpatial(PremiumRateLimitAgency premiumRateLimitAgency, VSpatial spatial)
    {
        
         return shapeFactory.createRectangle(75, 75);
    }

//==============================================================================
// This method sets the color of the disk representing the PremiumRateLimitAgency.
// The color is given by the triplet (Red, Green, Blue),
// where Red, Green, and Blue are integers between 0 and 255.
// Colors for Repast are represented in the standard Red/Green/Blue format.
//------------------------------------------------------------------------------
    @Override
    public Color getColor(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return new Color (230, 230, 230); //Light gray;
    }

//==============================================================================
// This method sets the scale parameter for the rectangle representing the
// insurance plan.
//------------------------------------------------------------------------------
    @Override
    public float getScale(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return (float) 1.00;
    }


//==============================================================================
// These methods set the disk border representing the PremiumRateLimitAgency.
// If the premiumRateLimitAgency is participating in the PremiumRateLimitAgency, the border is blue.
//------------------------------------------------------------------------------
    @Override
    public int getBorderSize(PremiumRateLimitAgency premiumRateLimitAgency)
    {
            return 0;

    }

    @Override
    public Color getBorderColor(PremiumRateLimitAgency premiumRateLimitAgency)
    {

            return new Color (150, 150, 150); //Dark gray

    }

//==============================================================================
// Method: These are general methods implementing StyleOGL2D.
//------------------------------------------------------------------------------
    @Override
    public void init(ShapeFactory2D shapeFactory)
    {
        this.shapeFactory = shapeFactory;
    }

    @Override
    public float getRotation(PremiumRateLimitAgency premiumRateLimitAgency)
    {
        return 0;
    }
    
}//end PremiumRateLimitAgencyStyle class