117 lines
3.2 KiB
Java
117 lines
3.2 KiB
Java
|
|
/*
|
||
|
|
* Copyright (c) 2007 Declarative Engineering LLC.
|
||
|
|
* All rights reserved. This program and the accompanying materials
|
||
|
|
* are made available under the terms of the Declarative Engineering LLC
|
||
|
|
* verson 1 which accompanies this distribution, and is available at
|
||
|
|
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
|
||
|
|
*/
|
||
|
|
package com.foundation.view.swt;
|
||
|
|
|
||
|
|
public class FormLayout extends Layout {
|
||
|
|
public int marginWidth = 0;
|
||
|
|
public int marginHeight = 0;
|
||
|
|
public int marginLeft = 0;
|
||
|
|
public int marginTop = 0;
|
||
|
|
public int marginRight = 0;
|
||
|
|
public int marginBottom = 0;
|
||
|
|
public int spacing = 0;
|
||
|
|
/**
|
||
|
|
* FormLayout constructor.
|
||
|
|
* @param container The container that is using the layout.
|
||
|
|
*/
|
||
|
|
public FormLayout(IAbstractSwtContainer container) {
|
||
|
|
super(container);
|
||
|
|
}//FormLayout()//
|
||
|
|
/**
|
||
|
|
* FormLayout constructor.
|
||
|
|
* @param container The container that is using the layout.
|
||
|
|
*/
|
||
|
|
public FormLayout(ICellContainer container) {
|
||
|
|
super(container);
|
||
|
|
}//FormLayout()//
|
||
|
|
/* (non-Javadoc)
|
||
|
|
* @see com.foundation.view.swt.Layout#createLayout(java.lang.Object)
|
||
|
|
*/
|
||
|
|
public org.eclipse.swt.widgets.Layout createLayout(Object rowObject) {
|
||
|
|
com.foundation.view.swt.layout.FormLayout result = new com.foundation.view.swt.layout.FormLayout();
|
||
|
|
|
||
|
|
result.marginHeight = marginHeight;
|
||
|
|
result.marginWidth = marginWidth;
|
||
|
|
result.spacing = spacing;
|
||
|
|
result.marginLeft = marginLeft;
|
||
|
|
result.marginTop = marginTop;
|
||
|
|
result.marginRight = marginRight;
|
||
|
|
result.marginBottom = marginBottom;
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}//createLayout()//
|
||
|
|
/* (non-Javadoc)
|
||
|
|
* @see com.foundation.view.swt.Layout#initialize()
|
||
|
|
*/
|
||
|
|
public void initialize() {
|
||
|
|
}//initialize()//
|
||
|
|
/* (non-Javadoc)
|
||
|
|
* @see com.foundation.view.swt.Layout#refresh()
|
||
|
|
*/
|
||
|
|
public void refresh() {
|
||
|
|
}//refresh()//
|
||
|
|
/* (non-Javadoc)
|
||
|
|
* @see com.foundation.view.swt.Layout#synchronize()
|
||
|
|
*/
|
||
|
|
public void synchronize() {
|
||
|
|
}//synchronize()//
|
||
|
|
/* (non-Javadoc)
|
||
|
|
* @see com.foundation.view.swt.Layout#release()
|
||
|
|
*/
|
||
|
|
public void release() {
|
||
|
|
}//release()//
|
||
|
|
/**
|
||
|
|
* Sets the layout margin width.
|
||
|
|
* @param marginWidth The layout margin width.
|
||
|
|
*/
|
||
|
|
public void setMarginWidth(int marginWidth) {
|
||
|
|
this.marginWidth = marginWidth;
|
||
|
|
}//setMarginWidth()//
|
||
|
|
/**
|
||
|
|
* Sets the layout margin height.
|
||
|
|
* @param marginHeight The layout margin height.
|
||
|
|
*/
|
||
|
|
public void setMarginHeight(int marginHeight) {
|
||
|
|
this.marginHeight = marginHeight;
|
||
|
|
}//setMarginHeight()//
|
||
|
|
/**
|
||
|
|
* Sets the layout margin top.
|
||
|
|
* @param marginTop The layout margin top.
|
||
|
|
*/
|
||
|
|
public void setMarginTop(int marginTop) {
|
||
|
|
this.marginTop = marginTop;
|
||
|
|
}//setMarginTop()//
|
||
|
|
/**
|
||
|
|
* Sets the layout margin bottom.
|
||
|
|
* @param marginBottom The layout margin bottom.
|
||
|
|
*/
|
||
|
|
public void setMarginBottom(int marginBottom) {
|
||
|
|
this.marginBottom = marginBottom;
|
||
|
|
}//setMarginBottom()//
|
||
|
|
/**
|
||
|
|
* Sets the layout margin right.
|
||
|
|
* @param marginRight The layout margin right.
|
||
|
|
*/
|
||
|
|
public void setMarginRight(int marginRight) {
|
||
|
|
this.marginRight = marginRight;
|
||
|
|
}//setMarginRight()//
|
||
|
|
/**
|
||
|
|
* Sets the layout margin left.
|
||
|
|
* @param marginLeft The layout margin left.
|
||
|
|
*/
|
||
|
|
public void setMarginLeft(int marginLeft) {
|
||
|
|
this.marginLeft = marginLeft;
|
||
|
|
}//setMarginLeft()//
|
||
|
|
/**
|
||
|
|
* Sets the layout spacing.
|
||
|
|
* @param spacing The layout spacing.
|
||
|
|
*/
|
||
|
|
public void setSpacing(int spacing) {
|
||
|
|
this.spacing = spacing;
|
||
|
|
}//setSpacing()//
|
||
|
|
}//FormLayout//
|