Class TableConfigurationHelper
- java.lang.Object
-
- org.eclipse.emf.ecp.view.internal.table.swt.TableConfigurationHelper
-
public final class TableConfigurationHelper extends java.lang.Object
Helper 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 theVEnablementConfiguration
for 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 boolean
isReadOnly(VTableControl tableControl, VDomainModelReference domainModelReference)
Retrieve the readonly state for the table control of aVDomainModelReference
.static void
updateWidthConfiguration(VTableControl tableControl, VDomainModelReference domainModelReference, org.eclipse.swt.widgets.Widget tableColumn)
Updates theVWidthConfiguration
for 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
- theVTableControl
to get the readonly state of a column fordomainModelReference
- theVDomainModelReference
to get the state for- Returns:
- true if the domainModelReference is readonly, false otherwise
-
findEnablementConfiguration
public static Optional<VEnablementConfiguration> findEnablementConfiguration(VTableControl tableControl, VDomainModelReference columnDmr)
Returns theVEnablementConfiguration
for the givenVDomainModelReference
, if any.- Parameters:
tableControl
- theVTableControl
columnDmr
- theVDomainModelReference
aVDomainModelReference
within the table- Returns:
- an
Optional
containing 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
- theVTableControl
containing 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
- theVTableControl
containing 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 theVWidthConfiguration
for a column. If there is no configuration one will be created.- Parameters:
tableControl
- theVTableControl
containing the column configurationdomainModelReference
- the columnVDomainModelReference
tableColumn
- the table column
-
-