Class TableConfigurationHelper
- java.lang.Object
-
- org.eclipse.emf.ecp.view.internal.table.swt.TableConfigurationHelper
-
public final class TableConfigurationHelper extends java.lang.ObjectHelper class for retrieving configuration information.- Author:
- Eugen Neufeld
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<VEnablementConfiguration>findEnablementConfiguration(VTableControl tableControl, VDomainModelReference columnDmr)Returns theVEnablementConfigurationfor the givenVDomainModelReference, if any.static Optional<java.lang.Integer>getColumnWeight(VTableControl tableControl, VDomainModelReference domainModelReference)Retrieve any column weight information available for the given column.static Optional<java.lang.Integer>getColumnWidth(VTableControl tableControl, VDomainModelReference domainModelReference)Retrieve any column width information available for the given column.static booleanisReadOnly(VTableControl tableControl, VDomainModelReference domainModelReference)Retrieve the readonly state for the table control of aVDomainModelReference.static voidupdateWidthConfiguration(VTableControl tableControl, VDomainModelReference domainModelReference, org.eclipse.swt.widgets.Widget tableColumn)Updates theVWidthConfigurationfor a column.
-
-
-
Method Detail
-
isReadOnly
public static boolean isReadOnly(VTableControl tableControl, VDomainModelReference domainModelReference)
Retrieve the readonly state for the table control of aVDomainModelReference.- Parameters:
tableControl- theVTableControlto get the readonly state of a column fordomainModelReference- theVDomainModelReferenceto get the state for- Returns:
- true if the domainModelReference is readonly, false otherwise
-
findEnablementConfiguration
public static Optional<VEnablementConfiguration> findEnablementConfiguration(VTableControl tableControl, VDomainModelReference columnDmr)
Returns theVEnablementConfigurationfor the givenVDomainModelReference, if any.- Parameters:
tableControl- theVTableControlcolumnDmr- theVDomainModelReferenceaVDomainModelReferencewithin the table- Returns:
- an
Optionalcontaining theVEnablementConfiguration
-
getColumnWidth
public static Optional<java.lang.Integer> getColumnWidth(VTableControl tableControl, VDomainModelReference domainModelReference)
Retrieve any column width information available for the given column.- Parameters:
tableControl- theVTableControlcontaining the column configurationdomainModelReference- the columnVDomainModelReference- Returns:
- the width information, if present
-
getColumnWeight
public static Optional<java.lang.Integer> getColumnWeight(VTableControl tableControl, VDomainModelReference domainModelReference)
Retrieve any column weight information available for the given column.- Parameters:
tableControl- theVTableControlcontaining the column configurationdomainModelReference- the columnVDomainModelReference- Returns:
- the weight information, if present
-
updateWidthConfiguration
public static void updateWidthConfiguration(VTableControl tableControl, VDomainModelReference domainModelReference, org.eclipse.swt.widgets.Widget tableColumn)
Updates theVWidthConfigurationfor a column. If there is no configuration one will be created.- Parameters:
tableControl- theVTableControlcontaining the column configurationdomainModelReference- the columnVDomainModelReferencetableColumn- the table column
-
-