Example usage for org.eclipse.jface.resource JFaceResources getDialogFont

List of usage examples for org.eclipse.jface.resource JFaceResources getDialogFont

Introduction

In this page you can find the example usage for org.eclipse.jface.resource JFaceResources getDialogFont.

Prototype

public static Font getDialogFont() 

Source Link

Document

Returns the JFace's dialog font.

Usage

From source file:de.innot.avreclipse.ui.preferences.PathsPreferencePage.java

License:Open Source License

@Override
public void createFieldEditors() {

    // This page has two fields:
    // The first one to inhibit the startup search for changed system paths
    // The second to edit all paths.

    Composite parent = getFieldEditorParent();

    Label filler = new Label(parent, SWT.NONE);
    filler.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));

    // Startup search inhibit

    BooleanFieldEditor autoScanBoolean = new BooleanFieldEditor(AVRPathsPreferences.KEY_NOSTARTUPSCAN,
            "Disable search for system paths at startup", BooleanFieldEditor.DEFAULT, parent);
    addField(autoScanBoolean);//from  ww w  .  j  a va 2  s . c  o  m

    Composite note = createNoteComposite(JFaceResources.getDialogFont(), parent, "Note:",
            "If disabled, a manual rescan may be required when a new avr-gcc toolchain has been installed.\n");
    note.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));

    filler = new Label(parent, SWT.NONE);
    filler.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1));

    // Path editor field control.

    AVRPathsFieldEditor pathEditor = new AVRPathsFieldEditor(parent);
    addField(pathEditor);

}

From source file:de.loskutov.anyedit.ui.preferences.SupportPanel.java

License:Open Source License

static void createSupportLinks(Composite defPanel) {
    Composite commonPanel = new Composite(defPanel, SWT.NONE);
    GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;/*  w  w  w .j  a va  2s .c  om*/
    layout.marginWidth = 0;
    commonPanel.setLayout(layout);
    commonPanel.setLayoutData(gridData);

    Font font = JFaceResources.getFontRegistry()
            .getBold(JFaceResources.getDialogFont().getFontData()[0].getName());

    Link link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>visit homepage</a>");
    link.setToolTipText("You need just a sense of humor!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://andrei.gmxhome.de/anyedit");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>report issue or feature request</a>");
    link.setToolTipText("You need a valid google account at google.com!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("https://github.com/iloveeclipse/anyedittools/issues");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your Ohloh software stack</a>");
    link.setToolTipText("You need a valid Ohloh account at ohloh.net!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://www.ohloh.net/p/anyedittools");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your favorites at Eclipse MarketPlace</a>");
    link.setToolTipText("You need a valid bugzilla account at Eclipse.org!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://marketplace.eclipse.org/content/anyedit-tools");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>make a donation to support plugin development</a>");
    link.setToolTipText("You do NOT need a PayPal account!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick(
                    "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R5SHJLNGUXKHU");
        }
    });
}

From source file:de.loskutov.bco.preferences.SupportPanel.java

License:Open Source License

static void createSupportLinks(Composite defPanel) {
    Group commonPanel = new Group(defPanel, SWT.NONE);
    GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;//from ww  w . j ava2 s.  c  o m
    layout.marginWidth = 0;
    commonPanel.setLayout(layout);
    commonPanel.setLayoutData(gridData);
    String pluginName = "BytecodeOutline";
    commonPanel.setText("Support " + pluginName + " plugin and get support too :-)");

    Label label = new Label(commonPanel, SWT.NONE);
    label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    label.setText("Feel free to support " + pluginName + " plugin in the way you like:");

    Font font = JFaceResources.getFontRegistry()
            .getBold(JFaceResources.getDialogFont().getFontData()[0].getName());

    Link link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>visit homepage</a>");
    link.setToolTipText("You need just a sense of humor!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://andrei.gmxhome.de/bytecode");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>report issue or feature request</a>");
    link.setToolTipText("You need a valid account at ow2.org!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://forge.ow2.org/tracker/?group_id=23");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your favorites at Eclipse MarketPlace</a>");
    link.setToolTipText("You need a valid bugzilla account at Eclipse.org!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://marketplace.eclipse.org/content/bytecode-outline");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>make a donation to support plugin development</a>");
    link.setToolTipText("You do NOT need a PayPal account!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick(
                    "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R5SHJLNGUXKHU");
        }
    });
}

From source file:de.loskutov.dh.preferences.SupportPanel.java

License:Open Source License

static void createSupportLinks(Composite defPanel) {
    Group commonPanel = new Group(defPanel, SWT.NONE);
    GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;/* www.  j  a v a 2 s.c om*/
    layout.marginWidth = 0;
    commonPanel.setLayout(layout);
    commonPanel.setLayoutData(gridData);
    commonPanel.setText("Support DataHierarchy plugin and get support too :-)");

    Label label = new Label(commonPanel, SWT.NONE);
    label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    label.setText("Feel free to support DataHierarchy plugin in the way you like:");

    Font font = JFaceResources.getFontRegistry()
            .getBold(JFaceResources.getDialogFont().getFontData()[0].getName());

    Link link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>visit homepage</a>");
    link.setToolTipText("You need just a sense of humor!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://andrei.gmxhome.de/datahierarchy");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>report issue or feature request</a>");
    link.setToolTipText("You need a valid google account at google.com!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("https://github.com/iloveeclipse/datahierarchy/issues");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your Openhub software stack</a>");
    link.setToolTipText("You need a valid Ohloh account at ohloh.net!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("https://www.openhub.net/p/DataHierarchy");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your favorites at Eclipse MarketPlace</a>");
    link.setToolTipText("You need a valid bugzilla account at Eclipse.org!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://marketplace.eclipse.org/content/data-hierarchy");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>make a donation to support plugin development</a>");
    link.setToolTipText("You do NOT need a PayPal account!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick(
                    "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R5SHJLNGUXKHU");
        }
    });
}

From source file:de.loskutov.eclipse.jdepend.preferences.SupportPanel.java

License:Open Source License

static void createSupportLinks(Composite defPanel) {
    Group commonPanel = new Group(defPanel, SWT.NONE);
    GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;//from  w w w. j a v a2s.  co m
    layout.marginWidth = 0;
    commonPanel.setLayout(layout);
    commonPanel.setLayoutData(gridData);
    commonPanel.setText("Support JDepend4Eclipse plugin and get support too :-)");

    Label label = new Label(commonPanel, SWT.NONE);
    label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    label.setText("Feel free to support JDepend4Eclipse plugin in the way you like:");

    Font font = JFaceResources.getFontRegistry()
            .getBold(JFaceResources.getDialogFont().getFontData()[0].getName());

    Link link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>visit homepage</a>");
    link.setToolTipText("You need just a sense of humor!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://andrei.gmxhome.de/jdepend4eclipse");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>report issue or feature request</a>");
    link.setToolTipText("You need a valid google account at google.com!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://code.google.com/a/eclipselabs.org/p/jdepend4eclipse/issues/list");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your Ohloh software stack</a>");
    link.setToolTipText("You need a valid Ohloh account at ohloh.net!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://www.ohloh.net/p/jdepend4eclipse");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your favorites at Eclipse MarketPlace</a>");
    link.setToolTipText("You need a valid bugzilla account at Eclipse.org!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://marketplace.eclipse.org/content/jdepend4eclipse");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>make a donation to support plugin development</a>");
    link.setToolTipText("You do NOT need a PayPal account!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick(
                    "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R5SHJLNGUXKHU");
        }
    });
}

From source file:de.loskutov.eclipseskins.preferences.SupportPanel.java

License:Open Source License

