[摘要]index < 0) return; oldRowSel = rowSel; rowSel = index; selectionChanged(); public int getS...
index < 0)
return;
oldRowSel = rowSel;
rowSel = index;
selectionChanged();
}
public int getSelectionIndex() {
return rowSel;
}
public int getItemHeight() {
return lineHeight;
}
public void setItemHeight(int height) {
lineHeight = height;
}
public int getItemCount() {
return colors.size();
}
public void add(int colorIndex, String colorName) {
colorNames.add(colorName);
colors.add(new Integer(colorIndex));
}
我们开发的控件的使用也是非常简单的。
CustomList customlist = new CustomList( parent, SWT.V_SCROLL
关键词:开发Eclipse下的自定义控件