view org.eclipse.draw2d/src/org/eclipse/draw2d/text/FlowBorder.d @ 12:bc29606a740c

Added dwt-addons in original directory structure of eclipse.org
author Frank Benoit <benoit@tionex.de>
date Sat, 14 Mar 2009 18:23:29 +0100
parents
children
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2004, 2005 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.text.FlowBorder;

import java.lang.all;

import org.eclipse.draw2d.Border;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.text.FlowFigure;

/**
 * Experimental API. This is a special type of border for use with {@link
 * org.eclipse.draw2d.text.FlowFigure}s. This interface should not be implemented by
 * clients. Clients should extend {@link org.eclipse.draw2d.text.AbstractFlowBorder}.
 * @since 3.1
 */
public interface FlowBorder : Border {

/**
 * Returns the collapsable bottom margin in pixels. Margin is the space external to the
 * border and the flow box on which it is rendered. Vertical margins (top and bottom) may
 * collapse in some situations, such as adjacent or nested blocks.
 * @return the bottom margin
 * @since 3.1
 */
int getBottomMargin();

/**
 * Returns the left margin in pixels. Margin is the space external to the border and the
 * flow box on which it is rendered.
 * @return the left margin
 * @since 3.1
 */
int getLeftMargin();

/**
 * Returns the right margin in pixels. Margin is the space external to the border and the
 * flow box on which it is rendered.
 * @return the right margin
 * @since 3.1
 */
int getRightMargin();

/**
 * Returns the collapsable top margin in pixels. Margin is the space external to the
 * border and the flow box on which it is rendered. Vertical margins (top and bottom) may
 * collapse in some situations, such as adjacent or nested blocks.
 * @return the top margin
 * @since 3.1
 */
int getTopMargin();

/**
 * Paints the border around the given box location. The border is asked to paint each of
 * the FlowFigure's boxes. The <code>sideInfo</code> parameter is used to indicate whether
 * the left and right sides should be rendered. This parameter will contain the following
 * bit flags:
 * <UL>
 *   <LI>{@link org.eclipse.swt.SWT#LEAD}
 *   <LI>{@link org.eclipse.swt.SWT#TRAIL}
 *   <LI>{@link org.eclipse.swt.SWT#RIGHT_TO_LEFT}
 * </UL>
 * @param figure the flow figure whose border is being painted
 * @param g the graphics
 * @param where the relative location of the box
 * @param sides bits indicating sides and bidi orientation
 * @since 3.1
 */
void paint(FlowFigure figure, Graphics g, Rectangle where, int sides);

}