use of org.eclipse.swt.widgets.ToolItem in project tdi-studio-se by Talend.
the class ToolbarSearchZone method addCommonsComponents.
public void addCommonsComponents() {
Label findLabel = new Label(composite, SWT.NONE);
findLabel.setText("Find :");
searchText = new Text(composite, SWT.BORDER);
GridData gridData = new GridData();
gridData.widthHint = 150;
searchText.setBackground(EntryState.NONE.getColor());
searchText.setLayoutData(gridData);
searchText.setToolTipText("Enter search text prefix or pattern(*,?,or camel case).");
ToolBar toolBarActions = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);
toolBarActions.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
downTableButton = new ToolItem(toolBarActions, SWT.PUSH);
downTableButton.setImage(org.talend.commons.ui.runtime.image.ImageProvider.getImage(org.talend.commons.ui.runtime.image.ImageProvider.getImageDesc(EImage.DOWN_ICON)));
// downTableButton.setText("Next");
downTableButton.setToolTipText("next");
upTableButton = new ToolItem(toolBarActions, SWT.PUSH);
upTableButton.setImage(org.talend.commons.ui.runtime.image.ImageProvider.getImage(org.talend.commons.ui.runtime.image.ImageProvider.getImageDesc(EImage.UP_ICON)));
// upTableButton.setText("Previous");
upTableButton.setToolTipText("previous");
hightLightAllButton = new ToolItem(toolBarActions, SWT.CHECK);
hightLightAllButton.setImage(org.talend.commons.ui.runtime.image.ImageProvider.getImage(org.talend.commons.ui.runtime.image.ImageProvider.getImageDesc(EImage.HIGHTLIGHT_ICON)));
// hightLightAllButton.setText("Hightlight All");
hightLightAllButton.setToolTipText("hightlight all");
hightLightAllButton.setSelection(false);
// Add Listeners
addCommonsComponentListeners();
}
use of org.eclipse.swt.widgets.ToolItem in project tdi-studio-se by Talend.
the class ToolbarZone method addCommonsComponents.
/**
* DOC amaumont Comment method "createComponents".
*/
public void addCommonsComponents() {
upTableButton = new ToolItem(toolBarActions, SWT.PUSH);
upTableButton.setEnabled(false);
upTableButton.setToolTipText(getMoveUpTooltipText());
upTableButton.setImage(org.talend.commons.ui.runtime.image.ImageProvider.getImage(org.talend.commons.ui.runtime.image.ImageProvider.getImageDesc(EImage.UP_ICON)));
downTableButton = new ToolItem(toolBarActions, SWT.PUSH);
downTableButton.setEnabled(false);
downTableButton.setImage(org.talend.commons.ui.runtime.image.ImageProvider.getImage(org.talend.commons.ui.runtime.image.ImageProvider.getImageDesc(EImage.DOWN_ICON)));
downTableButton.setToolTipText(getMoveDownTooltipText());
new ToolItem(getToolBarActions(), SWT.SEPARATOR);
minimizeButton = new ToolItem(toolBarActions, SWT.PUSH);
minimizeButton.setEnabled(false);
addCommonsComponentListeners();
}
use of org.eclipse.swt.widgets.ToolItem in project tdi-studio-se by Talend.
the class MultipleSurrogateSection method createToolbarActions.
/**
* DOC hcw Comment method "createToolbar".
*
* @param composite
*/
private void createToolbarActions(Composite composite) {
ToolBar toolBar = new ToolBar(composite, SWT.NONE);
toolBar.setLayoutData(new GridData(157, SWT.DEFAULT));
ToolItem addToolItem = new ToolItem(toolBar, SWT.PUSH);
//$NON-NLS-1$
addToolItem.setImage(SWTResourceManager.getPluginImage(ScdPlugin.getDefault(), "icons/add.gif"));
addToolItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
addButtonClick();
}
});
ToolItem removeToolItem = new ToolItem(toolBar, SWT.PUSH);
//$NON-NLS-1$
removeToolItem.setImage(SWTResourceManager.getPluginImage(ScdPlugin.getDefault(), "icons/delete.gif"));
removeToolItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
removeButtonClick();
}
});
ToolItem moveUpToolItem = new ToolItem(toolBar, SWT.PUSH);
//$NON-NLS-1$
moveUpToolItem.setImage(SWTResourceManager.getPluginImage(ScdPlugin.getDefault(), "icons/up.gif"));
moveUpToolItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
moveUpButtonClick();
}
});
ToolItem moveDownToolItem = new ToolItem(toolBar, SWT.PUSH);
//$NON-NLS-1$
moveDownToolItem.setImage(SWTResourceManager.getPluginImage(ScdPlugin.getDefault(), "icons/down.gif"));
moveDownToolItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
moveDownButtonClick();
}
});
}
use of org.eclipse.swt.widgets.ToolItem in project tesb-studio-se by Talend.
the class CamelDependenciesPanel method createButtons.
protected void createButtons(ToolBar tb) {
final SelectionListener selectionListener = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (e.getSource() == addBtn) {
addNewItem();
} else if (e.getSource() == remBtn) {
removeItems();
} else if (e.getSource() == upBtn) {
moveUp();
} else if (e.getSource() == downBtn) {
moveDown();
} else if (e.getSource() == editBtn) {
editSelected();
}
}
};
addBtn = new ToolItem(tb, SWT.PUSH);
addBtn.setText(Messages.RouterDependenciesPanel_addBtn);
addBtn.addSelectionListener(selectionListener);
remBtn = new ToolItem(tb, SWT.PUSH);
remBtn.setText(Messages.RouterDependenciesPanel_removeBtn);
remBtn.addSelectionListener(selectionListener);
remBtn.setEnabled(false);
editBtn = new ToolItem(tb, SWT.PUSH);
editBtn.setText(Messages.RouterDependenciesPanel_editBtn);
editBtn.setEnabled(false);
editBtn.addSelectionListener(selectionListener);
if (type != ManifestItem.EXPORT_PACKAGE) {
upBtn = new ToolItem(tb, SWT.PUSH);
upBtn.setText(Messages.RouterDependenciesPanel_upBtn);
upBtn.addSelectionListener(selectionListener);
upBtn.setEnabled(false);
downBtn = new ToolItem(tb, SWT.PUSH);
downBtn.setText(Messages.RouterDependenciesPanel_downBtn);
downBtn.addSelectionListener(selectionListener);
downBtn.setEnabled(false);
}
}
use of org.eclipse.swt.widgets.ToolItem in project tesb-studio-se by Talend.
the class CheckedCamelDependenciesPanel method createButtons.
@Override
protected void createButtons(ToolBar tb) {
final SelectionListener selectionListener = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (e.getSource() == selectAll) {
selectAll(true);
} else if (e.getSource() == deselectAll) {
selectAll(false);
}
}
};
selectAll = new ToolItem(tb, SWT.PUSH);
selectAll.setText(Messages.RouterDependenciesPanel_selectAll);
selectAll.addSelectionListener(selectionListener);
deselectAll = new ToolItem(tb, SWT.PUSH);
deselectAll.setText(Messages.RouterDependenciesPanel_deselectAll);
deselectAll.addSelectionListener(selectionListener);
}
Aggregations