本文整理匯總了Java中org.eclipse.ui.forms.widgets.ScrolledForm.setImage方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrolledForm.setImage方法的具體用法?Java ScrolledForm.setImage怎麽用?Java ScrolledForm.setImage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.forms.widgets.ScrolledForm
的用法示例。
在下文中一共展示了ScrolledForm.setImage方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createFormContent
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
final ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
toolkit.decorateFormHeading(form.getForm());
IToolBarManager manager = form.getToolBarManager();
if (contributeToToolbar(manager)) {
form.updateToolBar();
}
String titleText = getFormTitleText();
if (titleText != null) {
form.setText(titleText);
}
Image titleImage = getFormTitleImage();
if (titleImage != null) {
form.setImage(titleImage);
}
toolkit.decorateFormHeading(form.getForm());
createUI(managedForm);
}
示例2: createFormContent
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm mform) {
String title = M.Diff;
if (this.title != null)
title += ": " + this.title;
ScrolledForm form = UI.formHeader(mform, title);
if (logo != null)
form.setImage(logo);
FormToolkit toolkit = mform.getToolkit();
Composite body = form.getBody();
UI.gridLayout(body, 1, 0, 0);
toolkit.paintBordersFor(body);
UI.gridData(body, true, true);
if (editMode)
editor = DiffEditor.forEditing(body, toolkit);
else
editor = DiffEditor.forViewing(body, toolkit);
editor.initialize(root, labelProvider, dependencyResolver, direction);
UI.gridData(editor, true, true);
form.reflow(true);
}
示例3: createFormContent
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
ScrolledForm form = managedForm.getForm();
form.setText(getTitle());
form.setImage(MuleImages.GLOBALS_TITLE_IMAGE);
//configure the layout of the form
GridLayout layout = new GridLayout();
layout.numColumns = 3;
layout.makeColumnsEqualWidth = true;
GridData configData = new GridData(GridData.FILL_BOTH);
configData.horizontalSpan = 2;
//to be fixed
form.getBody().setLayout(layout);
projectsPart = new DomainProjectsSectionPart(form.getBody(), managedForm.getToolkit(), model.getModules(), model.getProject());
projectsPart.getSection().setLayoutData(new GridData(GridData.FILL_BOTH));
}
示例4: formHeader
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
public static ScrolledForm formHeader(IManagedForm managedForm, String title, Image image) {
ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
toolkit.getHyperlinkGroup().setHyperlinkUnderlineMode(
HyperlinkSettings.UNDERLINE_HOVER);
if (title != null)
form.setText(title);
if (image != null)
form.setImage(image);
toolkit.decorateFormHeading(form.getForm());
return form;
}
示例5: createFormContent
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
FormToolkit toolkit = managedForm.getToolkit();
ScrolledForm form = managedForm.getForm();
form.setText(getTitle());
form.setImage(MuleImages.GLOBALS_TITLE_IMAGE);
GridLayout layout = new GridLayout();
layout.numColumns = 3;
layout.makeColumnsEqualWidth = true;
GridData configData = new GridData(GridData.FILL_BOTH);
configData.horizontalSpan = 2;
//to be fixed
form.getBody().setLayout(layout);
//add a tree view.
treePart = new MuleEnvironmentKeysTreePart(form.getBody(), toolkit, configuration, this);
configsPart = new MuleEnvironmentConfigsPart(form.getBody(), toolkit, configuration.elementsForKey(""));
treePart.getSection().setLayoutData(new GridData(GridData.FILL_BOTH));
configsPart.getSection().setLayoutData(configData);
addListener(treePart);
addListener(configsPart);
}
示例6: createFormContent
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected void createFormContent(IManagedForm managedForm) {
FormToolkit toolkit = managedForm.getToolkit();
ScrolledForm form = managedForm.getForm();
form.setText(getTitle());
form.setImage(MuleImages.GLOBALS_TITLE_IMAGE);
//set the layout.
TableWrapLayout layout = new TableWrapLayout();
layout.numColumns = 1;
layout.makeColumnsEqualWidth = true;
form.getBody().setLayout(layout);
//configure the toolbar buttons
configureFormToolbarButtons(toolkit, form);
//add the two sections.
SectionPart toolBar = addButtons(toolkit, form);
managedForm.addPart(toolBar);
TableWrapData toolbarData = new TableWrapData(TableWrapData.FILL_GRAB);
toolbarData.rowspan = 1;
toolbarData.valign = TableWrapData.FILL;
toolBar.getSection().setLayoutData(toolbarData);
GradleDependenciesTablePart depsTable = addDependenciesTable(toolkit, form);
managedForm.addPart(depsTable);
TableWrapData depsTableData = new TableWrapData(TableWrapData.FILL_GRAB);
depsTableData.rowspan = 2;
depsTableData.valign = TableWrapData.FILL;
depsTable.getSection().setLayoutData(depsTableData);
this.table = depsTable;
table.refreshData();
}
示例7: createFormContent
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
@Override
protected final void createFormContent(IManagedForm managedForm) {
makeActions();
ScrolledForm form = managedForm.getForm();
form.setText(getTitle());
form.setImage(getImage());
FormLayout bodyLayout = new FormLayout();
bodyLayout.marginWidth = 0;
bodyLayout.marginHeight = 0;
Composite body = form.getBody();
body.setLayout(bodyLayout);
Dialog.applyDialogFont(body);
_InfoBar = createInfoBar(body);
setInfoText(getInfoText());
_Client = createClient(managedForm, body);
FormData clientFormData = new FormData();
if (_InfoBar != null) {
clientFormData.top = new FormAttachment(_InfoBar, 0, SWT.BOTTOM);
}
else {
clientFormData.top = new FormAttachment(0, 0);
}
clientFormData.left = new FormAttachment(0, 0);
clientFormData.right = new FormAttachment(100, 0);
clientFormData.bottom = new FormAttachment(100, 0);
_Client.setLayoutData(clientFormData);
IToolBarManager toolBarManager = form.getToolBarManager();
contributeToToolBar(toolBarManager);
toolBarManager.update(true);
if (!getModel().isDestroyed()) {
createModelFormContent(managedForm, _Client);
initFromModel();
}
}
示例8: createFormContent
import org.eclipse.ui.forms.widgets.ScrolledForm; //導入方法依賴的package包/類
/**
* Called during FormPage life cycle and delegates the form creation
* to three methods {@link BasicFormPage#createBodyContent(IManagedForm)},
* {@link BasicFormPage#loadData()}, {@link BasicFormPage#pageInitializationComplete()}
*/
protected void createFormContent(IManagedForm managedForm)
{
ScrolledForm formWidget = managedForm.getForm();
formWidget.setText(getTitle());
if (imagePath != null)
{
formWidget.setImage(createRegisteredImage(imagePath));
}
Composite body = formWidget.getBody();
FormToolkit toolkit = managedForm.getToolkit();
toolkit.decorateFormHeading(formWidget.getForm());
// head construction ---------------------
IToolBarManager toolbarManager = formWidget.getForm().getToolBarManager();
// run button
toolbarManager.add(new DynamicContributionItem(new RunAction()));
toolbarManager.add(new DynamicContributionItem(new GenerateAction()));
// stop button
toolbarManager.add(new DynamicContributionItem(new StopAction()));
// refresh the tool-bar
toolbarManager.update(true);
/*
* The head client is the second row of the header section,
* below the title. There should be the same buttons as in the
* toolbar on the first row, right corner of the header section
* because sometimes those buttons are not visible unless
* the user scrolls over to them.
*/
ToolBar headClientTB = new ToolBar(formWidget.getForm().getHead(), SWT.HORIZONTAL);
headClientTBM = new ToolBarManager(headClientTB);
// run button
headClientTBM.add(new DynamicContributionItem(new RunAction()));
// validate button
headClientTBM.add(new DynamicContributionItem(new GenerateAction()));
// stop button
headClientTBM.add(new DynamicContributionItem(new StopAction()));
// refresh the head client toolbar
headClientTBM.update(true);
formWidget.getForm().setHeadClient(headClientTB);
// setup body layout
body.setLayout(getBodyLayout());
// create the body of the page
createBodyContent(managedForm);
super.createFormContent(managedForm);
try
{
// load data from the model
//TODO decouple from UI thread (causes I/O)
loadData();
} catch (CoreException e)
{
TLCUIActivator.getDefault().logError("Error loading data from the model into the form fields", e);
}
// check the model is-running state
refresh();
// finalizes the page construction
// activates the change listeners
pageInitializationComplete();
TLCUIHelper.setHelp(getPartControl(), helpId);
getManagedForm().getForm().getForm().addMessageHyperlinkListener(errorMessageHyperLinkListener);
}