Package javax.swing

Examples of javax.swing.JLabel.addMouseListener()


        content.setBorder(new EmptyBorder(0, 8, 0, 8));
        content.setSize(content.getPreferredSize());
        content.setIcon(new InfoIcon());
        JLabel label = new JLabel("Click anywhere for more information");
        label.setHorizontalAlignment(SwingConstants.CENTER);
        label.addMouseListener(new MouseAdapter() {
            private MouseListener listener = new MouseAdapter() {
                public void mousePressed(MouseEvent e) {
                    hidePopup(e);
                }
            };
View Full Code Here


                    srcStr = " [" + summaryLines + " " + start + " - " + end + "]";
                }

                label.setToolTipText(clickToGoToText + " " + srcStr);

                label.addMouseListener(new BugSummaryMouseListener(bug, label, link));
            }

            label.setText(link.toString());
        } else if (value instanceof BugAnnotationWithSourceLines) {
            BugAnnotationWithSourceLines note = (BugAnnotationWithSourceLines) value;
View Full Code Here

                    srcStr = " [" + summaryLines + " " + start + " - " + end + "]";
                }

                if (!srcStr.equals("")) {
                    label.setToolTipText(clickToGoToText + " " + srcStr);
                    label.addMouseListener(new BugSummaryMouseListener(bug, label, link));
                }
            }
            String noteText;
            if (note == bug.getPrimaryMethod() || note == bug.getPrimaryField()) {
                noteText = note.toString();
View Full Code Here

        label.setText(str);

        SourceLineAnnotation link = bug.getPrimarySourceLineAnnotation();
        if (link != null) {
            label.addMouseListener(new BugSummaryMouseListener(bug, label, link));
        }

        return label;
    }
View Full Code Here

        if (added == 0) {
            JLabel label = new JLabel("<html>No plugins are loaded.<br> " +
                    "Try installing <u><font color=blue>fb-contrib</font></u> - or write your own<br>" +
                    "plugin for your project's needs!");
            label.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
            label.addMouseListener(new MouseAdapter() {
                @Override
                public void mouseClicked(MouseEvent e) {
                    try {
                        LaunchBrowser.showDocument(new URL("https://sourceforge.net/projects/fb-contrib/"));
                    } catch (MalformedURLException e1) {
View Full Code Here

    }

    // create add button...
    final JLabel addLabel = new JLabel(this.parent.addIcon);
    addLabel.setVisible(projection);
    addLabel.addMouseListener(new MouseAdapter() {
      public void mouseClicked(final MouseEvent me) {
        // create new projection element panel...
        JPanel projectionElement = createProjectionElement(operator, true, operator.getProjectionElements().size(), "");

        // add projection element panel to the right panel...
View Full Code Here

    }

    // create add button...
    final JLabel addLabel = new JLabel(this.parent.addIcon);
    addLabel.setVisible(from);
    addLabel.addMouseListener(new MouseAdapter() {
      public void mouseClicked(final MouseEvent me) {
        // create new from element panel...
        JPanel fromElement = createFromElement(true, operator.getFromList().size(), "");

        fromElementsPanel.add(fromElement); // add from element panel to
View Full Code Here

    }

    // create add button...
    final JLabel addLabel = new JLabel(this.parent.addIcon);
    addLabel.setVisible(fromNamed);
    addLabel.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent me) {
        // create new fromNamed element panel...
        JPanel fromNamedElement = createFromNamedElement(true, operator.getFromNamedList().size(), "");

        fromNamedElementsPanel.add(fromNamedElement); // add fromNamed
View Full Code Here

    }

    // create add button...
    final JLabel addLabel = new JLabel(this.parent.addIcon);
    addLabel.setVisible(orderBy);
    addLabel.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent me) {
        // add spacer if this is not the first element...
        if(orderByElementsList.size() > 0) {
          orderByElementsPanel.add(Box.createRigidArea(new Dimension(10, 3)));
        }
View Full Code Here

    this.projElementsList.add(jtf); // add TextField to projections
    // TextFields list

    final JLabel delLabel = new JLabel(this.parent.delIcon);
    delLabel.setEnabled(active);
    delLabel.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent me) {
        if(delLabel.isEnabled()) { // only process click if label is
          // enabled...
          projElementsList.remove(jtf);
          projElementsDelLabelsList.remove(delLabel);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.