org.eclipse.emf.edit.provider.ComposedImage Maven / Gradle / Ivy
/**
* Copyright (c) 2002-2012 IBM Corporation and others.
* 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:
* IBM - Initial API and implementation
*/
package org.eclipse.emf.edit.provider;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* This implements a wrapper that can be used to specify how a composed image should look.
* Be careful to avoid creating a non-static subclass because a composed image is often used as a key in a long-lived map,
* for example, EMF's ExtendedImageRegistry,
* and as such, anonymous or non-static nested classes will tend to cause contextual cause leaks,
* e.g., 419364.
*/
public class ComposedImage
{
public static class Point
{
public int x;
public int y;
@Override
public String toString()
{
return "(" + x + ", " + y +")";
}
}
public static class Size
{
public int width;
public int height;
@Override
public String toString()
{
return "(" + width+ ", " + height +")";
}
}
protected List