import org.tizen.emulator.manager.ui.list.ItemListVew;
import org.tizen.emulator.manager.ui.list.TreeListView;
import org.tizen.emulator.manager.ui.widgets.ImageButton;
-import org.tizen.emulator.manager.ui.widgets.ImageCombo;
public class VMsListView {
private Composite parent = null;
return mainView;
}
- private ImageCombo imageCombo = null;
private ImageButton itemButton = null;
private ImageButton treeButton = null;
mainView.setLayout(new FormLayout());
mainView.setSize(width, height);
- makeComboButton();
makeRadioButton();
listView = new Composite(mainView, SWT.NONE);
//
FormData data = new FormData();
- data.left = new FormAttachment(0, 10);
- data.top = new FormAttachment(0, 10);
- data.width = COMBO_WIDTH;
- data.height = COMBO_HEIGHT;
- imageCombo.setLayoutData(data);
data = new FormData();
data.top = new FormAttachment(0, 14);
data = new FormData();
data.left = new FormAttachment(0, 10);
- data.top = new FormAttachment(imageCombo, 5);
+ data.top = new FormAttachment(treeButton, 5);
data.right = new FormAttachment(100, 0);
data.bottom = new FormAttachment(100, -10);
listView.setLayoutData(data);
stackLayout.topControl = TopListView.getComposite();
}
- private static int COMBO_WIDTH = 145;
- private static int COMBO_HEIGHT = 24;
- private void makeComboButton() {
- imageCombo = new ImageCombo(mainView, SWT.NONE);
- imageCombo.setEnabled(true);
- imageCombo.setItemHeight(COMBO_HEIGHT);
- imageCombo.select(0);
-
- imageCombo.addSelectionListener(new SelectionListener() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- int index = imageCombo.getSelectionIndex();
- VMsMainView.getInstance().setCurrentProperty(null);
- VMsMainView.getInstance().drawVMList(index);
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- int index = imageCombo.getSelectionIndex();
- VMsMainView.getInstance().setCurrentProperty(null);
- VMsMainView.getInstance().drawVMList(index);
- }
-
- });
- }
-
public void drawProfile(Profile profile, boolean isRefresh) {
if (profile.getName().equals(StringResources.TOTAL_PROFILE)) { // TODO
if (!isRefresh) {
itemButton.setEnabled(false);
selectRadioButton(true);
}
- imageCombo.removeAll();
- imageCombo.setEnabled(false);
- imageCombo.layout();
} else {
if (!isRefresh) {
itemButton.setEnabled(true);
public void close() {
itemButton.dispose();
treeButton.dispose();
- imageCombo.dispose();
imageListView.close();
treeListView.close();
listView.dispose();