|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TitleAreaDialog
net.sourceforge.rssowl.controller.dialog.LoginDialog
public class LoginDialog
Class displays a Dialog prompting for a username and a password. Will return a BASE64 encoded inputValue that can be used to auth to a webserver.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.jface.window.Window |
|---|
org.eclipse.jface.window.Window.IExceptionHandler |
| Field Summary | |
|---|---|
private java.lang.String |
dialogMessage
|
private static int |
dialogMinWidth
Min. width of the dialog in DLUs |
private Text |
domain
|
private java.lang.String |
domainValue
|
private boolean |
isNtlm
|
(package private) static int |
openDialogsCount
Count number of opened dialogs |
private Text |
password
|
private java.lang.String |
passwordValue
|
private java.lang.String |
pathOrUrl
|
private static java.lang.String |
PROTOCOL_SEPARATOR
Divider between Protocol and Host |
private Button |
saveData
|
private java.lang.String |
title
|
private Text |
username
|
private java.lang.String |
usernameValue
|
| 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 |
|---|
blockedHandler, buttonBar, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS |
| Fields inherited from class org.eclipse.jface.window.Window |
|---|
CANCEL, OK |
| Constructor Summary | |
|---|---|
LoginDialog(Shell parentShell,
java.lang.String dialogTitle,
java.lang.String dialogMessage,
java.lang.String pathOrUrl,
boolean isNtlm)
Creates an input dialog with OK and Cancel buttons. |
|
| Method Summary | |
|---|---|
protected void |
buttonPressed(int buttonId)
|
boolean |
close()
|
protected void |
configureShell(Shell shell)
|
protected void |
createButtonsForButtonBar(Composite parent)
|
protected Control |
createDialogArea(Composite parent)
|
java.lang.String |
getDomain()
Get the entered Domain |
java.lang.String |
getPassword()
Get the entered password |
protected int |
getShellStyle()
|
java.lang.String |
getUsername()
Get the entered username |
protected void |
initializeBounds()
|
int |
open()
|
protected void |
setButtonLayoutData(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. |
| 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, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getOKButton, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutFormData, shortenText |
| Methods inherited from class org.eclipse.jface.window.Window |
|---|
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getInitialLocation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getWindowManager, handleFontChange, handleShellCloseEvent, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int dialogMinWidth
private static final java.lang.String PROTOCOL_SEPARATOR
static int openDialogsCount
private java.lang.String dialogMessage
private Text domain
private java.lang.String domainValue
private boolean isNtlm
private Text password
private java.lang.String passwordValue
private java.lang.String pathOrUrl
private Button saveData
private java.lang.String title
private Text username
private java.lang.String usernameValue
| Constructor Detail |
|---|
public LoginDialog(Shell parentShell,
java.lang.String dialogTitle,
java.lang.String dialogMessage,
java.lang.String pathOrUrl,
boolean isNtlm)
Note that the open method blocks for input dialogs.
parentShell - the parent shelldialogTitle - the dialog title, or null if nonedialogMessage - the dialog dialogMessage, or null if
nonepathOrUrl - The URL where the auth happensisNtlm - TRUE if required Authentication is NTLM (requires Domain)| Method Detail |
|---|
public boolean close()
close in class org.eclipse.jface.dialogs.DialogDialog.close()public java.lang.String getDomain()
public java.lang.String getPassword()
public java.lang.String getUsername()
public int open()
open in class org.eclipse.jface.window.WindowWindow.open()protected void buttonPressed(int buttonId)
buttonPressed in class org.eclipse.jface.dialogs.DialogDialog.buttonPressed(int)protected void configureShell(Shell shell)
configureShell in class org.eclipse.jface.window.WindowWindow.configureShell(org.eclipse.swt.widgets.Shell)protected void createButtonsForButtonBar(Composite parent)
createButtonsForButtonBar in class org.eclipse.jface.dialogs.DialogDialog.createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)protected Control createDialogArea(Composite parent)
createDialogArea in class org.eclipse.jface.dialogs.TitleAreaDialogDialog.createDialogArea(org.eclipse.swt.widgets.Composite)protected int getShellStyle()
getShellStyle in class org.eclipse.jface.window.WindowWindow.getShellStyle()protected void initializeBounds()
initializeBounds in class org.eclipse.jface.dialogs.DialogDialog.initializeBounds()protected void setButtonLayoutData(Button button)
setButtonLayoutData in class org.eclipse.jface.dialogs.Dialogbutton - The button to layout
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||