|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gudy.azureus2.ui.swt.shells.MessageBoxShell
public class MessageBoxShell
A messagebox that allows you config the button
| Field Summary | |
|---|---|
protected boolean |
isRemembered
|
static String |
STATUS_TEXT_CLOSE
|
protected org.eclipse.swt.graphics.Color |
urlColor
|
| Constructor Summary | |
|---|---|
MessageBoxShell(int style,
String title,
String text)
Open a messagebox with actual title and text |
|
MessageBoxShell(int style,
String keyPrefix,
String[] textParams)
Open a messagebox using resource keys for title/text |
|
MessageBoxShell(org.eclipse.swt.widgets.Shell parent,
String title,
String text,
String[] buttons,
int defaultOption)
Deprecated. |
|
MessageBoxShell(String title,
String text)
|
|
MessageBoxShell(String title,
String text,
String[] buttons,
int defaultOption)
|
|
| Method Summary | |
|---|---|
void |
addCheckBox(String cbMessageID,
int cbMinUserMode,
boolean defaultOn)
|
void |
close()
|
int |
getAutoCloseInMS()
Returns the number milliseconds the prompt will wait around until it auto closes. |
String[] |
getButtons()
|
boolean |
getCheckBoxEnabled()
|
String |
getHtml()
Returns the HTML that will be displayed along with the prompt |
Object |
getLeftImage()
|
org.eclipse.swt.widgets.Shell |
getParent()
|
Object[] |
getRelatedObjects()
|
String |
getRememberID()
Retrieves the Remember ID associated with this prompt |
int |
getRememberOnlyIfButton()
|
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(String[] args)
|
int |
open()
Deprecated. |
static void |
open(org.eclipse.swt.widgets.Shell parent,
String title,
String text,
String[] buttons,
int defaultOption,
String rememberID,
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,
String[] buttons,
Integer[] buttonVals)
|
void |
setButtons(String[] buttons)
|
void |
setDefaultButtonUsingStyle(int defaultStyle)
|
void |
setHandleHTML(boolean handleHTML)
|
void |
setHtml(String html)
|
void |
setIconResource(String resource)
|
void |
setLeftImage(org.eclipse.swt.graphics.Image imgLeft)
|
void |
setLeftImage(int icon)
Replaces Image on left with icon |
void |
setLeftImage(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(String instanceID)
Prevent more than one dialog of instanceID from showing up at once |
void |
setParent(org.eclipse.swt.widgets.Shell parent)
|
void |
setRelatedObject(Object relatedObject)
|
void |
setRelatedObjects(Object[] relatedObjects)
|
void |
setRemember(String rememberID,
boolean rememberByDefault,
String rememberText)
|
void |
setRememberOnlyIfButton(int rememberOnlyIfButton)
|
void |
setRememberText(String rememberText)
|
void |
setSize(int width,
int height)
|
void |
setSquish(boolean b)
|
void |
setUrl(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 String STATUS_TEXT_CLOSE
protected org.eclipse.swt.graphics.Color urlColor
protected boolean isRemembered
| Constructor Detail |
|---|
public MessageBoxShell(String title,
String text,
String[] buttons,
int defaultOption)
shellForChildren - string - string2 - strings -
@Deprecated
public MessageBoxShell(org.eclipse.swt.widgets.Shell parent,
String title,
String text,
String[] buttons,
int defaultOption)
public MessageBoxShell(String title,
String text)
public MessageBoxShell(int style,
String keyPrefix,
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 text
public MessageBoxShell(int style,
String title,
String text)
parent - style - title - text - | Method Detail |
|---|
public static void open(org.eclipse.swt.widgets.Shell parent,
String title,
String text,
String[] buttons,
int defaultOption,
String rememberID,
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 UIFunctionsUserPrompterpublic String getHtml()
UIFunctionsUserPrompterTODO: Create a boolean canHandleHTML()
getHtml in interface UIFunctionsUserPrompterpublic void setHtml(String html)
setHtml in interface UIFunctionsUserPrompterpublic void setUrl(String url)
setUrl in interface UIFunctionsUserPrompter
public void setSize(int width,
int height)
public String getRememberID()
UIFunctionsUserPrompter
getRememberID in interface UIFunctionsUserPrompter
public void setRemember(String rememberID,
boolean rememberByDefault,
String rememberText)
setRemember in interface UIFunctionsUserPrompterrememberID - rememberByDefault - rememberText - null if you want the defaultpublic String getRememberText()
UIFunctionsUserPrompter
getRememberText in interface UIFunctionsUserPrompterpublic void setRememberText(String rememberText)
setRememberText in interface UIFunctionsUserPrompterrememberText - 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 UIFunctionsUserPrompterpublic 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 UIFunctionsUserPrompterautoCloseInMS - 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 UIFunctionsUserPrompterpublic void setModal(boolean m)
m - public void setRelatedObject(Object relatedObject)
setRelatedObject in interface UIFunctionsUserPrompterpublic void setRelatedObjects(Object[] relatedObjects)
setRelatedObjects in interface UIFunctionsUserPrompterpublic Object[] getRelatedObjects()
public 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(String resource)
setIconResource in interface UIFunctionsUserPrompterresource - image repository resource name (e.g. "error", "warning", "info")public static void main(String[] args)
public int getRememberOnlyIfButton()
public void setRememberOnlyIfButton(int rememberOnlyIfButton)
setRememberOnlyIfButton in interface UIFunctionsUserPrompterpublic 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 UIFunctionsUserPrompterpublic int getResult()
public String[] getButtons()
public void setButtons(String[] buttons)
public void setButtons(int defaltButtonPos,
String[] buttons,
Integer[] buttonVals)
public void addCheckBox(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(String id)
public void setOneInstanceOf(String instanceID)
UIFunctionsUserPrompter
setOneInstanceOf in interface UIFunctionsUserPrompter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||