/*******************************************************************************
* Copyright (c) 2009-2013 CWI
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* * Paul Klint - Paul.Klint@cwi.nl - CWI
*******************************************************************************/
package org.rascalmpl.eclipse.library.vis.figure.combine.containers;
import java.util.List;
import org.rascalmpl.eclipse.library.vis.figure.Figure;
import org.rascalmpl.eclipse.library.vis.graphics.GraphicsContext;
import org.rascalmpl.eclipse.library.vis.properties.PropertyManager;
import org.rascalmpl.eclipse.library.vis.swt.applet.IHasSWTElement;
/**
* Rectangular box that can act as container
*
* @author paulk
*
*/
public class Box extends Container {
public Box(Figure inner, PropertyManager properties) {
super(inner, properties);
}
@Override
public void drawElement(GraphicsContext gc, List<IHasSWTElement> visibleSWTElements){
gc.rect(globalLocation.getX() , globalLocation.getY() , size.getX() , size.getY() );
}
@Override
String containerName(){
return "box" + super.toString();
}
}