X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.g2d%2Fsrc%2Forg%2Fsimantics%2Fg2d%2Felement%2Fhandler%2FInternalSize.java;h=ea9704bc9f240290eb3a972f7cb59cad4f9a7137;hp=d23a2d98c07e9139dd1ad388396bae1134b9366c;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/InternalSize.java b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/InternalSize.java index d23a2d98c..ea9704bc9 100644 --- a/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/InternalSize.java +++ b/bundles/org.simantics.g2d/src/org/simantics/g2d/element/handler/InternalSize.java @@ -1,49 +1,49 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * 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: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.g2d.element.handler; - -import java.awt.geom.Rectangle2D; - -import org.simantics.g2d.element.IElement; -import org.simantics.g2d.element.ElementClass.Required; -import org.simantics.g2d.element.ElementClass.Single; -import org.simantics.g2d.element.handler.impl.FixedSize; -import org.simantics.g2d.element.handler.impl.Resizeable; - -/** - * This interface is used for handling elements internal size. - * - * See default implementations: - * - * @See {@link FixedSize} size is fixed - * @See {@link Resizeable} size can be changed by user - * - * @author Toni Kalajainen - */ -@Single -@Required -public interface InternalSize extends ElementHandler { - - /** - * Return the size of the element (in element coordinates). It is possible - * for an element to not have bounds. See return value specification for how - * to notice this. - * - * @param e element to get bounds for - * @param size size to be written to, or null (instantiates new) - * @return internal size of the element or the size argument as is if the - * specified element does not have bounds (i.e. is hidden or - * otherwise does not have a visual representation) - */ - Rectangle2D getBounds(IElement e, Rectangle2D size); - -} +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * 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: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.g2d.element.handler; + +import java.awt.geom.Rectangle2D; + +import org.simantics.g2d.element.IElement; +import org.simantics.g2d.element.ElementClass.Required; +import org.simantics.g2d.element.ElementClass.Single; +import org.simantics.g2d.element.handler.impl.FixedSize; +import org.simantics.g2d.element.handler.impl.Resizeable; + +/** + * This interface is used for handling elements internal size. + * + * See default implementations: + * + * @See {@link FixedSize} size is fixed + * @See {@link Resizeable} size can be changed by user + * + * @author Toni Kalajainen + */ +@Single +@Required +public interface InternalSize extends ElementHandler { + + /** + * Return the size of the element (in element coordinates). It is possible + * for an element to not have bounds. See return value specification for how + * to notice this. + * + * @param e element to get bounds for + * @param size size to be written to, or null (instantiates new) + * @return internal size of the element or the size argument as is if the + * specified element does not have bounds (i.e. is hidden or + * otherwise does not have a visual representation) + */ + Rectangle2D getBounds(IElement e, Rectangle2D size); + +}