|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.ui.swt.shells.MessageBoxShell
public class MessageBoxShell
A messagebox that allows you config the button
Field Summary | |
---|---|
protected boolean |
isRemembered
|
static java.lang.String |
STATUS_TEXT_CLOSE
|
protected org.eclipse.swt.graphics.Color |
urlColor
|
Constructor Summary | |
---|---|
MessageBoxShell(int style,
java.lang.String title,
java.lang.String text)
Open a messagebox with actual title and text |
|
MessageBoxShell(int style,
java.lang.String keyPrefix,
java.lang.String[] textParams)
Open a messagebox using resource keys for title/text |
|
MessageBoxShell(org.eclipse.swt.widgets.Shell parent,
java.lang.String title,
java.lang.String text,
java.lang.String[] buttons,
int defaultOption)
Deprecated. |
|
MessageBoxShell(java.lang.String title,
java.lang.String text)
|
|
MessageBoxShell(java.lang.String title,
java.lang.String text,
java.lang.String[] buttons,
int defaultOption)
|
Method Summary | |
---|---|
void |
addCheckBox(java.lang.String cbMessageID,
int cbMinUserMode,
boolean defaultOn)
|
void |
close()
|
int |
getAutoCloseInMS()
Returns the number milliseconds the prompt will wait around until it auto closes. |
java.lang.String[] |
getButtons()
|
boolean |
getCheckBoxEnabled()
|
java.lang.String |
getHtml()
Returns the HTML that will be displayed along with the prompt |
java.lang.Object |
getLeftImage()
|
org.eclipse.swt.widgets.Shell |
getParent()
|
java.lang.Object[] |
getRelatedObjects()
|
java.lang.String |
getRememberID()
Retrieves the Remember ID associated with this prompt |
int |
getRememberOnlyIfButton()
|
java.lang.String |
getRememberText()
Retrieves the text to be displayed by the "Remember this Action" checkbox |
int |
getResult()
|
org.eclipse.swt.graphics.Color |
getUrlColor()
|
boolean |
isAutoClosed()
Determines if the prompt was auto closed after #open() was
called, or if the user chose an option. |
static boolean |
isOpen()
|
boolean |
isRemembered()
|
static void |
main(java.lang.String[] args)
|
int |
open()
Deprecated. |
static void |
open(org.eclipse.swt.widgets.Shell parent,
java.lang.String title,
java.lang.String text,
java.lang.String[] buttons,
int defaultOption,
java.lang.String rememberID,
java.lang.String rememberText,
boolean bRememberByDefault,
int autoCloseInMS,
UserPrompterResultListener l)
|
void |
open(UserPrompterResultListener l)
Opens the prompt. |
void |
setAutoCloseInMS(int autoCloseInMS)
Sets the # of milliseconds before auto closing. |
void |
setBrowserFollowLinks(boolean follow)
|
void |
setButtons(int defaltButtonPos,
java.lang.String[] buttons,
java.lang.Integer[] buttonVals)
|
void |
setButtons(java.lang.String[] buttons)
|
void |
setDefaultButtonUsingStyle(int defaultStyle)
|
void |
setHandleHTML(boolean handleHTML)
|
void |
setHtml(java.lang.String html)
|
void |
setIconResource(java.lang.String resource)
|
void |
setLeftImage(org.eclipse.swt.graphics.Image imgLeft)
|
void |
setLeftImage(int icon)
Replaces Image on left with icon |
void |
setLeftImage(java.lang.String id)
|
void |
setModal(boolean m)
Only use this if you REALLY know what you're doing as in general it is a bad thing - check comments in this class |
void |
setOneInstanceOf(java.lang.String instanceID)
Prevent more than one dialog of instanceID from showing up at once |
void |
setParent(org.eclipse.swt.widgets.Shell parent)
|
void |
setRelatedObject(java.lang.Object relatedObject)
|
void |
setRelatedObjects(java.lang.Object[] relatedObjects)
|
void |
setRemember(java.lang.String rememberID,
boolean rememberByDefault,
java.lang.String rememberText)
|
void |
setRememberOnlyIfButton(int rememberOnlyIfButton)
|
void |
setRememberText(java.lang.String rememberText)
|
void |
setSize(int width,
int height)
|
void |
setSquish(boolean b)
|
void |
setUrl(java.lang.String url)
|
void |
setUrlColor(org.eclipse.swt.graphics.Color colorURL)
|
void |
setUseTextBox(boolean useTextBox)
|
boolean |
useTextBox()
|
int |
waitUntilClosed()
NOT RECOMMENDED! |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String STATUS_TEXT_CLOSE
protected org.eclipse.swt.graphics.Color urlColor
protected boolean isRemembered
Constructor Detail |
---|
public MessageBoxShell(java.lang.String title, java.lang.String text, java.lang.String[] buttons, int defaultOption)
shellForChildren
- string
- string2
- strings
- @Deprecated public MessageBoxShell(org.eclipse.swt.widgets.Shell parent, java.lang.String title, java.lang.String text, java.lang.String[] buttons, int defaultOption)
public MessageBoxShell(java.lang.String title, java.lang.String text)
public MessageBoxShell(int style, java.lang.String keyPrefix, java.lang.String[] textParams)
parent
- Parent shell for messageboxstyle
- SWT styles for messageboxkeyPrefix
- message bundle key prefix used to get title and text.
Title will be keyPrefix + ".title", and text will be set to
keyPrefix + ".text"textParams
- any parameters for textpublic MessageBoxShell(int style, java.lang.String title, java.lang.String text)
parent
- style
- title
- text
- Method Detail |
---|
public static void open(org.eclipse.swt.widgets.Shell parent, java.lang.String title, java.lang.String text, java.lang.String[] buttons, int defaultOption, java.lang.String rememberID, java.lang.String rememberText, boolean bRememberByDefault, int autoCloseInMS, UserPrompterResultListener l)
public static boolean isOpen()
public void setDefaultButtonUsingStyle(int defaultStyle)
@Deprecated public int open()
Use open(UserPrompterResultListener)
public void open(UserPrompterResultListener l)
UIFunctionsUserPrompter
open
in interface UIFunctionsUserPrompter
public java.lang.String getHtml()
UIFunctionsUserPrompter
TODO: Create a boolean canHandleHTML()
getHtml
in interface UIFunctionsUserPrompter
public void setHtml(java.lang.String html)
setHtml
in interface UIFunctionsUserPrompter
public void setUrl(java.lang.String url)
setUrl
in interface UIFunctionsUserPrompter
public void setSize(int width, int height)
public java.lang.String getRememberID()
UIFunctionsUserPrompter
getRememberID
in interface UIFunctionsUserPrompter
public void setRemember(java.lang.String rememberID, boolean rememberByDefault, java.lang.String rememberText)
setRemember
in interface UIFunctionsUserPrompter
rememberID
- rememberByDefault
- rememberText
- null if you want the defaultpublic java.lang.String getRememberText()
UIFunctionsUserPrompter
getRememberText
in interface UIFunctionsUserPrompter
public void setRememberText(java.lang.String rememberText)
setRememberText
in interface UIFunctionsUserPrompter
rememberText
- the rememberText to setpublic int getAutoCloseInMS()
UIFunctionsUserPrompter
#open()
is
called), and typically does not decrease while the user is viewing the
prompt (certain implementations may operate differently)
getAutoCloseInMS
in interface UIFunctionsUserPrompter
public void setAutoCloseInMS(int autoCloseInMS)
UIFunctionsUserPrompter
#open()
is
called), and typically does not decrease while the user is viewing the
prompt (certain implementations may operate differently)
setAutoCloseInMS
in interface UIFunctionsUserPrompter
autoCloseInMS
- the autoCloseInMS to setpublic void setSquish(boolean b)
public boolean isAutoClosed()
UIFunctionsUserPrompter
#open()
was
called, or if the user chose an option.
isAutoClosed
in interface UIFunctionsUserPrompter
public void setModal(boolean m)
m
- public void setRelatedObject(java.lang.Object relatedObject)
setRelatedObject
in interface UIFunctionsUserPrompter
public void setRelatedObjects(java.lang.Object[] relatedObjects)
setRelatedObjects
in interface UIFunctionsUserPrompter
public java.lang.Object[] getRelatedObjects()
public java.lang.Object getLeftImage()
public void setLeftImage(org.eclipse.swt.graphics.Image imgLeft)
public void setLeftImage(int icon)
icon
- SWT.ICON_ERROR, ICON_INFORMATION, ICON_QUESTION, ICON_WARNING, ICON_WORKINGpublic void setIconResource(java.lang.String resource)
setIconResource
in interface UIFunctionsUserPrompter
resource
- image repository resource name (e.g. "error", "warning", "info")public static void main(java.lang.String[] args)
public int getRememberOnlyIfButton()
public void setRememberOnlyIfButton(int rememberOnlyIfButton)
setRememberOnlyIfButton
in interface UIFunctionsUserPrompter
public org.eclipse.swt.graphics.Color getUrlColor()
public void setBrowserFollowLinks(boolean follow)
public void setUrlColor(org.eclipse.swt.graphics.Color colorURL)
public void setHandleHTML(boolean handleHTML)
b
- public boolean isRemembered()
public int waitUntilClosed()
TODO: Occasionaly inspect list of callers and make them use
UserPrompterResultListener
if possible
waitUntilClosed
in interface UIFunctionsUserPrompter
public int getResult()
public java.lang.String[] getButtons()
public void setButtons(java.lang.String[] buttons)
public void setButtons(int defaltButtonPos, java.lang.String[] buttons, java.lang.Integer[] buttonVals)
public void addCheckBox(java.lang.String cbMessageID, int cbMinUserMode, boolean defaultOn)
public boolean getCheckBoxEnabled()
public org.eclipse.swt.widgets.Shell getParent()
public void setParent(org.eclipse.swt.widgets.Shell parent)
public void close()
public void setUseTextBox(boolean useTextBox)
useTextBox
- The useTextBox to set.public boolean useTextBox()
public void setLeftImage(java.lang.String id)
public void setOneInstanceOf(java.lang.String instanceID)
UIFunctionsUserPrompter
setOneInstanceOf
in interface UIFunctionsUserPrompter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |