@Override
void setIconMenu() {
refreshButton = new ImageButton(getTopComp(), SWT.PUSH);
+ refreshButton.setToolTipText("reloading device template list");
refreshButton.setImages(ImageResources.BUTTON_REFRESH_NML.getImage(),
ImageResources.BUTTON_REFRESH_HOVER.getImage(),
ImageResources.BUTTON_REFRESH_HOVER.getImage(),
makeTable();
makeBackButton();
makeProfileButton();
- makeTemplateButton();
+ makeFunctionButton();
setLayout();
}
@Override
void showTableComposite() {
if (!isTableInitialize) {
- setTemplateList();
+ setTemplateListTable();
isTableInitialize = true;
}
public void refreshDeviceTemplateList() {
ProfileList.settingDeviceTemplateList();
- setTemplateList();
+ setTemplateListTable();
}
private void makeProfileButton() {
});
}
- private final String[] titles = {"Type", "Name", "Resolution", "Display Size", "Ram", "Processor"};
+ private final String[] titles = {"Type", "Name", "Resolution", "Display Size", "RAM Size", "Processors"};
private void makeTable() {
- table = new Table(comp, SWT.BORDER);
+ table = new Table(comp, SWT.BORDER | SWT.SINGLE);
for (String t : titles) {
TableColumn column = new TableColumn(table, SWT.None);
for (int i = 0; i < table.getItemCount(); i++) {
DeviceTemplate t = (DeviceTemplate)table.getItem(i).getData();
Profile p = ProfileList.getProfile(t.getValue().getProfile());
- pairs[i] = new ItemProfilePair(table.getItem(i), 1, dir, p.getPriority());
+ int priority = p.getPriority();
+ if (!t.getValue().isStandard()) {
+ priority += 1;
+ }
+ pairs[i] = new ItemProfilePair(table.getItem(i), 1, dir, priority);
}
column.setTableItemPairs(pairs);
// sort table item
});
}
- private void setTemplateList() {
+ private void setTemplateListTable() {
table.removeAll();
for (ProfileButton pButton : profileButtonList) {
if (pButton.getProfile() == null) {
} else {
item.setImage(0, pButton.getCustomIcon());
}
- setTableItemProperty(item, template);
+
+ //
+ setTableItemProperty(pButton, item, template);
//
}
- private void setTableItemProperty(TableItem item, DeviceTemplate template) {
+ private void setTableItemProperty(ProfileButton pButton, TableItem item, DeviceTemplate template) {
DeviceTemplateValue value = template.getValue();
+ if (value.isStandard()) {
+ item.setImage(0, pButton.getIcon());
+ } else {
+ item.setImage(0, pButton.getCustomIcon());
+ }
item.setText(1, value.getName());
item.setText(2, value.getResolution().toString());
item.setText(3, String.valueOf(value.getDisplaySize()) + " " + value.getDisplaySizeUnit());
}
};
- private void makeTemplateButton() {
+ private void makeFunctionButton() {
createButton = new ImageButton(comp, SWT.PUSH);
createButton.setToolTipText("create device template");
createButton.setBackground(null);