Class AbstractPTWidget
- java.lang.Object
-
- org.eclipse.nebula.widgets.opal.propertytable.AbstractPTWidget
-
- All Implemented Interfaces:
PTWidget
- Direct Known Subclasses:
PTWidgetTable,PTWidgetTree
public abstract class AbstractPTWidget extends java.lang.Object implements PTWidget
This abstract class contains all common methods for widgets that are part of a property table
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.swt.custom.StyledTextdescriptionLabelprivate PropertyTableparentPropertyTable
-
Constructor Summary
Constructors Constructor Description AbstractPTWidget()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PTWidgetbuild()Build the widget (Table or TreeTable)private voidbuildButtons(org.eclipse.swt.widgets.Composite parent, boolean sorted, boolean showAsCategory, boolean showDescription)Build the buttons (Sort, switch category/flat list, show/hide description)private voidbuildCategoryButton(org.eclipse.swt.widgets.Composite parent, boolean showAsCategory)private voidbuildDescriptionButton(org.eclipse.swt.widgets.Composite parent, boolean showDescription)private voidbuildDescriptionPanel(org.eclipse.swt.widgets.Composite parent)Build the description panelprivate voidbuildSortButton(org.eclipse.swt.widgets.Composite parent, boolean sorted)protected abstract voidbuildWidget(org.eclipse.swt.widgets.Composite parent)Build the widget itselfprivate voiddispose()Dispose the previous widgetPTWidgetdisposeAndBuild(PropertyTable table)Dispose the previous widget and build a new one (when ones switch from Category View to Flat List view)protected PropertyTablegetParentPropertyTable()abstract voidrefillData()Clear all data and fill the widgetvoidsetParentPropertyTable(PropertyTable table)Inject the parent property table in the widgetvoidupdateDescriptionPanel(java.lang.Object selection)Update the description panel (if it exists)
-
-
-
Field Detail
-
parentPropertyTable
private PropertyTable parentPropertyTable
-
descriptionLabel
protected org.eclipse.swt.custom.StyledText descriptionLabel
-
-
Method Detail
-
refillData
public abstract void refillData()
Description copied from interface:PTWidgetClear all data and fill the widget- Specified by:
refillDatain interfacePTWidget- See Also:
PTWidget.refillData()
-
buildWidget
protected abstract void buildWidget(org.eclipse.swt.widgets.Composite parent)
Build the widget itself- Parameters:
parent-
-
build
public PTWidget build()
Description copied from interface:PTWidgetBuild the widget (Table or TreeTable)- Specified by:
buildin interfacePTWidget- Returns:
- the built widget
- See Also:
PTWidget.build()
-
buildButtons
private void buildButtons(org.eclipse.swt.widgets.Composite parent, boolean sorted, boolean showAsCategory, boolean showDescription)Build the buttons (Sort, switch category/flat list, show/hide description)- Parameters:
parent- parent compositesorted- iftrue, the sort button is pushedshowAsCategory- iftrue, the "show as category" button is pushedshowDescription- iftrue, the "description" button is pushed
-
buildSortButton
private void buildSortButton(org.eclipse.swt.widgets.Composite parent, boolean sorted)- Parameters:
parent- parent compositesorted- iftrue, the sort button is pushed
-
buildCategoryButton
private void buildCategoryButton(org.eclipse.swt.widgets.Composite parent, boolean showAsCategory)- Parameters:
parent- parent compositeshowAsCategory- iftrue, the "show as category" button is pushed
-
buildDescriptionButton
private void buildDescriptionButton(org.eclipse.swt.widgets.Composite parent, boolean showDescription)- Parameters:
parent- parent compositeshowDescription- iftrue, the "description" button is pushed
-
buildDescriptionPanel
private void buildDescriptionPanel(org.eclipse.swt.widgets.Composite parent)
Build the description panel- Parameters:
parent- parent composite
-
disposeAndBuild
public PTWidget disposeAndBuild(PropertyTable table)
Description copied from interface:PTWidgetDispose the previous widget and build a new one (when ones switch from Category View to Flat List view)- Specified by:
disposeAndBuildin interfacePTWidget- Parameters:
table- the PropertyTable to dispose- Returns:
- the built widget
- See Also:
PTWidget.disposeAndBuild(org.eclipse.nebula.widgets.opal.propertytable.PropertyTable)
-
dispose
private void dispose()
Dispose the previous widget
-
getParentPropertyTable
protected PropertyTable getParentPropertyTable()
- Returns:
- the parent PropertyTable
-
setParentPropertyTable
public void setParentPropertyTable(PropertyTable table)
Description copied from interface:PTWidgetInject the parent property table in the widget- Specified by:
setParentPropertyTablein interfacePTWidget- Parameters:
parentPropertyTable- the parent PropertyTable to set
-
updateDescriptionPanel
public void updateDescriptionPanel(java.lang.Object selection)
Description copied from interface:PTWidgetUpdate the description panel (if it exists)- Specified by:
updateDescriptionPanelin interfacePTWidget- Parameters:
selection- selected property- See Also:
PTWidget.updateDescriptionPanel(java.lang.Object)
-
-