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 class
FooterArea.FooterAction
-
Field Summary
Fields Modifier and Type Field Description private static int
BUTTON_WIDTH
private java.util.List<java.lang.String>
buttonLabels
private java.lang.String
checkBoxLabel
private boolean
checkBoxValue
private java.lang.String
collapsedLabelText
private org.eclipse.swt.widgets.Composite
composite
private int
defaultButtonIndex
private boolean
details
private java.lang.String
detailText
private org.eclipse.swt.widgets.Button
disabledButton
private boolean
expanded
private java.lang.String
expandedLabelText
private org.eclipse.swt.widgets.Text
expandedPanel
private java.util.List<FooterArea.FooterAction>
footerActions
private java.lang.String
footerText
private org.eclipse.swt.graphics.Image
icon
(package private) int
selectedButtonIndex
private int
timer
private int
timerIndexButton
private org.eclipse.swt.widgets.ToolBar
toolbar
-
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 FooterArea
addCheckBox(java.lang.String label, boolean selection)
Add a check boxFooterArea
addFooterAction(java.util.function.Supplier<java.lang.String> label, java.util.function.Consumer<Dialog> action, org.eclipse.swt.graphics.Image... images)
private void
createButtons()
Create the buttonsprivate void
createCheckBox(int numberOfColumns)
Create a check boxprivate void
createDetails(int numberOfColumns)
Create the details sectionprivate void
createExpandedPanel(int numberOfColumns)
Create the expanded panelprivate void
createFooter()
Create footer sectionprivate void
createFooterActions()
private void
createSeparator()
Create a separatorjava.util.List<java.lang.String>
getButtonLabels()
boolean
getCheckBoxValue()
java.lang.String
getCollapsedLabelText()
int
getDefaultButtonIndex()
java.lang.String
getDetailText()
java.lang.String
getExpandedLabelText()
java.lang.String
getFooterText()
org.eclipse.swt.graphics.Image
getIcon()
(package private) int
getSelectedButton()
int
getTimer()
int
getTimerIndexButton()
boolean
isExpanded()
(package private) void
render()
Render the content of an areaFooterArea
setButtonLabels(java.lang.String... buttonLabels)
FooterArea
setButtonLabels(java.util.List<java.lang.String> buttonLabels)
FooterArea
setCollapsedLabelText(java.lang.String collapsedLabelText)
FooterArea
setDefaultButtonIndex(int defaultButtonIndex)
FooterArea
setDetailText(java.lang.String detailText)
FooterArea
setExpanded(boolean expanded)
FooterArea
setExpandedLabelText(java.lang.String expandedLabelText)
FooterArea
setFooterText(java.lang.String text)
FooterArea
setIcon(org.eclipse.swt.graphics.Image icon)
FooterArea
setTimer(int timer)
FooterArea
setTimerIndexButton(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:DialogArea
Render the content of an area- Specified by:
render
in 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
-
-