📄 tablecolumninfo.java
字号:
/**
* Copyright (c) 2003-2005 Craig Setera
* All Rights Reserved.
* Licensed under the Eclipse Public License - v 1.0
* For more information see http://www.eclipse.org/legal/epl-v10.html
*/
package eclipseme.ui.viewers;
import java.util.Comparator;
import org.eclipse.swt.SWT;
/**
* Instances of this class provide necessary
* metadata for the creation of a table column
* within table viewer.
* <p />
* Copyright (c) 2003-2005 Craig Setera<br>
* All Rights Reserved.<br>
* Licensed under the Eclipse Public License - v 1.0<p/>
* <br>
* $Revision: 1.1 $
* <br>
* $Date: 2006/05/15 21:31:40 $
* <br>
* @author Craig Setera
*/
public class TableColumnInfo {
private String name;
private float defaultWidthPercent;
private int alignment;
private Comparator comparator;
/**
* Create a new table column info
*
* @param name
* @param defaultWidthPercent
* @param comparator
*/
public TableColumnInfo(
String name,
float defaultWidthPercent,
int alignment,
Comparator comparator)
{
super();
this.name = name;
this.defaultWidthPercent = defaultWidthPercent;
this.alignment = alignment;
this.comparator = comparator;
}
/**
* Create a new table column info
*
* @param name
* @param defaultWidthPercent
* @param comparator
*/
public TableColumnInfo(String name, float defaultWidthPercent, Comparator comparator) {
this(name, defaultWidthPercent, SWT.LEFT, comparator);
}
/**
* @return Returns the alignment.
*/
public int getAlignment() {
return alignment;
}
/**
* @param alignment The alignment to set.
*/
public void setAlignment(int alignment) {
this.alignment = alignment;
}
/**
* @return Returns the comparator.
*/
public Comparator getComparator() {
return comparator;
}
/**
* @param comparator The comparator to set.
*/
public void setComparator(Comparator comparator) {
this.comparator = comparator;
}
/**
* @return Returns the name.
*/
public String getName() {
return name;
}
/**
* @param name The name to set.
*/
public void setName(String name) {
this.name = name;
}
/**
* @return Returns the defaultWidthPercent.
*/
public float getDefaultWidthPercent() {
return defaultWidthPercent;
}
/**
* @param defaultWidthPercent The defaultWidthPercent to set.
*/
public void setDefaultWidthPercent(float weight) {
this.defaultWidthPercent = weight;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -