Package com.intellij.ui.components

Examples of com.intellij.ui.components.JBLabel


public class ErrorPanel extends JPanel {

    public ErrorPanel(final Exception ex) {
        setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
        setBackground(JBColor.RED);
        add(new JBLabel("Error during query execution"));
        final HoverHyperlinkLabel hoverHyperlinkLabel = new HoverHyperlinkLabel("more detail...");
        hoverHyperlinkLabel.addHyperlinkListener(new HyperlinkListener() {
            @Override
            public void hyperlinkUpdate(HyperlinkEvent hyperlinkEvent) {
                if (hyperlinkEvent.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
View Full Code Here


        list.setCellRenderer(new ListCellRenderer()
        {
            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
            {
                @SuppressWarnings({"unchecked"})
                final JComponent comp = new JBLabel(((JSVariable) value).getName());
                comp.setOpaque(true);
                if (isSelected)
                {
                    comp.setBackground(list.getSelectionBackground());
                    comp.setForeground(list.getSelectionForeground());
                }
                else
                {
                    comp.setBackground(list.getBackground());
                    comp.setForeground(list.getForeground());
                }
                return comp;
            }
        });
View Full Code Here

TOP

Related Classes of com.intellij.ui.components.JBLabel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.