48 lines
1.6 KiB
Java
48 lines
1.6 KiB
Java
|
|
/*
|
||
|
|
* Copyright (c) 2009 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.tcv.swt;
|
||
|
|
|
||
|
|
import java.io.IOException;
|
||
|
|
import java.io.ObjectInput;
|
||
|
|
import java.io.ObjectOutput;
|
||
|
|
|
||
|
|
public class FillLayoutData extends LayoutData {
|
||
|
|
public int defaultWidth = org.eclipse.swt.SWT.DEFAULT;
|
||
|
|
public int defaultHeight = org.eclipse.swt.SWT.DEFAULT;
|
||
|
|
/**
|
||
|
|
* FillLayoutData constructor.
|
||
|
|
*/
|
||
|
|
public FillLayoutData() {
|
||
|
|
super();
|
||
|
|
}//FillLayoutData()//
|
||
|
|
/* (non-Javadoc)
|
||
|
|
* @see com.foundation.tcv.swt.LayoutData#createSwtLayoutData(com.foundation.tcv.swt.IControlLocator)
|
||
|
|
*/
|
||
|
|
public Object createSwtLayoutData(IControlLocator controlLocator) {
|
||
|
|
com.foundation.view.swt.layout.FillData data = new com.foundation.view.swt.layout.FillData();
|
||
|
|
|
||
|
|
data.defaultWidth = defaultWidth;
|
||
|
|
data.defaultHeight = defaultHeight;
|
||
|
|
|
||
|
|
return data;
|
||
|
|
}//createSwtLayoutData()//
|
||
|
|
/* (non-Javadoc)
|
||
|
|
* @see java.io.Externalizable#readExternal(java.io.ObjectInput)
|
||
|
|
*/
|
||
|
|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
|
||
|
|
defaultWidth = in.readInt();
|
||
|
|
defaultHeight = in.readInt();
|
||
|
|
}//readExternal()//
|
||
|
|
/* (non-Javadoc)
|
||
|
|
* @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
|
||
|
|
*/
|
||
|
|
public void writeExternal(ObjectOutput out) throws IOException {
|
||
|
|
out.writeInt(defaultWidth);
|
||
|
|
out.writeInt(defaultHeight);
|
||
|
|
}//writeExternal()//
|
||
|
|
}//FillLayoutData//
|