List of usage examples for org.eclipse.jface.action Action getDescription
@Override
public String getDescription()
From source file:org.fusesource.ide.foundation.ui.actions.ToggleAction.java
License:Open Source License
public void setCurrentAction(Action currentAction) { this.currentAction = currentAction; setText(currentAction.getText());// w w w . j av a2 s . co m setToolTipText(currentAction.getToolTipText()); setDescription(currentAction.getDescription()); setHoverImageDescriptor(currentAction.getHoverImageDescriptor()); setImageDescriptor(currentAction.getImageDescriptor()); setDisabledImageDescriptor(currentAction.getDisabledImageDescriptor()); setEnabled(currentAction.isEnabled()); setChecked(currentAction.isChecked()); }
From source file:org.openmaji.implementation.tool.eclipse.editor.common.actions.ActionHelper.java
License:Open Source License
static public void copyDetails(Action source, Action target) { if (source == null) { target.setText(""); target.setDescription(""); target.setImageDescriptor(null); target.setHoverImageDescriptor(null); target.setToolTipText(null);/*ww w . ja v a2 s . c o m*/ } else { target.setText(source.getText()); target.setDescription(source.getDescription()); target.setImageDescriptor(source.getImageDescriptor()); target.setHoverImageDescriptor(source.getHoverImageDescriptor()); target.setToolTipText(source.getToolTipText()); } }
From source file:org.wso2.developerstudio.eclipse.dashboard.handlers.DashboardPage.java
License:Open Source License
/** * Create contents of link with custom action * /* w w w . j a va 2 s.c o m*/ * @param managedForm * @param composite * @param action */ private void createLink(IManagedForm managedForm, Composite composite, final Action action) { ImageHyperlink wizardLink = managedForm.getToolkit().createImageHyperlink(composite, SWT.NONE); ImageDescriptor descriptionImage = action.getImageDescriptor(); if (descriptionImage != null) { wizardLink.setImage(descriptionImage.createImage()); } managedForm.getToolkit().paintBordersFor(wizardLink); wizardLink.setText(action.getText()); wizardLink.setToolTipText(action.getDescription()); GridData gd_wizardLink = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); wizardLink.setLayoutData(gd_wizardLink); wizardLink.addHyperlinkListener(new IHyperlinkListener() { public void linkActivated(HyperlinkEvent evt) { action.run(); } public void linkEntered(HyperlinkEvent evt) { } public void linkExited(HyperlinkEvent evt) { } }); }