net.sourceforge.rssowl.controller.dialog
Class BlogrollDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TitleAreaDialog
net.sourceforge.rssowl.controller.dialog.BlogrollDialog
- public class BlogrollDialog
- extends org.eclipse.jface.dialogs.TitleAreaDialog
Dialog prompts for a OPML file to import favorites to RSSOwl from a Blogroll.
The list of newsfeeds from the Blogroll will synchronize with RSSOwl on
startup.
- Version:
- 1.1.3
- Author:
- Benjamin Pasero
Nested classes inherited from class org.eclipse.jface.window.Window |
org.eclipse.jface.window.Window.IExceptionHandler |
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog |
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE |
Fields inherited from class org.eclipse.jface.dialogs.Dialog |
buttonBar, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_LOCKED, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING |
Fields inherited from class org.eclipse.jface.window.Window |
CANCEL, OK |
Constructor Summary |
BlogrollDialog(GUI rssOwlGui,
org.eclipse.swt.widgets.Shell parentShell,
String dialogTitle,
String dialogMessage)
Dialog is in "New Blogroll" Mode. |
BlogrollDialog(GUI rssOwlGui,
org.eclipse.swt.widgets.Shell parentShell,
String dialogTitle,
String dialogMessage,
Category blogrollCategory)
Dialog is in "Edit Blogroll" Mode. |
Method Summary |
protected void |
buttonPressed(int buttonId)
|
boolean |
close()
|
protected void |
configureShell(org.eclipse.swt.widgets.Shell shell)
|
protected void |
createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
|
protected org.eclipse.swt.widgets.Control |
createDialogArea(org.eclipse.swt.widgets.Composite parent)
|
private boolean |
importBlogroll()
Try to import the OPML file. |
protected void |
initializeBounds()
|
protected void |
setButtonLayoutData(org.eclipse.swt.widgets.Button button)
Set the layout data of the button to a GridData with appropriate widths
This method was slightly modified so that it is not setting a heightHint. |
protected void |
validateInput()
Validates the input.
|
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog |
createContents, getInitialSize, getTitleArea, getTitleImageLabel, setErrorMessage, setMessage, setMessage, setTitle, setTitleAreaColor, setTitleImage |
Methods inherited from class org.eclipse.jface.dialogs.Dialog |
applyDialogFont, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, dialogFontIsDefault, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeDialogUnits, okPressed, setButtonLayoutFormData |
Methods inherited from class org.eclipse.jface.window.Window |
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getInitialLocation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dialogMinWidth
private static final int dialogMinWidth
- Min. width of the dialog in DLUs
- See Also:
- Constant Field Values
dialogTitle
private String dialogTitle
inputTitle
private org.eclipse.swt.widgets.Text inputTitle
inputUrl
private org.eclipse.swt.widgets.Text inputUrl
isEdit
private boolean isEdit
rssOwlGui
private GUI rssOwlGui
blogrollCategory
Category blogrollCategory
dialogMessage
String dialogMessage
okButton
org.eclipse.swt.widgets.Button okButton
BlogrollDialog
public BlogrollDialog(GUI rssOwlGui,
org.eclipse.swt.widgets.Shell parentShell,
String dialogTitle,
String dialogMessage)
- Dialog is in "New Blogroll" Mode. Creates an input dialog with OK and
Cancel buttons. Prompts for a url / path and a title for a new blogroll.
Note that the dialog will have no visual representation (no widgets) until
it is told to open.
Note that the open
method blocks for input dialogs.
- Parameters:
rssOwlGui
- The Main ControllerparentShell
- the parent shelldialogTitle
- the dialog titledialogMessage
- the dialog dialogMessage
BlogrollDialog
public BlogrollDialog(GUI rssOwlGui,
org.eclipse.swt.widgets.Shell parentShell,
String dialogTitle,
String dialogMessage,
Category blogrollCategory)
- Dialog is in "Edit Blogroll" Mode. Creates an input dialog with OK and
Cancel buttons. Prompts for a url / path and a title for a new blogroll.
Note that the dialog will have no visual representation (no widgets) until
it is told to open.
Note that the open
method blocks for input dialogs.
- Parameters:
rssOwlGui
- The Main ControllerparentShell
- the parent shelldialogTitle
- the dialog titledialogMessage
- the dialog dialogMessageblogrollCategory
- The existing blogroll to edit
close
public boolean close()
- See Also:
Dialog.close()
importBlogroll
private boolean importBlogroll()
- Try to import the OPML file. Shows an error in the Dialog if any exception
occurs.
- Returns:
- boolean TRUE on success, FALSE on fail
buttonPressed
protected void buttonPressed(int buttonId)
- See Also:
Dialog.buttonPressed(int)
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell shell)
- See Also:
Window.configureShell(org.eclipse.swt.widgets.Shell)
createButtonsForButtonBar
protected void createButtonsForButtonBar(org.eclipse.swt.widgets.Composite parent)
- See Also:
Dialog.createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
createDialogArea
protected org.eclipse.swt.widgets.Control createDialogArea(org.eclipse.swt.widgets.Composite parent)
- See Also:
Dialog.createDialogArea(org.eclipse.swt.widgets.Composite)
initializeBounds
protected void initializeBounds()
- See Also:
Dialog.initializeBounds()
setButtonLayoutData
protected void setButtonLayoutData(org.eclipse.swt.widgets.Button button)
- Set the layout data of the button to a GridData with appropriate widths
This method was slightly modified so that it is not setting a heightHint.
- Parameters:
button
- The button to layout
validateInput
protected void validateInput()
- Validates the input.
The default implementation of this framework method delegates the request
to the supplied input validator object; if it finds the input invalid, the
warning dialogMessage is displayed in the dialog's dialogMessage line. This
hook method is called whenever the text changes in the input field.
RSSOwl - RSS / RDF / Atom Newsreader