Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/css2/layout/BoxUtil.java')
-rw-r--r--jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/css2/layout/BoxUtil.java66
1 files changed, 0 insertions, 66 deletions
diff --git a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/css2/layout/BoxUtil.java b/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/css2/layout/BoxUtil.java
deleted file mode 100644
index b91e30ee1..000000000
--- a/jsf/plugins/org.eclipse.jst.pagedesigner/src/org/eclipse/jst/pagedesigner/css2/layout/BoxUtil.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Sybase, Inc. 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:
- * Sybase, Inc. - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.pagedesigner.css2.layout;
-
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.Graphics;
-import org.eclipse.draw2d.geometry.Insets;
-import org.eclipse.jst.pagedesigner.css2.ICSSStyle;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * @author mengbo
- */
-public class BoxUtil {
- /**
- * @param box
- * @param style
- */
- public static void setupBorderPaddingMargin(FlowBox box, ICSSStyle style) {
- box.setMarginInsets(new Insets(style.getMarginInsets()));
- box.setBorderInsets(new Insets(style.getBorderInsets()));
- box.setPaddingInsets(new Insets(style.getPaddingInsets()));
-
- if (box.getBorderPaddingHeight() > box.getHeight()) {
- box.setHeight(box.getBorderPaddingHeight());
- }
- if (box.getBorderPaddingWidth() > box.getWidth()) {
- box.setWidth(box.getBorderPaddingWidth());
- }
- }
-
- /**
- * Debug code.
- *
- * @param g
- * @param box
- */
- public static void drawBox(Graphics g, FlowBox box) {
- Color color = null;
- if (box instanceof BlockBox) {
- // color = ColorConstants.red;
- } else if (box instanceof LineBox) {
- color = ColorConstants.blue;
- } else if (box instanceof TextFragmentBox) {
- color = ColorConstants.green;
- } else {
- color = ColorConstants.darkGreen;
- }
- if (color != null) {
- g.setForegroundColor(color);
- g.setLineStyle(Graphics.LINE_DASH);
- g.setLineWidth(1);
- g.drawRectangle(box._x, box._y, box.getWidth(), box.getHeight());
- }
- }
-
-}

Back to the top