List of usage examples for org.eclipse.jface.dialogs IMessageProvider INFORMATION
int INFORMATION
To view the source code for org.eclipse.jface.dialogs IMessageProvider INFORMATION.
Click Source Link
From source file:no.javatime.inplace.ui.dialogs.DependencyDialog.java
License:Open Source License
/** * Initialize and manage the start radio group *///from ww w .j a v a 2 s . c o m private void start() { grpStart = new Group(container, SWT.NONE); grpStart.addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent e) { setMessage(msg.formatString("dep_operation_group_startstop", startOp), IMessageProvider.INFORMATION); } @Override public void mouseDown(MouseEvent e) { setMessage(msg.formatString("dep_operation_group_startstop", startOp), IMessageProvider.INFORMATION); } }); grpStart.setToolTipText(msg.formatString("dep_operation_group_startstop", startOp)); GridData gd_grpStart = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); gd_grpStart.heightHint = grpHeightHint; gd_grpStart.widthHint = grWidthHint; grpStart.setLayoutData(gd_grpStart); grpStart.setText(msg.formatString("dep_bundles_name", msg.formatString("dep_operation_start"))); btnStartSingleBundles = new Button(grpStart, SWT.RADIO); btnStartSingleBundles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (btnStartSingleBundles.getSelection()) { setMessage(msg.formatString("dep_operation_single", startOp), IMessageProvider.INFORMATION); } if (!btnStartSingleBundles.getSelection()) { setMessage("Excluding providing bundles on start may result in stale references", IMessageProvider.WARNING); } } }); btnStartSingleBundles.setToolTipText(msg.formatString("dep_operation_single", startOp)); btnStartSingleBundles.setBounds(30, 20, 53, 16); btnStartSingleBundles.setText("Single"); if (!requiringOnStart && !providingOnStart && !partialOnStart) { btnStartSingleBundles.setSelection(true); } btnStartRequiringBundles = new Button(grpStart, SWT.RADIO); btnStartRequiringBundles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (!btnStartRequiringProvidingBundles.getSelection()) { Category.setState(Category.requiringOnStart, btnStartRequiringBundles.getSelection()); } if (btnStartRequiringBundles.getSelection()) { setMessage(msg.formatString("dep_operation_requiring", startOp), IMessageProvider.INFORMATION); } } }); btnStartRequiringBundles.setToolTipText(msg.formatString("dep_operation_requiring", startOp)); btnStartRequiringBundles.setBounds(194, 20, 72, 16); btnStartRequiringBundles.setText("Requiring"); if (!providingOnStart) { btnStartRequiringBundles.setSelection(Category.getState(Category.requiringOnStart)); } else { btnStartRequiringBundles.setSelection(false); } btnStartProvidingBundles = new Button(grpStart, SWT.RADIO); btnStartProvidingBundles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (!btnStartRequiringProvidingBundles.getSelection()) { Category.setState(Category.providingOnStart, btnStartProvidingBundles.getSelection()); } if (btnStartProvidingBundles.getSelection()) { setMessage(msg.formatString("dep_operation_providing", startOp), IMessageProvider.INFORMATION); } } }); btnStartProvidingBundles.setToolTipText(msg.formatString("dep_operation_providing", startOp)); btnStartProvidingBundles.setBounds(101, 20, 72, 16); btnStartProvidingBundles.setText("Providing"); if (!requiringOnStart) { btnStartProvidingBundles.setSelection(Category.getState(Category.providingOnStart)); } else { btnStartProvidingBundles.setSelection(false); } btnStartRequiringProvidingBundles = new Button(grpStart, SWT.RADIO); btnStartRequiringProvidingBundles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { Category.setState(Category.requiringOnStart, btnStartRequiringProvidingBundles.getSelection()); Category.setState(Category.providingOnStart, btnStartRequiringProvidingBundles.getSelection()); if (btnStartRequiringProvidingBundles.getSelection()) { setMessage(msg.formatString("dep_operation_requiring_providing", startOp), IMessageProvider.INFORMATION); } } }); btnStartRequiringProvidingBundles .setToolTipText(msg.formatString("dep_operation_requiring_providing", startOp)); btnStartRequiringProvidingBundles.setBounds(290, 20, 144, 16); btnStartRequiringProvidingBundles.setText("Requiring and Providing"); if (Category.getState(Category.requiringOnStart) && Category.getState(Category.providingOnStart)) { btnStartRequiringProvidingBundles.setSelection(true); } btnStartPartialGraph = new Button(grpStart, SWT.RADIO); btnStartPartialGraph.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { Category.setState(Category.partialGraphOnStart, btnStartPartialGraph.getSelection()); if (btnStartPartialGraph.getSelection()) { setMessage(msg.formatString("dep_operation_partial", startOp), IMessageProvider.INFORMATION); } } }); btnStartPartialGraph.setToolTipText(msg.formatString("dep_operation_partial", startOp)); btnStartPartialGraph.setBounds(463, 20, 89, 16); btnStartPartialGraph.setText("Partial Graph"); btnStartPartialGraph.setSelection(Category.getState(Category.partialGraphOnStart)); }
From source file:no.javatime.inplace.ui.dialogs.DependencyDialog.java
License:Open Source License
/** * Initialize and manage the stop radio group */// ww w. ja v a 2 s . co m private void stop() { grpStop = new Group(container, SWT.NONE); grpStop.addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(MouseEvent e) { setMessage(msg.formatString("dep_operation_group_startstop", stopOp), IMessageProvider.INFORMATION); } @Override public void mouseDown(MouseEvent e) { setMessage(msg.formatString("dep_operation_group_startstop", stopOp), IMessageProvider.INFORMATION); } }); grpStop.setToolTipText(msg.formatString("dep_operation_group_startstop", stopOp)); GridData gd_grpStop = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); gd_grpStop.heightHint = grpHeightHint; gd_grpStop.widthHint = grWidthHint; grpStop.setLayoutData(gd_grpStop); grpStop.setText(msg.formatString("dep_bundles_name", msg.formatString("dep_operation_stop"))); btnStopSingleBundles = new Button(grpStop, SWT.RADIO); btnStopSingleBundles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (btnStopSingleBundles.getSelection()) { setMessage(msg.formatString("dep_operation_single", stopOp), IMessageProvider.INFORMATION); } } }); btnStopSingleBundles.setToolTipText(msg.formatString("dep_operation_single", stopOp)); btnStopSingleBundles.setBounds(30, 20, 53, 16); btnStopSingleBundles.setText("Single"); if (!requiringOnStop && !providingOnStop && !partialOnStop) { btnStopSingleBundles.setSelection(true); } btnStopRequiringBundles = new Button(grpStop, SWT.RADIO); btnStopRequiringBundles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (!btnStopProvidingRequiringBundles.getSelection()) { Category.setState(Category.requiringOnStop, btnStopRequiringBundles.getSelection()); } if (btnStopRequiringBundles.getSelection()) { setMessage(msg.formatString("dep_operation_requiring", stopOp), IMessageProvider.INFORMATION); } } }); btnStopRequiringBundles.setToolTipText(msg.formatString("dep_operation_requiring", stopOp)); btnStopRequiringBundles.setText("Requiring"); btnStopRequiringBundles.setBounds(194, 20, 72, 16); if (!providingOnStop) { btnStopRequiringBundles.setSelection(Category.getState(Category.requiringOnStop)); } else { btnStopRequiringBundles.setSelection(false); } btnStopProvidingBundles = new Button(grpStop, SWT.RADIO); btnStopProvidingBundles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { if (!btnStopProvidingRequiringBundles.getSelection()) { Category.setState(Category.providingOnStop, btnStopProvidingBundles.getSelection()); } if (btnStopProvidingBundles.getSelection()) { setMessage(msg.formatString("dep_operation_providing", stopOp), IMessageProvider.INFORMATION); } } }); btnStopProvidingBundles.setToolTipText(msg.formatString("dep_operation_providing", stopOp)); btnStopProvidingBundles.setText("Providing"); btnStopProvidingBundles.setBounds(101, 20, 72, 16); if (!requiringOnStop) { btnStopProvidingBundles.setSelection(Category.getState(Category.providingOnStop)); } else { btnStopProvidingBundles.setSelection(false); } btnStopProvidingRequiringBundles = new Button(grpStop, SWT.RADIO); btnStopProvidingRequiringBundles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { Category.setState(Category.requiringOnStop, btnStopProvidingRequiringBundles.getSelection()); Category.setState(Category.providingOnStop, btnStopProvidingRequiringBundles.getSelection()); if (btnStopProvidingRequiringBundles.getSelection()) { setMessage(msg.formatString("dep_operation_providing_requiring", stopOp), IMessageProvider.INFORMATION); } } }); btnStopProvidingRequiringBundles .setToolTipText(msg.formatString("dep_operation_providing_requiring", stopOp)); btnStopProvidingRequiringBundles.setBounds(290, 20, 149, 16); btnStopProvidingRequiringBundles.setText("Providing and Requiring"); if (Category.getState(Category.requiringOnStop) && Category.getState(Category.providingOnStop)) { btnStopProvidingRequiringBundles.setSelection(true); } btnStopPartialGraph = new Button(grpStop, SWT.RADIO); btnStopPartialGraph.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { Category.setState(Category.partialGraphOnStop, btnStopPartialGraph.getSelection()); if (btnStopPartialGraph.getSelection()) { setMessage(msg.formatString("dep_operation_partial", stopOp), IMessageProvider.INFORMATION); } } }); btnStopPartialGraph.setToolTipText(msg.formatString("dep_operation_partial", stopOp)); btnStopPartialGraph.setText("Partial Graph"); btnStopPartialGraph.setBounds(463, 20, 89, 16); btnStopPartialGraph.setSelection(Category.getState(Category.partialGraphOnStop)); }
From source file:nz.ac.massey.cs.jquest.views.VisualizationForm.java
License:Open Source License
protected void configureFormText(final Form form, FormText text) { text.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent e) { String is = (String) e.getHref(); try { ((FormText) e.widget).getShell().dispose(); int index = Integer.parseInt(is); IMessage[] messages = form.getChildrenMessages(); IMessage message = messages[index]; // ErrorReporting error = (ErrorReporting) message.getData(); // if (error != null) { // error.handleError(); // } } catch (NumberFormatException ex) { }/* w w w .j a v a 2 s . c om*/ } }); text.setImage("error", getImage(IMessageProvider.ERROR)); text.setImage("warning", getImage(IMessageProvider.WARNING)); text.setImage("info", getImage(IMessageProvider.INFORMATION)); }
From source file:nz.ac.massey.cs.jquest.views.VisualizationForm.java
License:Open Source License
String createFormTextContent(IMessage[] messages) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); pw.println("<form>"); for (int i = 0; i < messages.length; i++) { IMessage message = messages[i];//w ww .ja v a2 s .c o m pw.print("<li vspace=\"false\" style=\"image\" indent=\"16\" value=\""); switch (message.getMessageType()) { case IMessageProvider.ERROR: pw.print("error"); break; case IMessageProvider.WARNING: pw.print("warning"); break; case IMessageProvider.INFORMATION: pw.print("info"); break; } pw.print("\"> <a href=\""); pw.print(i + ""); pw.print("\">"); if (message.getPrefix() != null) { pw.print(message.getPrefix()); } pw.print(message.getMessage()); pw.println("</a></li>"); } pw.println("</form>"); pw.flush(); return sw.toString(); }
From source file:nz.ac.massey.cs.jquest.views.VisualizationForm.java
License:Open Source License
protected Image getImage(int type) { switch (type) { case IMessageProvider.ERROR: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); case IMessageProvider.WARNING: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); case IMessageProvider.INFORMATION: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK); }/* ww w . j a v a 2 s . c o m*/ return null; }
From source file:org.activiti.designer.eclipse.navigator.cloudrepo.dialog.SelectFolderForDownloadDialog.java
License:Apache License
@Override public void create() { super.create(); setTitle("Destination folder for the process(es)"); setMessage("Select a folder to which the selected process(es) will be downloaded.", IMessageProvider.INFORMATION); }
From source file:org.activiti.designer.kickstart.eclipse.navigator.dialog.RenameDialog.java
License:Apache License
@Override public void create() { super.create(); this.objectToBeRenamed = CmisNavigatorSelectionHolder.getInstance().getSelectedObjects().get(0); if (objectToBeRenamed.getName() != null) { nameText.setText(objectToBeRenamed.getName()); }//www .ja va 2 s. co m String type = ((objectToBeRenamed instanceof Folder) ? " folder" : " file"); setTitle("Rename " + type); setMessage("Fill in the new name of " + type + " '" + objectToBeRenamed.getName() + "'", IMessageProvider.INFORMATION); }
From source file:org.activiti.designer.kickstart.process.dialog.KickstartFormReferenceSelect.java
License:Apache License
@Override public void create() { super.create(); setTitle("Select or create form"); setMessage("Select a form that should be used or create a new one", IMessageProvider.INFORMATION); }
From source file:org.apache.ivyde.eclipse.resolvevisualizer.ResolveVisualizerForm.java
License:Apache License
private Image getImage(int type) { switch (type) { case IMessageProvider.ERROR: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); case IMessageProvider.WARNING: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); case IMessageProvider.INFORMATION: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK); }/*from w ww . ja v a2 s . c o m*/ return null; }
From source file:org.apache.ivyde.eclipse.resolvevisualizer.ResolveVisualizerForm.java
License:Apache License
private void configureFormText(final Form form, FormText text) { text.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent e) { String is = (String) e.getHref(); try { ((FormText) e.widget).getShell().dispose(); int index = Integer.parseInt(is); IMessage[] messages = form.getChildrenMessages(); IMessage message = messages[index]; Set/* <IvyNodeElement> */ conflicts = (Set/* <IvyNodeElement> */) message.getData(); if (conflicts != null) { viewer.setSelection(new StructuredSelection(new ArrayList(conflicts))); }//w w w. ja va2 s . c o m } catch (NumberFormatException ex) { } } }); text.setImage("error", getImage(IMessageProvider.ERROR)); text.setImage("warning", getImage(IMessageProvider.WARNING)); text.setImage("info", getImage(IMessageProvider.INFORMATION)); }