List of usage examples for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID
int CANCEL_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID.
Click Source Link
From source file:com.astra.ses.spell.gui.dialogs.DictionaryNameDialog.java
License:Open Source License
/*************************************************************************** * Create the button bar buttons./* ww w . j a v a 2 s . c o m*/ * * @param parent * The Button Bar. **************************************************************************/ protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); getButton(IDialogConstants.OK_ID).setEnabled(false); }
From source file:com.astra.ses.spell.gui.dialogs.DictionaryNameDialog.java
License:Open Source License
/*************************************************************************** * Called when one of the buttons of the button bar is pressed. * /*ww w. j a va 2 s.c o m*/ * @param buttonId * The button identifier. **************************************************************************/ protected void buttonPressed(int buttonId) { setReturnCode(buttonId); switch (buttonId) { case IDialogConstants.OK_ID: m_selectedNameStr = m_selectedName.getText(); if (m_selectedNameStr.trim().isEmpty()) m_selectedNameStr = null; break; case IDialogConstants.CANCEL_ID: m_selectedNameStr = null; break; } close(); }
From source file:com.astra.ses.spell.gui.dialogs.GotoDialog.java
License:Open Source License
/*************************************************************************** * Called when one of the buttons of the button bar is pressed. * //from w w w. j a v a 2 s . com * @param buttonId * The button identifier. **************************************************************************/ protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: m_target = m_input.getText(); if (m_typeLine.getSelection()) { try { Integer.parseInt(m_target); } catch (NumberFormatException ex) { MessageDialog.openError(getShell(), "Input error", "Shall provide a valid line number"); } } else { if (m_target.trim().isEmpty()) { MessageDialog.openError(getShell(), "Input error", "Shall provide a valid step label"); return; } } m_isLabel = m_typeLabel.getSelection(); close(); break; case IDialogConstants.CANCEL_ID: m_target = null; m_isLabel = false; close(); break; } }
From source file:com.astra.ses.spell.gui.dialogs.LongTextDialog.java
License:Open Source License
/*************************************************************************** * Create the button bar buttons.//from www. ja va2 s .c o m * * @param parent * The Button Bar. **************************************************************************/ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, "Ok", m_infoOnly); if (!m_infoOnly) { createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", true); } }
From source file:com.astra.ses.spell.gui.dialogs.PrintDialog.java
License:Open Source License
/*************************************************************************** * Called when one of the buttons of the button bar is pressed. * //from w w w . j a va 2s. c o m * @param buttonId * The button identifier. **************************************************************************/ protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: int page = m_printData.getSelectionIndex(); Logger.debug("Selected for printing: " + page, Level.GUI, this); //s_mgr.printActiveProc( page ); case IDialogConstants.CANCEL_ID: close(); } }
From source file:com.astra.ses.spell.gui.dialogs.PromptDialog.java
License:Open Source License
/*************************************************************************** * Create the button bar buttons.// w w w . j ava 2 s.co m * * @param parent * The Button Bar. **************************************************************************/ protected void createButtonsForButtonBar(Composite parent) { if (m_type == OPT_OK) createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); else if (m_type == OPT_YES) createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true); else if (m_type == OPT_NO) createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, false); else if (m_type == OPT_CANCEL) createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); else if (m_type == OPT_NUM || m_type == OPT_ALPHA || m_type == OPT_ANY) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } else if (m_type == OPT_YES_NO) { createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, true); createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, false); } else if (m_type == OPT_OK_CANCEL) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } }
From source file:com.astra.ses.spell.gui.dialogs.PromptDialog.java
License:Open Source License
/*************************************************************************** * Called when one of the buttons of the button bar is pressed. * //from w ww . j a v a 2 s.c om * @param buttonId * The button identifier. **************************************************************************/ protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: case IDialogConstants.CANCEL_ID: case IDialogConstants.YES_ID: case IDialogConstants.NO_ID: if (m_input == null) { if (buttonId == IDialogConstants.OK_ID) m_future.set("TRUE"); if (buttonId == IDialogConstants.YES_ID) m_future.set("TRUE"); if (buttonId == IDialogConstants.CANCEL_ID) m_future.set("FALSE"); if (buttonId == IDialogConstants.NO_ID) m_future.set("FALSE"); } else { String txt = m_input.getText(); m_future.set(txt); } } close(); }
From source file:com.astra.ses.spell.gui.dialogs.ServerFileSaveDialog.java
License:Open Source License
/*************************************************************************** * Create the button bar buttons.//from w ww . j a va 2s . c o m * * @param parent * The Button Bar. **************************************************************************/ @Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, false); getButton(IDialogConstants.OK_ID).setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true); }
From source file:com.astra.ses.spell.gui.dialogs.ServerFileSaveDialog.java
License:Open Source License
/*************************************************************************** * Called when one of the buttons of the button bar is pressed. * // ww w .j a v a 2 s. c om * @param buttonId * The button identifier. **************************************************************************/ @Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) { } else if (buttonId == IDialogConstants.CANCEL_ID) { m_path = null; } close(); }
From source file:com.astra.ses.spell.gui.dialogs.ServerFileSelectionDialog.java
License:Open Source License
/*************************************************************************** * Called when one of the buttons of the button bar is pressed. * //from ww w . ja va 2 s .c o m * @param buttonId * The button identifier. **************************************************************************/ @Override protected void buttonPressed(int buttonId) { if (buttonId == IDialogConstants.OK_ID) { } else if (buttonId == IDialogConstants.CANCEL_ID) { m_selected = null; } close(); }