Class MessageArea
- java.lang.Object
-
- org.eclipse.nebula.widgets.opal.dialog.DialogArea
-
- org.eclipse.nebula.widgets.opal.dialog.MessageArea
-
public class MessageArea extends DialogArea
Instances of this class are message areas
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.swt.widgets.Composite
bottomComponent
private java.lang.String
checkBoxLabel
private boolean
checkBoxValue
private int
choice
private int
choiceDefaultSelection
private ChoiceItem[]
choiceValues
private org.eclipse.swt.widgets.Composite
composite
private static int
DEFAULT_MARGIN
private java.lang.Throwable
exception
private int
height
private org.eclipse.swt.graphics.Image
icon
private static int
INDENT_NO_ICON
private org.eclipse.swt.custom.StyledText
label
private org.eclipse.swt.widgets.ProgressBar
progressBar
private int
progressBarMaximumValue
private int
progressBarMinimumValue
private int
progressBarValue
private int
radioChoice
private int
radioDefaultSelection
private java.lang.String[]
radioValues
private java.lang.String
text
private java.lang.String
textBoxValue
private org.eclipse.swt.widgets.Text
textException
private java.lang.String
title
private boolean
verticalScrollbar
-
Fields inherited from class org.eclipse.nebula.widgets.opal.dialog.DialogArea
parent
-
-
Constructor Summary
Constructors Constructor Description MessageArea(Dialog parent)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageArea
addCheckBox(java.lang.String label, boolean selection)
Add a check boxMessageArea
addChoice(int defaultSelection, ChoiceItem... items)
Add a choiceMessageArea
addProgressBar(int mininum, int maximum, int value)
Add a progress barMessageArea
addRadioButtons(int defaultSelection, java.lang.String... values)
Add a choice composed of radio buttonsMessageArea
addTextBox(java.lang.String value)
Add a text box for inputprivate void
createCheckBox()
Create a check boxprivate void
createChoice()
Create a choice selectionprivate void
createIcon(int numberOfRows)
Create the iconprivate void
createProgressBar()
Create a progress barprivate void
createRadioButtons()
Create radio buttonsprivate void
createText(boolean hasIcon, boolean hasTitle)
Create the textprivate void
createTextBox()
Create a text boxprivate void
createTextException()
Create the text that displays an exceptionprivate void
createTitle(boolean hasIcon)
Create the titleboolean
getCheckBoxValue()
int
getChoice()
java.lang.Throwable
getException()
int
getHeight()
org.eclipse.swt.graphics.Image
getIcon()
int
getProgressBarMaximumValue()
int
getProgressBarMinimumValue()
int
getProgressBarValue()
int
getRadioChoice()
java.lang.String
getText()
java.lang.String
getTextBoxValue()
java.lang.String
getTitle()
(package private) void
hideException()
Hide the exception panelboolean
isVerticalScrollbar()
void
render()
Render the content of an areaMessageArea
setException(java.lang.Throwable exception)
void
setHeight(int height)
MessageArea
setIcon(org.eclipse.swt.graphics.Image icon)
void
setProgressBarMaximumValue(int progressBarMaximumValue)
void
setProgressBarMinimumValue(int progressBarMinimumValue)
void
setProgressBarValue(int progressBarValue)
MessageArea
setText(java.lang.String text)
MessageArea
setTitle(java.lang.String title)
void
setVerticalScrollbar(boolean verticalScrollbar)
(package private) void
showException()
Show the exception panel-
Methods inherited from class org.eclipse.nebula.widgets.opal.dialog.DialogArea
getBiggerFont, getFewerDetailsImage, getGreyColor, getMoreDetailsImage, getNormalFont, getTitleColor, isInitialised, setInitialised
-
-
-
-
Field Detail
-
INDENT_NO_ICON
private static final int INDENT_NO_ICON
- See Also:
- Constant Field Values
-
DEFAULT_MARGIN
private static final int DEFAULT_MARGIN
- See Also:
- Constant Field Values
-
composite
private org.eclipse.swt.widgets.Composite composite
-
title
private java.lang.String title
-
icon
private org.eclipse.swt.graphics.Image icon
-
text
private java.lang.String text
-
radioChoice
private int radioChoice
-
radioDefaultSelection
private int radioDefaultSelection
-
radioValues
private java.lang.String[] radioValues
-
exception
private java.lang.Throwable exception
-
textException
private org.eclipse.swt.widgets.Text textException
-
textBoxValue
private java.lang.String textBoxValue
-
choice
private int choice
-
choiceDefaultSelection
private int choiceDefaultSelection
-
choiceValues
private ChoiceItem[] choiceValues
-
progressBar
private org.eclipse.swt.widgets.ProgressBar progressBar
-
progressBarMinimumValue
private int progressBarMinimumValue
-
progressBarMaximumValue
private int progressBarMaximumValue
-
progressBarValue
private int progressBarValue
-
verticalScrollbar
private boolean verticalScrollbar
-
height
private int height
-
label
private org.eclipse.swt.custom.StyledText label
-
checkBoxLabel
private java.lang.String checkBoxLabel
-
checkBoxValue
private boolean checkBoxValue
-
bottomComponent
private org.eclipse.swt.widgets.Composite bottomComponent
-
-
Constructor Detail
-
MessageArea
public MessageArea(Dialog parent)
Constructor- Parameters:
parent
- dialog that is composed of this message area
-
-
Method Detail
-
addChoice
public MessageArea addChoice(int defaultSelection, ChoiceItem... items)
Add a choice- Parameters:
defaultSelection
- default selectionitems
- a list of the choice item- Returns:
- the current message area
-
addRadioButtons
public MessageArea addRadioButtons(int defaultSelection, java.lang.String... values)
Add a choice composed of radio buttons- Parameters:
defaultSelection
- default selectionvalues
- values- Returns:
- the current message area
-
addTextBox
public MessageArea addTextBox(java.lang.String value)
Add a text box for input- Parameters:
value
- defaut value of the textbox- Returns:
- the current message area
-
addProgressBar
public MessageArea addProgressBar(int mininum, int maximum, int value)
Add a progress bar- Parameters:
mininum
- minimum valuemaximum
- maximum valuevalue
- default value- Returns:
- the current message area
-
addCheckBox
public MessageArea addCheckBox(java.lang.String label, boolean selection)
Add a check box- Parameters:
label
- label to displayselection
- default value of the check box- Returns:
- this message area
-
render
public void render()
Description copied from class:DialogArea
Render the content of an area- Specified by:
render
in classDialogArea
- See Also:
DialogArea.render()
-
createIcon
private void createIcon(int numberOfRows)
Create the icon- Parameters:
numberOfRows
- number of rows displayed
-
createTitle
private void createTitle(boolean hasIcon)
Create the title- Parameters:
hasIcon
- iftrue
an icon is displayed
-
createText
private void createText(boolean hasIcon, boolean hasTitle)
Create the text- Parameters:
hasIcon
- iftrue
an icon is displayedhasTitle
- iftrue
a title is displayed
-
createRadioButtons
private void createRadioButtons()
Create radio buttons
-
createTextException
private void createTextException()
Create the text that displays an exception
-
createTextBox
private void createTextBox()
Create a text box
-
createChoice
private void createChoice()
Create a choice selection
-
createProgressBar
private void createProgressBar()
Create a progress bar
-
createCheckBox
private void createCheckBox()
Create a check box- Parameters:
numberOfColumns
-
-
hideException
void hideException()
Hide the exception panel
-
showException
void showException()
Show the exception panel
-
getTitle
public java.lang.String getTitle()
- Returns:
- the title
-
setTitle
public MessageArea setTitle(java.lang.String title)
- Parameters:
title
- the title to set- Returns:
- the current message area
-
getIcon
public org.eclipse.swt.graphics.Image getIcon()
- Returns:
- the icon
-
setIcon
public MessageArea setIcon(org.eclipse.swt.graphics.Image icon)
- Parameters:
icon
- the icon to set
-
getText
public java.lang.String getText()
- Returns:
- the text
-
setText
public MessageArea setText(java.lang.String text)
- Parameters:
text
- the text to set
-
getRadioChoice
public int getRadioChoice()
- Returns:
- the radio choice
-
getException
public java.lang.Throwable getException()
- Returns:
- the exception
-
setException
public MessageArea setException(java.lang.Throwable exception)
- Parameters:
exception
- the exception to set- Returns:
-
getChoice
public int getChoice()
- Returns:
- the choice
-
getTextBoxValue
public java.lang.String getTextBoxValue()
- Returns:
- the value stored in the text box
-
getProgressBarMinimumValue
public int getProgressBarMinimumValue()
- Returns:
- the progress bar minimum value
-
setProgressBarMinimumValue
public void setProgressBarMinimumValue(int progressBarMinimumValue)
- Parameters:
progressBarMinimumValue
- the progress bar minimum value to set
-
getProgressBarMaximumValue
public int getProgressBarMaximumValue()
- Returns:
- the progress bar maximum value
-
setProgressBarMaximumValue
public void setProgressBarMaximumValue(int progressBarMaximumValue)
- Parameters:
progressBarMaximumValue
- the progress bar minimum value to set
-
getProgressBarValue
public int getProgressBarValue()
- Returns:
- the progress bar value
-
setProgressBarValue
public void setProgressBarValue(int progressBarValue)
- Parameters:
progressBarValue
- the progress bar value to set
-
isVerticalScrollbar
public boolean isVerticalScrollbar()
- Returns:
- the verticalScrollbar
-
setVerticalScrollbar
public void setVerticalScrollbar(boolean verticalScrollbar)
- Parameters:
verticalScrollbar
- the verticalScrollbar to set
-
getHeight
public int getHeight()
- Returns:
- the height
-
setHeight
public void setHeight(int height)
- Parameters:
height
- the height to set
-
getCheckBoxValue
public boolean getCheckBoxValue()
- Returns:
- the check box vqlue
-
-