Mercurial > projects > dwt2
view org.eclipse.draw2d/src/org/eclipse/draw2d/AbstractBackground.d @ 125:c43718956f21 default tip
Updated the snippets status.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 11 Aug 2011 19:55:14 +0200 |
parents | bc29606a740c |
children |
line wrap: on
line source
/******************************************************************************* * Copyright (c) 2007 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 Corporation - initial API and implementation * Port to the D programming language: * Frank Benoit <benoit@tionex.de> *******************************************************************************/ module org.eclipse.draw2d.AbstractBackground; import java.lang.all; import org.eclipse.draw2d.geometry.Insets; import org.eclipse.draw2d.AbstractBorder; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.Graphics; /** * A special border which can paint both underneath and on top of a Figure. * Normal borders only paint on top of a figure and its children. A background * has the opportunity to paint both first, and optionally last. * <P> * WARNING: Experimental for 3.3. Clients should help validate the use cases * of this new function. * @since 3.3 */ public class AbstractBackground : AbstractBorder { /** * {@inheritDoc} */ public Insets getInsets(IFigure figure) { return IFigure_NO_INSETS; } /** * {@inheritDoc} * By default, this method is stubbed out for backgrounds which only paint * underneath a figure. */ public void paint(IFigure figure, Graphics graphics, Insets insets) { } /** * Called when this Background should paint. If the background is being painted * inside another border or background, the insets indicate how far inside the * target figure the background should be painted. In most cases, the insets * will be all zero. * @param figure The figure on which the background is being painted * @param graphics The graphics * @param insets Amount to inset from the figure's bounds * @since 3.2 */ public void paintBackground(IFigure figure, Graphics graphics, Insets insets) { } }