static void createSupportLinks(Composite defPanel) {
    Group commonPanel = new Group(defPanel, SWT.NONE);
    GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;/*w  w  w  .j ava  2 s. c  o m*/
    layout.marginWidth = 0;
    commonPanel.setLayout(layout);
    commonPanel.setLayoutData(gridData);
    commonPanel.setText("Support Extended VS Presentation plugin and get support too :-)");

    Label label = new Label(commonPanel, SWT.NONE);
    label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    label.setText("Feel free to support Extended VS Presentation plugin in the way you like:");

    Font font = JFaceResources.getFontRegistry()
            .getBold(JFaceResources.getDialogFont().getFontData()[0].getName());

    Link link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>visit homepage</a>");
    link.setToolTipText("You need just a sense of humor!");
    link.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
            handleUrlClick("http://andrei.gmxhome.de/skins");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>report issue or feature request</a>");
    link.setToolTipText("You need a valid google account at google.com!");
    link.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
            handleUrlClick("http://code.google.com/a/eclipselabs.org/p/skin4eclipse/issues/list");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your Ohloh software stack</a>");
    link.setToolTipText("You need a valid Ohloh account at ohloh.net!");
    link.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
            handleUrlClick("http://www.ohloh.net/p/skin4eclipse");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your favorites at Eclipse MarketPlace</a>");
    link.setToolTipText("You need a valid bugzilla account at Eclipse.org!");
    link.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
            handleUrlClick("http://marketplace.eclipse.org/content/extended-vs-presentation");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>make a donation to support plugin development</a>");
    link.setToolTipText("You do NOT need a PayPal account!");
    link.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event event) {
            handleUrlClick(
                    "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R5SHJLNGUXKHU");
        }
    });
}

From source file:de.loskutov.fs.properties.SupportPanel.java

License:Open Source License

static void createSupportLinks(Composite defPanel) {
    Group commonPanel = new Group(defPanel, SWT.NONE);
    GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false);
    GridLayout layout = new GridLayout();
    layout.numColumns = 1;/*from  www  .j av a  2s.c om*/
    layout.marginWidth = 0;
    commonPanel.setLayout(layout);
    commonPanel.setLayoutData(gridData);
    commonPanel.setText("Support FileSync plugin and get support too :-)");

    Label label = new Label(commonPanel, SWT.NONE);
    label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
    label.setText("Feel free to support FileSync plugin in the way you like:");

    Font font = JFaceResources.getFontRegistry()
            .getBold(JFaceResources.getDialogFont().getFontData()[0].getName());

    Link link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>visit homepage</a>");
    link.setToolTipText("You need just a sense of humor!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://andrei.gmxhome.de/filesync");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>report issue or feature request</a>");
    link.setToolTipText("You need a valid google account at google.com!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://code.google.com/a/eclipselabs.org/p/filesync4eclipse/issues/list");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your Ohloh software stack</a>");
    link.setToolTipText("You need a valid Ohloh account at ohloh.net!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://www.ohloh.net/p/filesync4eclipse");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>add to your favorites at Eclipse MarketPlace</a>");
    link.setToolTipText("You need a valid bugzilla account at Eclipse.org!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick("http://marketplace.eclipse.org/content/filesync");
        }
    });

    link = new Link(commonPanel, SWT.NONE);
    link.setFont(font);
    link.setText(" - <a>make a donation to support plugin development</a>");
    link.setToolTipText("You do NOT need a PayPal account!");
    link.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event event) {
            handleUrlClick(
                    "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=R5SHJLNGUXKHU");
        }
    });
}

From source file:de.tobject.findbugs.view.BugInfoView.java

License:Open Source License

