Class FooterArea
- java.lang.Object
-
- org.eclipse.nebula.widgets.opal.dialog.DialogArea
-
- org.eclipse.nebula.widgets.opal.dialog.FooterArea
-
public class FooterArea extends DialogArea
Instances of this class are message areas
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classFooterArea.FooterAction
-
Field Summary
Fields Modifier and Type Field Description private static intBUTTON_WIDTHprivate java.util.List<java.lang.String>buttonLabelsprivate java.lang.StringcheckBoxLabelprivate booleancheckBoxValueprivate java.lang.StringcollapsedLabelTextprivate org.eclipse.swt.widgets.Compositecompositeprivate intdefaultButtonIndexprivate booleandetailsprivate java.lang.StringdetailTextprivate org.eclipse.swt.widgets.ButtondisabledButtonprivate booleanexpandedprivate java.lang.StringexpandedLabelTextprivate org.eclipse.swt.widgets.TextexpandedPanelprivate java.util.List<FooterArea.FooterAction>footerActionsprivate java.lang.StringfooterTextprivate org.eclipse.swt.graphics.Imageicon(package private) intselectedButtonIndexprivate inttimerprivate inttimerIndexButtonprivate org.eclipse.swt.widgets.ToolBartoolbar-
Fields inherited from class org.eclipse.nebula.widgets.opal.dialog.DialogArea
parent
-
-
Constructor Summary
Constructors Constructor Description FooterArea(Dialog parent)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FooterAreaaddCheckBox(java.lang.String label, boolean selection)Add a check boxFooterAreaaddFooterAction(java.util.function.Supplier<java.lang.String> label, java.util.function.Consumer<Dialog> action, org.eclipse.swt.graphics.Image... images)private voidcreateButtons()Create the buttonsprivate voidcreateCheckBox(int numberOfColumns)Create a check boxprivate voidcreateDetails(int numberOfColumns)Create the details sectionprivate voidcreateExpandedPanel(int numberOfColumns)Create the expanded panelprivate voidcreateFooter()Create footer sectionprivate voidcreateFooterActions()private voidcreateSeparator()Create a separatorjava.util.List<java.lang.String>getButtonLabels()booleangetCheckBoxValue()java.lang.StringgetCollapsedLabelText()intgetDefaultButtonIndex()java.lang.StringgetDetailText()java.lang.StringgetExpandedLabelText()java.lang.StringgetFooterText()org.eclipse.swt.graphics.ImagegetIcon()(package private) intgetSelectedButton()intgetTimer()intgetTimerIndexButton()booleanisExpanded()(package private) voidrender()Render the content of an areaFooterAreasetButtonLabels(java.lang.String... buttonLabels)FooterAreasetButtonLabels(java.util.List<java.lang.String> buttonLabels)FooterAreasetCollapsedLabelText(java.lang.String collapsedLabelText)FooterAreasetDefaultButtonIndex(int defaultButtonIndex)FooterAreasetDetailText(java.lang.String detailText)FooterAreasetExpanded(boolean expanded)FooterAreasetExpandedLabelText(java.lang.String expandedLabelText)FooterAreasetFooterText(java.lang.String text)FooterAreasetIcon(org.eclipse.swt.graphics.Image icon)FooterAreasetTimer(int timer)FooterAreasetTimerIndexButton(int timerIndexButton)-
Methods inherited from class org.eclipse.nebula.widgets.opal.dialog.DialogArea
getBiggerFont, getFewerDetailsImage, getGreyColor, getMoreDetailsImage, getNormalFont, getTitleColor, isInitialised, setInitialised
-
-
-
-
Field Detail
-
BUTTON_WIDTH
private static final int BUTTON_WIDTH
- See Also:
- Constant Field Values
-
icon
private org.eclipse.swt.graphics.Image icon
-
footerText
private java.lang.String footerText
-
buttonLabels
private java.util.List<java.lang.String> buttonLabels
-
defaultButtonIndex
private int defaultButtonIndex
-
timer
private int timer
-
timerIndexButton
private int timerIndexButton
-
selectedButtonIndex
int selectedButtonIndex
-
collapsedLabelText
private java.lang.String collapsedLabelText
-
expandedLabelText
private java.lang.String expandedLabelText
-
expanded
private boolean expanded
-
detailText
private java.lang.String detailText
-
details
private boolean details
-
disabledButton
private org.eclipse.swt.widgets.Button disabledButton
-
checkBoxLabel
private java.lang.String checkBoxLabel
-
checkBoxValue
private boolean checkBoxValue
-
expandedPanel
private org.eclipse.swt.widgets.Text expandedPanel
-
composite
private org.eclipse.swt.widgets.Composite composite
-
toolbar
private org.eclipse.swt.widgets.ToolBar toolbar
-
footerActions
private java.util.List<FooterArea.FooterAction> footerActions
-
-
Constructor Detail
-
FooterArea
public FooterArea(Dialog parent)
Constructor- Parameters:
parent- dialog that is composed of this footer area
-
-
Method Detail
-
addCheckBox
public FooterArea addCheckBox(java.lang.String label, boolean selection)
Add a check box- Parameters:
label- label to displayselection- default value of the check box- Returns:
- this footer area
-
render
void render()
Description copied from class:DialogAreaRender the content of an area- Specified by:
renderin classDialogArea- See Also:
DialogArea.render()
-
createButtons
private void createButtons()
Create the buttons
-
createDetails
private void createDetails(int numberOfColumns)
Create the details section- Parameters:
numberOfColumns-
-
createFooterActions
private void createFooterActions()
-
createCheckBox
private void createCheckBox(int numberOfColumns)
Create a check box- Parameters:
numberOfColumns-
-
createFooter
private void createFooter()
Create footer section
-
createExpandedPanel
private void createExpandedPanel(int numberOfColumns)
Create the expanded panel- Parameters:
numberOfColumns-
-
createSeparator
private void createSeparator()
Create a separator
-
getIcon
public org.eclipse.swt.graphics.Image getIcon()
- Returns:
- the icon
-
setIcon
public FooterArea setIcon(org.eclipse.swt.graphics.Image icon)
- Parameters:
icon- the icon to set- Returns:
- this footer area
-
getFooterText
public java.lang.String getFooterText()
- Returns:
- the text
-
setFooterText
public FooterArea setFooterText(java.lang.String text)
- Parameters:
text- the text to set- Returns:
- this footer area
-
getButtonLabels
public java.util.List<java.lang.String> getButtonLabels()
- Returns:
- the button labels
-
setButtonLabels
public FooterArea setButtonLabels(java.util.List<java.lang.String> buttonLabels)
- Parameters:
buttonLabels- the button labels to set- Returns:
- this footer area
-
setButtonLabels
public FooterArea setButtonLabels(java.lang.String... buttonLabels)
- Parameters:
buttonLabels- the button labels to set- Returns:
- this footer area
-
addFooterAction
public FooterArea addFooterAction(java.util.function.Supplier<java.lang.String> label, java.util.function.Consumer<Dialog> action, org.eclipse.swt.graphics.Image... images)
- Parameters:
action- Runnable to be called when pressed.label- label of the footer actionimages- Images Array [active, highlight, inactive]- Returns:
-
getDefaultButtonIndex
public int getDefaultButtonIndex()
- Returns:
- the default button index
-
setDefaultButtonIndex
public FooterArea setDefaultButtonIndex(int defaultButtonIndex)
- Parameters:
defaultButtonIndex- the default button index to set- Returns:
- this footer area
-
getTimer
public int getTimer()
- Returns:
- the timer value
-
setTimer
public FooterArea setTimer(int timer)
- Parameters:
timer- the timer value to set- Returns:
- this footer area
-
getTimerIndexButton
public int getTimerIndexButton()
- Returns:
- the timer index button
-
setTimerIndexButton
public FooterArea setTimerIndexButton(int timerIndexButton)
- Parameters:
timerIndexButton- the timer index button to set- Returns:
- this footer area
-
getSelectedButton
int getSelectedButton()
- Returns:
- the selected button
-
getCollapsedLabelText
public java.lang.String getCollapsedLabelText()
- Returns:
- the collapsed label text
-
setCollapsedLabelText
public FooterArea setCollapsedLabelText(java.lang.String collapsedLabelText)
- Parameters:
collapsedLabelText- the collapsed label text to set- Returns:
- this footer area
-
getExpandedLabelText
public java.lang.String getExpandedLabelText()
- Returns:
- the expanded label text
-
setExpandedLabelText
public FooterArea setExpandedLabelText(java.lang.String expandedLabelText)
- Parameters:
expandedLabelText- the expanded label text to set- Returns:
- this footer area
-
isExpanded
public boolean isExpanded()
- Returns:
- the expanded flag
-
setExpanded
public FooterArea setExpanded(boolean expanded)
- Parameters:
expanded- the expanded flag to set- Returns:
- this footer area
-
getDetailText
public java.lang.String getDetailText()
- Returns:
- the detail text
-
setDetailText
public FooterArea setDetailText(java.lang.String detailText)
- Parameters:
detailText- the detail text to set- Returns:
- this footer area
-
getCheckBoxValue
public boolean getCheckBoxValue()
- Returns:
- the check box vqlue
-
-