com.tssap.util.ui.glpc.section
Class SectionWithButtons
com.tssap.util.ui.glpc.section.SectionWithButtons
- All Implemented Interfaces:
- IEditable, IGridLayoutPaneContainer, ISection, ISectionWithButtons, ITitledGridLayoutPaneContainer
- public abstract class SectionWithButtons
- implements ISectionWithButtons
This is the abstract base class for all sections with button support.
|
Constructor Summary |
SectionWithButtons(IWidgetFactory widgetFactory,
int columns,
boolean equalColumns,
java.lang.String title,
java.lang.String description,
java.lang.String[] buttons)
Creates a new AbstractSection. |
SectionWithButtons(IWidgetFactory widgetFactory,
int columns,
boolean equalColumns,
java.lang.String title,
java.lang.String description,
java.lang.String[] buttons,
boolean[] buttonsEnabled)
Creates a new AbstractSection. |
SectionWithButtons(IWidgetFactory widgetFactory,
int columns,
java.lang.String title,
java.lang.String description,
java.lang.String[] buttons)
Creates a new AbstractSection with non-equal column widths. |
|
Method Summary |
void |
addButtonClickedListener(IButtonClickedListener listener)
Adds a new ButtonClickedListener to the section. |
void |
initSection(IGridLayoutPane glp)
Initializes the section by adding a button area on the right, creating a
new user area and calling the initButtonedSection(GridLayoutPane)
method from the interface ISectionWithButtons that
must be implemented by subsclasses to fill the section.
|
void |
removeButtonClickedListener(IButtonClickedListener listener)
Removes a ButtonClickedListener from the section. |
void |
setButtonEnabled(int index,
boolean enabled)
Enables or disables the button with the given index. |
void |
widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
Called by the framework when the default widget has been selected. |
void |
widgetSelected(org.eclipse.swt.events.SelectionEvent e)
Called by the framework when any widget has been selected. |
SectionWithButtons
public SectionWithButtons(IWidgetFactory widgetFactory,
int columns,
java.lang.String title,
java.lang.String description,
java.lang.String[] buttons)
- Creates a new
AbstractSection with non-equal column widths.
- Parameters:
widgetFactory - The WidgetFactory to use.columns - The number of columns the client area should have.title - The title of the section.description - The description of the section.buttons - Array of Strings with the texts of the buttons to be
displayed.
SectionWithButtons
public SectionWithButtons(IWidgetFactory widgetFactory,
int columns,
boolean equalColumns,
java.lang.String title,
java.lang.String description,
java.lang.String[] buttons)
- Creates a new
AbstractSection.
- Parameters:
widgetFactory - The WidgetFactory to use.columns - The number of columns the client area should have.equalColumns - Flag if the columns should have equal width.title - The title of the section.description - The description of the sectionbuttons - Array of Strings with the texts of the buttons to be
displayed.
SectionWithButtons
public SectionWithButtons(IWidgetFactory widgetFactory,
int columns,
boolean equalColumns,
java.lang.String title,
java.lang.String description,
java.lang.String[] buttons,
boolean[] buttonsEnabled)
- Creates a new
AbstractSection.
- Parameters:
widgetFactory - The WidgetFactory to use.columns - The number of columns the client area should have.equalColumns - Flag if the columns should have equal width.title - The title of the section.description - The description of the sectionbuttons - Array of Strings with the texts of the buttons to be
displayed.buttonsEnabled - Array of strings with flags witch buttons should be
enabled.
initSection
public final void initSection(IGridLayoutPane glp)
- Initializes the section by adding a button area on the right, creating a
new user area and calling the
initButtonedSection(GridLayoutPane)
method from the interface ISectionWithButtons that
must be implemented by subsclasses to fill the section.
Besides two other abstract methods are called before (
preInitButtonedSection(GridLayoutPane)) and after (
postInitButtonedSection(GrindLayoutPane)) the initialization.
Subclasses can implement these methods in case they want to supply addional
layout at the top or at the bottom of the section (outside of the client
area).
- Specified by:
initSection in interface ISection
- Parameters:
glp - The client area of the super class to be filled within the
section.
widgetDefaultSelected
public void widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent e)
- Called by the framework when the default widget has been selected. Simply
calls the
widgetSelected(SelectionEvent) method of this class.
- Parameters:
e - The selection event.
widgetSelected
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e)
- Called by the framework when any widget has been selected. If the event
source is one of the buttons all registered ButtonClickedListeners are
notified.
- Parameters:
e - The selection event.
addButtonClickedListener
public void addButtonClickedListener(IButtonClickedListener listener)
- Adds a new
ButtonClickedListener to the section.
- Specified by:
addButtonClickedListener in interface ISectionWithButtons
- Parameters:
listener - The listener to add.
removeButtonClickedListener
public void removeButtonClickedListener(IButtonClickedListener listener)
- Removes a
ButtonClickedListener from the section.
- Specified by:
removeButtonClickedListener in interface ISectionWithButtons
- Parameters:
listener - The listener to remove.
setButtonEnabled
public void setButtonEnabled(int index,
boolean enabled)
- Enables or disables the button with the given index.
- Parameters:
index - The index of the button.enabled - True if the button should be enabled,
false otherwise.
Copyright © 2005 SAP AG. All Rights Reserved.