Package com._1c.g5.v8.dt.dcs.ui.settings
Class SettingsDialog<T extends org.eclipse.emf.ecore.EObject>
- java.lang.Object
-
- org.eclipse.jface.window.Window
-
- org.eclipse.jface.dialogs.Dialog
-
- com._1c.g5.v8.dt.dcs.ui.valueeditors.ValueEditorDialogResizable<T>
-
- com._1c.g5.v8.dt.dcs.ui.settings.SettingsDialog<T>
-
- Type Parameters:
T
- type of settings dialog editable value
- All Implemented Interfaces:
IDcsEnvironmentProvider
,IDcsListener
,IDcsSettingsProvider
,IValueEditorDialog<T>
,org.eclipse.jface.window.IShellProvider
- Direct Known Subclasses:
DataCompositionFilterDialog
,DataCompositionGroupFieldsDialog
,DataCompositionSettingsDialog
,UserFieldsCaseDialog
,UserFieldsExpressionDialog
public abstract class SettingsDialog<T extends org.eclipse.emf.ecore.EObject> extends ValueEditorDialogResizable<T> implements IDcsSettingsProvider
Settings dialog
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.dcs.ui.settings.IDcsSettingsProvider
IDcsSettingsProvider.TabKind
-
-
Field Summary
Fields Modifier and Type Field Description protected IDcsSettingsProvider
settingsProvider
-
Fields inherited from class com._1c.g5.v8.dt.dcs.ui.valueeditors.ValueEditorDialogResizable
value
-
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
-
-
Constructor Summary
Constructors Constructor Description SettingsDialog(org.eclipse.swt.widgets.Shell shell, String title, int defWidth, int defHeight, IDcsSettingsProvider settingsProvider, T value, boolean editable)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addModelChangedListener(IDcsModelChangedListener listener)
Adds the specified DCS model changed listener.boolean
close()
DcsAvailableSettingsSourceForSchema
getAvailableFieldsSource()
Get source of available fieldsDcsAvailableSettingsSourceForSchema.FieldUse
getAvailableFieldsUse()
Get available fields variant (Filter, Order, etc.)IBmModel
getBmModel()
Returns the BM model.String
getCurrentLanguageCode()
Get current language codeObject
getCurrentObject()
Get current object.IDcsSettingsProvider.TabKind
getCurrentTabKind()
Get current tab kindObject
getDestinationForAvailableField()
Get parent destination object in main viewer for available fieldIBmEditingContext
getEditingContext()
Returns the BM editing context.DcsAvailableSettingsSourceForSchema.FieldUse
getExpressionsFieldsUse()
Get expressions fields variantString
getFieldTitle(DataCompositionField field)
Get title for fieldString
getNestedSchemaName()
Get nested schema nameDataCompositionSchema
getSchema()
Get dcs schemaList<DcsAvailableFieldInfo>
getSelectedAvailableFields()
Get info of selected available fields in current folderObject
getSelectedObject()
Get selected object (selected node in structure tree or main object).List<Object>
getSelectedViewerNodes()
Get selected objects in main viewer (destination)DataCompositionSettings
getSettings()
GetDataCompositionSettings
model objectIV8Project
getV8project()
Get V8 projectVersion
getVersion()
Get runtime versionboolean
isUserFieldsAvailable()
Check whether user fields is availablevoid
notify(DcsEvent event)
Сообщить о событииint
open()
void
removeModelChangedListener(IDcsModelChangedListener listener)
Removes the specified DCS model changed listener.void
setExpressionsFieldsUse(DcsAvailableSettingsSourceForSchema.FieldUse fieldUse)
Set expressions fields variantvoid
updateAvailableFieldsSource()
Update source of available fields-
Methods inherited from class com._1c.g5.v8.dt.dcs.ui.valueeditors.ValueEditorDialogResizable
configureShell, createButtonsForButtonBar, createContent, createDialogArea, getInitialLocation, getInitialSize, getValue, isEditable
-
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonBar, createContents, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
-
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
-
-
-
-
Field Detail
-
settingsProvider
protected IDcsSettingsProvider settingsProvider
-
-
Constructor Detail
-
SettingsDialog
public SettingsDialog(org.eclipse.swt.widgets.Shell shell, String title, int defWidth, int defHeight, IDcsSettingsProvider settingsProvider, T value, boolean editable)
Constructor- Parameters:
shell
- shell, can't be nulltitle
- title, can't be nulldefWidth
- default widthdefHeight
- default heightsettingsProvider
- settings provider, can't be nullvalue
- initial value, can't be nulleditable
- the editable state,true
if this dialog is editable,false
otherwise
-
-
Method Detail
-
getEditingContext
public IBmEditingContext getEditingContext()
Description copied from interface:IDcsEnvironmentProvider
Returns the BM editing context.- Specified by:
getEditingContext
in interfaceIDcsEnvironmentProvider
- Returns:
- the BM editing context, never
null
.
-
getBmModel
public IBmModel getBmModel()
Description copied from interface:IDcsEnvironmentProvider
Returns the BM model.- Specified by:
getBmModel
in interfaceIDcsEnvironmentProvider
- Returns:
- the BM model, never
null
.
-
open
public int open()
- Overrides:
open
in classorg.eclipse.jface.window.Window
-
close
public boolean close()
- Overrides:
close
in classValueEditorDialogResizable<T extends org.eclipse.emf.ecore.EObject>
-
notify
public void notify(DcsEvent event)
Description copied from interface:IDcsListener
Сообщить о событии- Specified by:
notify
in interfaceIDcsListener
- Parameters:
event
- событие
-
getV8project
public IV8Project getV8project()
Description copied from interface:IDcsEnvironmentProvider
Get V8 project- Specified by:
getV8project
in interfaceIDcsEnvironmentProvider
- Returns:
- the V8 project
-
getCurrentLanguageCode
public String getCurrentLanguageCode()
Description copied from interface:IDcsEnvironmentProvider
Get current language code- Specified by:
getCurrentLanguageCode
in interfaceIDcsEnvironmentProvider
- Returns:
- current language code
-
getVersion
public Version getVersion()
Description copied from interface:IDcsEnvironmentProvider
Get runtime version- Specified by:
getVersion
in interfaceIDcsEnvironmentProvider
- Returns:
- runtime version
-
getSchema
public DataCompositionSchema getSchema()
Description copied from interface:IDcsSettingsProvider
Get dcs schema- Specified by:
getSchema
in interfaceIDcsSettingsProvider
- Returns:
- schema, can be null
-
getSettings
public DataCompositionSettings getSettings()
Description copied from interface:IDcsSettingsProvider
GetDataCompositionSettings
model object- Specified by:
getSettings
in interfaceIDcsSettingsProvider
- Returns:
DataCompositionSettings
model object
-
getAvailableFieldsSource
public DcsAvailableSettingsSourceForSchema getAvailableFieldsSource()
Description copied from interface:IDcsSettingsProvider
Get source of available fields- Specified by:
getAvailableFieldsSource
in interfaceIDcsSettingsProvider
- Returns:
DcsAvailableSettingsSourceForSchema
object
-
updateAvailableFieldsSource
public void updateAvailableFieldsSource()
Description copied from interface:IDcsSettingsProvider
Update source of available fields- Specified by:
updateAvailableFieldsSource
in interfaceIDcsSettingsProvider
-
getSelectedAvailableFields
public List<DcsAvailableFieldInfo> getSelectedAvailableFields()
Description copied from interface:IDcsSettingsProvider
Get info of selected available fields in current folder- Specified by:
getSelectedAvailableFields
in interfaceIDcsSettingsProvider
- Returns:
- list of
DcsAvailableFieldInfo
objects, never null
-
getSelectedViewerNodes
public List<Object> getSelectedViewerNodes()
Description copied from interface:IDcsSettingsProvider
Get selected objects in main viewer (destination)- Specified by:
getSelectedViewerNodes
in interfaceIDcsSettingsProvider
- Returns:
- list of selected objects, never null
-
getDestinationForAvailableField
public Object getDestinationForAvailableField()
Description copied from interface:IDcsSettingsProvider
Get parent destination object in main viewer for available field- Specified by:
getDestinationForAvailableField
in interfaceIDcsSettingsProvider
- Returns:
- parent destination object
-
getAvailableFieldsUse
public DcsAvailableSettingsSourceForSchema.FieldUse getAvailableFieldsUse()
Description copied from interface:IDcsSettingsProvider
Get available fields variant (Filter, Order, etc.)- Specified by:
getAvailableFieldsUse
in interfaceIDcsSettingsProvider
- Returns:
- available fields variant
-
getSelectedObject
public Object getSelectedObject()
Description copied from interface:IDcsSettingsProvider
Get selected object (selected node in structure tree or main object). Object can be one ofDataCompositionSettings
,StructureItem
,DataCompositionTableGroup
,DataCompositionChartGroup
- Specified by:
getSelectedObject
in interfaceIDcsSettingsProvider
- Returns:
- selected object, never null
-
getCurrentObject
public Object getCurrentObject()
Description copied from interface:IDcsSettingsProvider
Get current object. Object can be one ofDataCompositionSettings
,StructureItem
,DataCompositionTableGroup
,DataCompositionChartGroup
- Specified by:
getCurrentObject
in interfaceIDcsSettingsProvider
- Returns:
- current object, never null
-
getExpressionsFieldsUse
public DcsAvailableSettingsSourceForSchema.FieldUse getExpressionsFieldsUse()
Description copied from interface:IDcsSettingsProvider
Get expressions fields variant- Specified by:
getExpressionsFieldsUse
in interfaceIDcsSettingsProvider
- Returns:
- expressions fields variant
-
setExpressionsFieldsUse
public void setExpressionsFieldsUse(DcsAvailableSettingsSourceForSchema.FieldUse fieldUse)
Description copied from interface:IDcsSettingsProvider
Set expressions fields variant- Specified by:
setExpressionsFieldsUse
in interfaceIDcsSettingsProvider
- Parameters:
fieldUse
- expressions fields variant
-
isUserFieldsAvailable
public boolean isUserFieldsAvailable()
Description copied from interface:IDcsSettingsProvider
Check whether user fields is available- Specified by:
isUserFieldsAvailable
in interfaceIDcsSettingsProvider
- Returns:
- whether user fields is available
-
getFieldTitle
public String getFieldTitle(DataCompositionField field)
Description copied from interface:IDcsSettingsProvider
Get title for field- Specified by:
getFieldTitle
in interfaceIDcsSettingsProvider
- Parameters:
field
- field, can't be null- Returns:
- title, never null
-
getCurrentTabKind
public IDcsSettingsProvider.TabKind getCurrentTabKind()
Description copied from interface:IDcsSettingsProvider
Get current tab kind- Specified by:
getCurrentTabKind
in interfaceIDcsSettingsProvider
- Returns:
IDcsSettingsProvider.TabKind
value, never null
-
getNestedSchemaName
public String getNestedSchemaName()
Description copied from interface:IDcsSettingsProvider
Get nested schema name- Specified by:
getNestedSchemaName
in interfaceIDcsSettingsProvider
- Returns:
- nested schema name, never null (empty for the main schema)
-
addModelChangedListener
public void addModelChangedListener(IDcsModelChangedListener listener)
Adds the specified DCS model changed listener.- Parameters:
listener
- the listener, cannot benull
.
-
removeModelChangedListener
public void removeModelChangedListener(IDcsModelChangedListener listener)
Removes the specified DCS model changed listener.- Parameters:
listener
- the listener, cannot benull
.
-
-