Examples of GanttDialogInfo


Examples of net.sourceforge.ganttproject.gui.GanttDialogInfo

            } else if (button.getName().equals("cancel")) {
                this.setVisible(false);
                dispose();
            } else if (button.getName().equals("remove")) {
                GanttDialogInfo gdi = new GanttDialogInfo(myProject,
                        GanttDialogInfo.WARNING, GanttDialogInfo.YES_NO_OPTION,
                        lang.getText("msg25"), lang.getText("warning"));
                gdi.show();
                if (gdi.res == GanttDialogInfo.YES) {
                    compareToPreviousBean.removeItem();

                    // this.setVisible(false);
                    // dispose();
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.GanttDialogInfo

          }
        }
      }
      else
      {
        GanttDialogInfo gdi = new GanttDialogInfo(
                    appli, GanttDialogInfo.INFO,
                    GanttDialogInfo.YES_OPTION, GanttLanguage.getInstance()
                            .getText("msg26"),
                    GanttLanguage.getInstance().getText("sendMail"));
            gdi.show();
      }
    }
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.GanttDialogInfo

                boolean overWrite = true;
                for (int i = 0; i < myProject.getPreviouStates().size(); i++)
                    if (((GanttPreviousState) myProject.getPreviouStates().get(
                            i)).getName().equals(previousStateBean.getName())) {
                        GanttDialogInfo gdi = new GanttDialogInfo(myProject,
                                GanttDialogInfo.WARNING,
                                GanttDialogInfo.YES_NO_OPTION,
                                previousStateBean.getName() + "\n"
                                        + lang.getText("msg18"), lang
                                        .getText("warning"));
                        gdi.show();
                        if (gdi.res == GanttDialogInfo.YES)
                            myProject.getPreviouStates().remove(i);
                        else
                            overWrite = false;
                        break;
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.GanttDialogInfo

                .getText("openWebLink")));
        bWeb.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                // link to open the web link
                if (!BrowserControl.displayURL(tfWebLink.getText())) {
                    GanttDialogInfo gdi = new GanttDialogInfo(null,
                            GanttDialogInfo.ERROR, GanttDialogInfo.YES_OPTION,
                            language.getText("msg4"), language.getText("error"));
                    gdi.show();
                }
            }
        });

        JPanel webPanel = new JPanel(new BorderLayout());
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.GanttDialogInfo

    /**
     * Check if the project has been modified, before creating a new one or open
     * another
     */
    public boolean checkCurrentProject() {
        GanttDialogInfo gdiSaveError = new GanttDialogInfo(this,
                GanttDialogInfo.ERROR, GanttDialogInfo.YES_NO_CANCEL_OPTION,
                language.getText("msg12"), language.getText("error"));
        boolean trySave = true;
        if (askForSave == true) {
            UIFacade.Choice saveChoice = getUIFacade().showConfirmationDialog(language.getText("msg1"), language.getText("warning"));
            if (UIFacade.Choice.CANCEL==saveChoice) {
                return false;
            }
            if (UIFacade.Choice.YES==saveChoice) {
                do {
                    try {
                        trySave = false;
                        saveProject();
                    } catch (Exception e) {
                      if (!GPLogger.log(e)) {
                        e.printStackTrace(System.err);
                      }
                        gdiSaveError.show();
                        if (gdiSaveError.res == GanttDialogInfo.CANCEL)
                            return false;
                        trySave = (gdiSaveError.res == GanttDialogInfo.YES);
                    }
                } while (trySave);
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.GanttDialogInfo

    }

    /** Open the web page */
    public void openWebPage() throws IOException {
        if (!BrowserControl.displayURL("http://ganttproject.biz/")) {
            GanttDialogInfo gdi = new GanttDialogInfo(this,
                    GanttDialogInfo.ERROR, GanttDialogInfo.YES_OPTION, language
                            .getText("msg4"), language.getText("error"));
            gdi.show();
            return;
        }
        getUIFacade().setStatusText(GanttLanguage.getInstance().getText("opening")
                + " www.ganttproject.biz");
    }
View Full Code Here

Examples of net.sourceforge.ganttproject.gui.GanttDialogInfo

        myStatusBar.setFirstText(text, 2000);
    }

    public void showErrorDialog(String errorMessage) {
        if (myMainFrame.isVisible()) {
            GanttDialogInfo gdi = new GanttDialogInfo(myMainFrame,
                    GanttDialogInfo.ERROR, GanttDialogInfo.YES_OPTION, errorMessage,
                    getLanguage().getText("error"));
            gdi.show();
        } else {
            System.err.println("[GanttProjectBase] showErrorDialog:\n "+errorMessage);
        }
    }
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.