List of usage examples for org.eclipse.jface.resource JFaceResources DIALOG_FONT
String DIALOG_FONT
To view the source code for org.eclipse.jface.resource JFaceResources DIALOG_FONT.
Click Source Link
"org.eclipse.jface.dialogfont"
). From source file:com.hundsun.ares.studio.ui.control.deprecated.FilteredTable.java
License:Open Source License
/** * Return a bold font if the given element matches the given pattern. * Clients can opt to call this method from a Viewer's label provider to get * a bold font for which to highlight the given element in the tree. * //from ww w . ja v a2s.c o m * @param element * element for which a match should be determined * @param table * FilteredTree in which the element resides * @param filter * PatternFilter which determines a match * * @return bold font */ public static Font getBoldFont(Object element, FilteredTable table, PatternFilter filter) { String filterText = table.getFilterString(); if (filterText == null) { return null; } // Do nothing if it's empty string String initialText = table.getInitialText(); if (!("".equals(filterText) || initialText.equals(filterText))) {//$NON-NLS-1$ boolean initial = initialText != null && initialText.equals(filterText); if (initial) { filter.setPattern(null); } else if (filterText != null) { filter.setPattern(filterText); } if (filter.isElementVisible(table.getViewer(), element)) { return JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); } } return null; }
From source file:com.hundsun.ares.studio.ui.grid.table.FilteredGridTable.java
License:Open Source License
/** * Return a bold font if the given element matches the given pattern. * Clients can opt to call this method from a Viewer's label provider to get * a bold font for which to highlight the given element in the tree. * //from w w w . j a va 2s .c o m * @param element * element for which a match should be determined * @param table * FilteredTree in which the element resides * @param filter * PatternFilter which determines a match * * @return bold font */ public static Font getBoldFont(Object element, FilteredGridTable table, PatternFilter filter) { String filterText = table.getFilterString(); if (filterText == null) { return null; } // Do nothing if it's empty string String initialText = table.getInitialText(); if (!("".equals(filterText) || initialText.equals(filterText))) {//$NON-NLS-1$ boolean initial = initialText != null && initialText.equals(filterText); if (initial) { filter.setPattern(null); } else if (filterText != null) { filter.setPattern(filterText); } if (filter.isElementVisible(table.getViewer(), element)) { return JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); } } return null; }
From source file:com.hydra.project.myplugin_nebula.xviewer.util.internal.FilteredTreeComposite.java
License:Open Source License
/** * Return a bold font if the given element matches the given pattern. Clients can opt to call this method from a * Viewer's label provider to get a bold font for which to highlight the given element in the tree. * // w w w .ja va2 s . c o m * @param element element for which a match should be determined * @param tree FilteredTree in which the element resides * @param filter PatternFilter which determines a match * @return bold font */ public static Font getBoldFont(Object element, FilteredTreeComposite tree, PatternFilter filter) { String filterText = tree.getFilterString(); if (filterText == null) { return null; } // Do nothing if it's empty string String initialText = tree.getInitialText(); if (!("".equals(filterText) || initialText.equals(filterText))) {//$NON-NLS-1$ boolean initial = initialText.equals(filterText); if (initial) { filter.setPattern(null); } else { filter.setPattern(filterText); } if (filter.isElementVisible(tree.getViewer(), element) && filter.isLeafMatch(tree.getViewer(), element)) { return JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); } } return null; }
From source file:com.ibm.research.tagging.core.ui.controls.FilteredTable.java
License:Open Source License
/** * Return a bold font if the given element matches the given pattern. * Clients can opt to call this method from a Viewer's label provider to get * a bold font for which to highlight the given element in the tree. * //from w ww. j a v a2 s.c om * @param element * element for which a match should be determined * @param tree * FilteredTree in which the element resides * @param filter * PatternFilter which determines a match * * @return bold font */ public static Font getBoldFont(Object element, FilteredTable tree, NQueryTablePatternFilter filter) { String filterText = tree.getFilterString(); if (filterText == null) { return null; } // Do nothing if it's empty string String initialText = tree.getInitialText(); if (!("".equals(filterText) || initialText.equals(filterText))) {//$NON-NLS-1$ boolean initial = initialText != null && initialText.equals(filterText); if (initial) { filter.setPattern(null); } else if (filterText != null) { filter.setPattern(filterText); } if (filter.isElementVisible(tree.getViewer(), element) && filter.isLeafMatch(tree.getViewer(), element)) { return JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); } } return null; }
From source file:com.kdmanalytics.toif.report.internal.providers.ReportLabelProvider.java
License:Open Source License
@Override public Font getFont(final Object element) { if (element instanceof IFileGroup) { return JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT); }//from ww w .java 2 s. c o m return null; }
From source file:com.liferay.ide.project.ui.pref.AbstractValidationSettingsPage.java
License:Open Source License
protected ExpandableComposite createTwistie(Composite parent, String label, int nColumns) { ExpandableComposite excomposite = new ExpandableComposite(parent, SWT.NONE, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT); excomposite.setText(label);/* ww w . j ava 2s . c om*/ excomposite.setExpanded(false); excomposite.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); excomposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, nColumns, 1)); excomposite.addExpansionListener(new ExpansionAdapter() { @Override public void expansionStateChanged(ExpansionEvent e) { expandedStateChanged((ExpandableComposite) e.getSource()); } }); fExpandables.add(excomposite); makeScrollableCompositeAware(excomposite); return excomposite; }
From source file:com.mindquarry.desktop.preferences.dialog.FilteredPreferenceDialog.java
License:Open Source License
/** * Creates the wizard's title area./*w ww . ja v a 2 s. co m*/ * * @param parent the SWT parent for the title area composite. * @return the created title area composite. */ protected Composite createTitleArea(Composite parent) { // Create the title area which will contain // a title, message, and image. int margins = 2; titleArea = new Composite(parent, SWT.NONE); FormLayout layout = new FormLayout(); layout.marginHeight = 0; layout.marginWidth = margins; titleArea.setLayout(layout); GridData layoutData = new GridData(GridData.FILL_HORIZONTAL); layoutData.verticalAlignment = SWT.TOP; titleArea.setLayoutData(layoutData); // Message label messageArea = new DialogMessageArea(); messageArea.createContents(titleArea); titleArea.addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { updateMessage(); } }); final IPropertyChangeListener fontListener = new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (JFaceResources.BANNER_FONT.equals(event.getProperty())) { updateMessage(); } if (JFaceResources.DIALOG_FONT.equals(event.getProperty())) { updateMessage(); Font dialogFont = JFaceResources.getDialogFont(); updateTreeFont(dialogFont); Control[] children = ((Composite) buttonBar).getChildren(); for (int i = 0; i < children.length; i++) { children[i].setFont(dialogFont); } } } }; titleArea.addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent event) { JFaceResources.getFontRegistry().removeListener(fontListener); } }); JFaceResources.getFontRegistry().addListener(fontListener); messageArea.setTitleLayoutData(createMessageAreaData()); messageArea.setMessageLayoutData(createMessageAreaData()); return titleArea; }
From source file:com.nokia.carbide.internal.discovery.ui.editor.TaskBar.java
License:Open Source License
private void createActions(IActionBar actionBar) { listener = new ActionListener(); linkToActionMap = new HashMap<Hyperlink, IAction>(); for (IAction action : actionBar.getActions()) { Hyperlink link = new Hyperlink(this, SWT.NONE); link.setText(action.getText());/*from w w w .j a v a2 s .com*/ String toolTipText = action.getToolTipText(); if (toolTipText != null) link.setToolTipText(toolTipText); link.setForeground(link.getDisplay().getSystemColor(SWT.COLOR_DARK_BLUE)); link.setBackground(link.getDisplay().getSystemColor(SWT.COLOR_WHITE)); String actionId = action.getId(); String[] highlightedActionIds = actionBar.getHighlightedActionIds(); if (actionId != null && highlightedActionIds != null) { for (String highlightedId : highlightedActionIds) { if (highlightedId.equals(actionId)) { link.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); break; } } } linkToActionMap.put(link, action); link.addHyperlinkListener(listener); } }
From source file:com.nokia.cdt.internal.debug.launch.newwizard.DebugRunProcessDialog.java
License:Open Source License
private void createProcessSelector(Composite composite) { Label label;//from w w w . j a va 2 s. com label = new Label(composite, SWT.WRAP); label.setText( MessageFormat.format(Messages.getString("DebugRunProcessDialog.ModeLabel"), data.getModeLabel())); //$NON-NLS-1$ label.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); GridDataFactory.fillDefaults().grab(true, false).applyTo(composite); Composite radioGroup = new Composite(composite, SWT.NONE); GridDataFactory.fillDefaults().grab(true, false).applyTo(radioGroup); GridLayoutFactory.fillDefaults().extendedMargins(INDENT, 0, 0, 0).numColumns(2).applyTo(radioGroup); createProjectExecutableRadioButton(radioGroup); createRemoteExecutableRadioButton(radioGroup); label = new Label(radioGroup, SWT.SEPARATOR | SWT.HORIZONTAL); GridDataFactory.fillDefaults().grab(true, false).span(2, 1).applyTo(label); createAttachToProcessRadioButton(radioGroup); String msg; if (data.isDebug()) msg = Messages.getString("DebugRunProcessDialog.DebugConfigureMsg"); //$NON-NLS-1$ else msg = Messages.getString("DebugRunProcessDialog.RunConfigureMsg"); //$NON-NLS-1$ setMessage(msg); switch (debugRunProcessWizardData.getExeSelection()) { case USE_PROJECT_EXECUTABLE: projectExecutableRadioButton.setSelection(true); break; case USE_REMOTE_EXECUTABLE: remoteExecutableRadioButton.setSelection(true); break; case ATTACH_TO_PROCESS: attachToProcessRadioButton.setSelection(true); break; } }
From source file:com.nokia.cdt.internal.debug.launch.newwizard.DebugRunProcessDialog.java
License:Open Source License
private void createPackageConfiguration(Composite composite) { Label label;/* w ww . j av a 2 s. c o m*/ label = new Label(composite, SWT.WRAP); label.setText( MessageFormat.format(Messages.getString("DebugRunProcessDialog.DeployLabel"), data.getModeLabel())); //$NON-NLS-1$ label.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT)); GridDataFactory.fillDefaults().grab(true, true).applyTo(composite); packageInfoLabel = new Label(composite, SWT.WRAP); GridDataFactory.fillDefaults().grab(true, false).applyTo(packageInfoLabel); composite.addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { packageInfoLabel.pack(); } }); installPackageCheckbox = new Button(composite, SWT.CHECK); GridDataFactory.fillDefaults().applyTo(installPackageCheckbox); installPackageCheckbox.setText(Messages.getString("DebugRunProcessDialog.InstallBeforeLaunchLabel")); //$NON-NLS-1$ installPackageCheckbox.setToolTipText(Messages.getString("DebugRunProcessDialog.SISCheckboxTooltip")); //$NON-NLS-1$ installPackageUI = new Composite(composite, SWT.NONE); GridDataFactory.fillDefaults().indent(INDENT, 0).applyTo(installPackageUI); createSISContents(installPackageUI); installPackageCheckbox.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { debugRunProcessWizardData.setInstallPackage(installPackageCheckbox.getSelection()); updatePackageUI(); } }); if (debugRunProcessWizardData.isInstallPackage()) { installPackageCheckbox.setSelection(true); updatePackageUI(); } updateSisFile(); updatePackageUI(); }