Class AbstractPreferenceTabItemProvider
- java.lang.Object
-
- com.e1c.g5.v8.dt.formatter.ui.preferences.page.builders.TerminalUIBuilder
-
- com.e1c.g5.v8.dt.formatter.ui.preferences.page.builders.AbstractPreferenceTabItemProvider
-
- All Implemented Interfaces:
IPreferenceTabItemProvider
,IReformatable
- Direct Known Subclasses:
DefaultUITabItemProvider
public abstract class AbstractPreferenceTabItemProvider extends TerminalUIBuilder implements IPreferenceTabItemProvider
This is abstract implementation ofIPreferenceTabItemProvider
it creates its Ui representation with#createTabItem(TabFolder, String)
and options UI representation withTerminalUIBuilder.applyOption(IOption, Composite)
-
-
Field Summary
Fields Modifier and Type Field Description protected String
previewText
The text for the preview
-
Constructor Summary
Constructors Constructor Description AbstractPreferenceTabItemProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addOption(String groupName, IOption<?> option)
Adds option with in the given group or to this TabItem if groupName field isnull
void
createContent(org.eclipse.swt.widgets.TabFolder tabFolder, String name)
Builds UI representation of this TabItem with given name in the given tabFolderprotected abstract IPreferenceGroupProvider
createPreferenceGroupProvider()
Creates instance of IBuildableGroupprotected abstract org.eclipse.swt.widgets.Composite
createTabItem(org.eclipse.swt.widgets.TabFolder tabFodler, String name, IOptionProvider optionProvider)
Creates TabItem with given name in given parent tabFoldervoid
setPreview(String previewText, IOptionProvider optionProvider)
Sets given previewText and previewFormater for this tab-
Methods inherited from class com.e1c.g5.v8.dt.formatter.ui.preferences.page.builders.TerminalUIBuilder
applyBooleanOption, applyIntegerOption, applyOption, applyStringOption
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.e1c.g5.v8.dt.formatter.ui.preferences.page.builders.IPreferenceTabItemProvider
addShowWhitespaceOption
-
Methods inherited from interface com.e1c.g5.v8.dt.formatter.ui.preferences.page.builders.IReformatable
reformat
-
-
-
-
Field Detail
-
previewText
protected String previewText
The text for the preview
-
-
Method Detail
-
addOption
public void addOption(String groupName, IOption<?> option)
Description copied from interface:IPreferenceTabItemProvider
Adds option with in the given group or to this TabItem if groupName field isnull
- Specified by:
addOption
in interfaceIPreferenceTabItemProvider
- Parameters:
groupName
- The name of the group to add the option, can benull
option
- The option to add to the given group in this TabItem, cannot benull
-
setPreview
public void setPreview(String previewText, IOptionProvider optionProvider)
Description copied from interface:IPreferenceTabItemProvider
Sets given previewText and previewFormater for this tab- Specified by:
setPreview
in interfaceIPreferenceTabItemProvider
- Parameters:
previewText
- The text of preview(code example), cannot benull
optionProvider
- The option provider for formatter(formatter that formats previewText), can benull
-
createContent
public void createContent(org.eclipse.swt.widgets.TabFolder tabFolder, String name)
Description copied from interface:IPreferenceTabItemProvider
Builds UI representation of this TabItem with given name in the given tabFolder- Specified by:
createContent
in interfaceIPreferenceTabItemProvider
- Parameters:
tabFolder
- The containing TabFodler of this TabItem, cannot benull
name
- The name of this TabItem, cannot benull
-
createPreferenceGroupProvider
protected abstract IPreferenceGroupProvider createPreferenceGroupProvider()
Creates instance of IBuildableGroup- Returns:
- new instance of IBuildableGroup, cannot be
null
-
createTabItem
protected abstract org.eclipse.swt.widgets.Composite createTabItem(org.eclipse.swt.widgets.TabFolder tabFodler, String name, IOptionProvider optionProvider)
Creates TabItem with given name in given parent tabFolder- Parameters:
tabFodler
- The parent TabFodler, cannot benull
name
- The name of the TabItem, cannot benull
optionProvider
- The optionProvider for preview editors, cannot benull
- Returns:
- The composite that represents created TabItem, cannot be
null
-
-