grabTitleBar.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WHITE));
ToolItem grabTitleItem = new ToolItem(grabTitleBar, SWT.PUSH);
grabTitleItem.setImage(OwlUI.getImage(fSite.getResourceManager(), "icons/etool16/info.gif"));
grabTitleItem.setToolTipText("Load name from feed");
grabTitleItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
onGrabTitle();
}
});
}
/* Other */
else {
/* Name */
Label nameLabel = new Label(container, SWT.None);
nameLabel.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
nameLabel.setText("Name: ");
fNameInput = new Text(container, SWT.BORDER);
fNameInput.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
fNameInput.setText(getName(entity));
}
}
/* Location */
IFolder sameParent = getSameParent(fEntities);
if (sameParent != null) {
separateFromTop = true;
Label locationLabel = new Label(container, SWT.None);
locationLabel.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
locationLabel.setText("Location: ");
/* Exclude Folders that are selected from Chooser */
List<IFolder> excludes = new ArrayList<IFolder>();
for (IEntity entity : fEntities) {
if (entity instanceof IFolder)
excludes.add((IFolder) entity);
}
fFolderChooser = new FolderChooser(container, sameParent, excludes, SWT.BORDER);
fFolderChooser.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
fFolderChooser.setLayout(LayoutUtils.createGridLayout(1, 0, 0, 2, 5, false));
fFolderChooser.setBackground(container.getDisplay().getSystemColor(SWT.COLOR_WHITE));
}
/* Other Settings */
Composite otherSettingsContainer = new Composite(container, SWT.NONE);
otherSettingsContainer.setLayout(LayoutUtils.createGridLayout(1, 0, 0));
otherSettingsContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, true, 2, 1));
if (separateFromTop)
((GridLayout) otherSettingsContainer.getLayout()).marginTop = 15;
/* Auto-Reload */
Composite autoReloadContainer = new Composite(otherSettingsContainer, SWT.NONE);
autoReloadContainer.setLayout(LayoutUtils.createGridLayout(3, 0, 0));
autoReloadContainer.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, true));
fUpdateCheck = new Button(autoReloadContainer, SWT.CHECK);
fUpdateCheck.setText("Automatically update the " + (fIsSingleBookMark ? "feed" : "feeds") + " every ");
fUpdateCheck.setSelection(fPrefUpdateIntervalState);
fUpdateCheck.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
fReloadSpinner.setEnabled(fUpdateCheck.getSelection());
fReloadCombo.setEnabled(fUpdateCheck.getSelection());
}