Package java.awt

Examples of java.awt.Cursor$CursorDisposer


    }

    private void removeLink(JComponent component) {
        this.sourceLink = null;
        component.setEnabled(false);
        component.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        component.setToolTipText("");
    }
View Full Code Here


        }

        @Override
        public void mouseEntered(MouseEvent e) {
            label.setForeground(Color.blue);
            mainFrame.setCursor(new Cursor(Cursor.HAND_CURSOR));
        }
View Full Code Here

        }

        @Override
        public void mouseExited(MouseEvent e) {
            label.setForeground(Color.black);
            mainFrame.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
        }
View Full Code Here

            if (GUI2_DEBUG) {
                System.err.println("acquiring display wait, count " + waitCount);
                Thread.dumpStack();
            }
            if (waitCount == 1) {
                mainFrameTree.showCard(BugCard.WAITCARD, new Cursor(Cursor.WAIT_CURSOR), this);
            }
        }
    }
View Full Code Here

            if (GUI2_DEBUG) {
                System.err.println("releasing display wait, count " + waitCount);
                Thread.dumpStack();
            }
            if (waitCount == 0) {
                mainFrameTree.showCard(BugCard.TREECARD, new Cursor(Cursor.DEFAULT_CURSOR), this);
                previousDecrementToZero = new Exception("Previously decremented at");
            }
        }
    }
View Full Code Here

            model.changeSet(bs);
            // curProject=BugLoader.getLoadedProject();
            comments.updateBugCollection();
            setProjectChanged(true);
        }
        setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
    }
View Full Code Here

        final JMenuItem item = new JMenuItem(name);
        item.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                try {
                    mainFrame.setCursor(new Cursor(Cursor.WAIT_CURSOR));

                    if (!f.exists()) {
                        JOptionPane.showMessageDialog(null,
                                L10N.getLocalString("msg.proj_not_found", "This project can no longer be found"));
                        GUISaveState.getInstance().fileNotFound(f);
                        return;
                    }
                    GUISaveState.getInstance().fileReused(f);// Move to front in
                    // GUISaveState, so
                    // it will be last
                    // thing to be
                    // removed from the
                    // list

                    recentMenuCache.addRecentFile(f);

                    if (!f.exists()) {
                        throw new IllegalStateException("User used a recent projects menu item that didn't exist.");
                    }

                    // Moved this outside of the thread, and above the line
                    // saveFile=f.getParentFile()
                    // Since if this save goes on in the thread below, there is
                    // no way to stop the save from
                    // overwriting the files we are about to load.
                    if (mainFrame.getCurProject() != null && mainFrame.isProjectChanged()) {
                        int response = JOptionPane.showConfirmDialog(mainFrame, L10N.getLocalString("dlg.save_current_changes",
                                "The current project has been changed, Save current changes?"), L10N.getLocalString(
                                        "dlg.save_changes", "Save Changes?"), JOptionPane.YES_NO_CANCEL_OPTION,
                                        JOptionPane.WARNING_MESSAGE);

                        if (response == JOptionPane.YES_OPTION) {
                            if (mainFrame.getSaveFile() != null) {
                                mainFrame.getMainFrameLoadSaveHelper().save();
                            } else {
                                mainFrame.getMainFrameLoadSaveHelper().saveAs();
                            }
                        } else if (response == JOptionPane.CANCEL_OPTION)
                        {
                            return;
                            // IF no, do nothing.
                        }
                    }

                    SaveType st = SaveType.forFile(f);
                    boolean result = true;
                    switch (st) {
                    case XML_ANALYSIS:
                        result = mainFrame.openAnalysis(f, st);
                        break;
                    case FBP_FILE:
                        result = mainFrame.getMainFrameLoadSaveHelper().openFBPFile(f);
                        break;
                    case FBA_FILE:
                        result = mainFrame.getMainFrameLoadSaveHelper().openFBAFile(f);
                        break;
                    default:
                        mainFrame.error("Wrong file type in recent menu item.");
                    }

                    if (!result) {
                        JOptionPane.showMessageDialog(MainFrame.getInstance(), "There was an error in opening the file",
                                "Recent Menu Opening Error", JOptionPane.WARNING_MESSAGE);
                    }
                } finally {
                    mainFrame.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
                    mainFrame.setSaveType(localSaveType);
                }
            }
        });
        item.setFont(item.getFont().deriveFont(Driver.getFontSize()));
View Full Code Here

            userAgent = ua;
        }

        public void handleEvent(Event evt) {
            SVGAElement elt = (SVGAElement)evt.getCurrentTarget();
            Cursor cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
            userAgent.setSVGCursor(cursor);
            userAgent.openLink(elt);
            evt.stopPropagation();
        }
View Full Code Here

            userAgent = ua;
        }

        public void handleEvent(Event evt) {
            SVGAElement elt = (SVGAElement)evt.getCurrentTarget();
            Cursor cursor = Cursor.getPredefinedCursor(Cursor.HAND_CURSOR);
            userAgent.setSVGCursor(cursor);
            if (elt != null) {
                String href = XLinkSupport.getXLinkHref(elt);
                userAgent.displayMessage(href);
            }
View Full Code Here

            userAgent = ua;
        }

        public void handleEvent(Event evt) {
            SVGAElement elt = (SVGAElement)evt.getCurrentTarget();
            Cursor cursor = Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR);
            userAgent.setSVGCursor(cursor);
            userAgent.displayMessage("");
            evt.stopPropagation();
        }
View Full Code Here

TOP

Related Classes of java.awt.Cursor$CursorDisposer

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.