Search in sources :

Example 1 with LoadChartAction

use of org.talend.designer.runtime.visualization.internal.ui.properties.timeline.LoadChartAction in project tdi-studio-se by Talend.

the class RuntimeGraphcsComposite method createMessagePage.

private Composite createMessagePage(Composite parent) {
    messagePage = new Composite(parent, SWT.NONE);
    FormLayout messageLayout = new FormLayout();
    messageLayout.marginHeight = 0;
    messageLayout.marginWidth = 0;
    messagePage.setLayout(messageLayout);
    messagePage.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    FormToolkit toolkit = new FormToolkit(Display.getDefault());
    Hyperlink hyperlink = toolkit.createHyperlink(messagePage, Messages.loadDefaultChartSetLabel, SWT.NONE);
    hyperlink.addHyperlinkListener(new HyperlinkAdapter() {

        @Override
        public void linkActivated(HyperlinkEvent event) {
            try {
                new LoadChartAction(RuntimeGraphcsComposite.this).loadDefaultChartSet();
            } catch (JvmCoreException e) {
                Activator.log(Messages.loadChartSetFailedMsg, e);
            }
        }
    });
    return messagePage;
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) HyperlinkEvent(org.eclipse.ui.forms.events.HyperlinkEvent) Composite(org.eclipse.swt.widgets.Composite) ExpandableComposite(org.eclipse.ui.forms.widgets.ExpandableComposite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) FormToolkit(org.eclipse.ui.forms.widgets.FormToolkit) LoadChartAction(org.talend.designer.runtime.visualization.internal.ui.properties.timeline.LoadChartAction) Hyperlink(org.eclipse.ui.forms.widgets.Hyperlink) HyperlinkAdapter(org.eclipse.ui.forms.events.HyperlinkAdapter) JvmCoreException(org.talend.designer.runtime.visualization.JvmCoreException)

Aggregations

ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)1 FormLayout (org.eclipse.swt.layout.FormLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 HyperlinkAdapter (org.eclipse.ui.forms.events.HyperlinkAdapter)1 HyperlinkEvent (org.eclipse.ui.forms.events.HyperlinkEvent)1 ExpandableComposite (org.eclipse.ui.forms.widgets.ExpandableComposite)1 FormToolkit (org.eclipse.ui.forms.widgets.FormToolkit)1 Hyperlink (org.eclipse.ui.forms.widgets.Hyperlink)1 JvmCoreException (org.talend.designer.runtime.visualization.JvmCoreException)1 LoadChartAction (org.talend.designer.runtime.visualization.internal.ui.properties.timeline.LoadChartAction)1