import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.TypedListener;
-import org.tizen.emulator.manager.EmulatorManager;
public class Table extends TableScrolledComposite {
private static final int[] EMPTY_SELECTION = new int[0];
redraw();
}
- if (EmulatorManager.isWin()) {
- tableColumn.redraw();
- tableItem.redraw();
- }
+ tableColumn.redraw();
+ tableItem.redraw();
this.layout();
}
GC gc = e.gc;
int top = 0;
int height = getItemHeight();
- for (int i = 0; top < rect.height; i++, top += height) {
+ int itemCount = getItemCount();
+ if (itemCount > 0) {
+ if (selection.length == 1) {
+ top = selectedItemHeight;
+ top += height * (itemCount-1);
+ } else {
+ top += height * itemCount;
+ }
+ }
+
+ for (;top < rect.height; itemCount++, top += height) {
Rectangle drawingRect = new Rectangle(0, top, rect.width, height);
- if ((i%2) == 0) {
+ if ((itemCount%2) == 0) {
gc.setBackground(ColorResources.ITEM_BG_COLOR_EVEN);
} else {
gc.setBackground(ColorResources.ITEM_BG_COLOR_ODD);