private void createAnnotationList(Composite parent) {
    ExpandableComposite exp = new ExpandableComposite(parent, SWT.NONE,
            ExpandableComposite.TREE_NODE | ExpandableComposite.COMPACT | ExpandableComposite.EXPANDED
    //                | ExpandableComposite.NO_TITLE
    //                | ExpandableComposite.FOCUS_TITLE
    //                | ExpandableComposite.TITLE_BAR
    //                | ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT
    //| ExpandableComposite.LEFT_TEXT_CLIENT_ALIGNMENT
    );// ww  w .  j av a 2s.c  o m
    exp.addExpansionListener(expansionListener);
    exp.setText("Navigation");
    annotationList = new List(exp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);

    GridData data = new GridData(GridData.FILL_HORIZONTAL);
    exp.setLayoutData(data);
    exp.setClient(annotationList);
    exp.setBackground(parent.getBackground());
    exp.setFont(JFaceResources.getDialogFont());
    annotationList.setFont(JFaceResources.getDialogFont());
    annotationList.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent evnt) {
            selectInEditor(false);
        }
    });
    annotationList.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseDoubleClick(MouseEvent e) {
            selectInEditor(true);
        }
    });
    final Menu menu = new Menu(annotationList);
    final MenuItem item = new MenuItem(menu, SWT.PUSH);
    item.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_COPY));
    item.setText("Copy To Clipboard");
    item.addListener(SWT.Selection, new Listener() {
        @Override
        public void handleEvent(Event e) {
            copyInfoToClipboard();
        }
    });
    menu.addListener(SWT.Show, new Listener() {
        @Override
        public void handleEvent(Event event) {
            item.setEnabled(bug != null);
        }
    });
    annotationList.setToolTipText("Click on lines or methods to go to them");
    annotationList.setMenu(menu);
    annotationList.pack(true);
}

From source file:de.tobject.findbugs.view.properties.BugInstanceSection.java

License:Open Source License

@Override
public void createControls(Composite parent, final TabbedPropertySheetPage tabbedPropertySheetPage) {
    super.createControls(parent, tabbedPropertySheetPage);
    Color background = tabbedPropertySheetPage.getWidgetFactory().getColors().getBackground();

    rootComposite = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout(1, true);
    layout.marginLeft = 5;//from   ww  w. ja v a  2 s  . c  om
    layout.marginTop = 5;
    rootComposite.setLayout(layout);
    rootComposite.setSize(SWT.DEFAULT, SWT.DEFAULT);

    Group group = new Group(rootComposite, SWT.NONE);
    group.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    group.setLayout(new GridLayout(1, false));
    group.setText("Bug annotations:");

    rootComposite.setBackground(background);
    group.setBackground(background);

    annotationList = new List(group, SWT.NONE);
    GridData data = new GridData(GridData.FILL_BOTH);
    data.horizontalIndent = 0;
    data.verticalIndent = 0;
    annotationList.setLayoutData(data);

    annotationList.setFont(JFaceResources.getDialogFont());
    annotationList.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent evnt) {
            selectInEditor(false);
        }
    });
    annotationList.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseDoubleClick(MouseEvent e) {
            selectInEditor(true);
        }
    });
    final Menu menu = new Menu(annotationList);
    final MenuItem item = new MenuItem(menu, SWT.PUSH);
    item.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_COPY));
    item.setText("Copy To Clipboard");
    item.addListener(SWT.Selection, new Listener() {
        public void handleEvent(Event e) {
            copyInfoToClipboard();
        }
    });
    menu.addListener(SWT.Show, new Listener() {
        public void handleEvent(Event event) {
            item.setEnabled(bug != null);
        }
    });
    annotationList.setMenu(menu);

}

From source file:de.uniluebeck.itm.spyglass.gui.CheckboxErrorDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(final Composite parent) {
    final Button button = new Button(parent, SWT.CHECK);
    button.setText("Don't show this message again");
    button.setFont(JFaceResources.getDialogFont());
    button.addSelectionListener(new SelectionAdapter() {
        @Override//from   w ww .j a  v  a  2s.  c o m
        public void widgetSelected(final SelectionEvent event) {
            setDontShowAgain(button.getSelection());
        }
    });
    setButtonLayoutData(button);
    new Label(parent, SWT.NONE);

    // create OK and Details buttons
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createDetailsButton(parent);
}