Interface IPropertyConfiguration
public interface IPropertyConfiguration
Settings of the property panel
PropertyPart.- Author:
- Ionov Ivan
-
Method Summary
Modifier and TypeMethodDescriptionbackground(org.eclipse.swt.graphics.Color background) Sets the panel background.defaultTabPriority(BiConsumer<Object, Map<String, Double>> defaultTabPriority) Sets a function that fills a map from tab name to priority for the selected object.labelWidth(int labelWidth) Sets the label width forLabelWidthPolicy.CONSTANT.labelWidthPolicy(LabelWidthPolicy labelWidthPolicy) Sets how label width is calculated.maxLabelLength(int maxLabelLength) Sets how many characters of the object description the header shows.ovverideTab(BiFunction<Object, Class<?>, String> ovverideTab) Sets a function that returns the tab name for the selected object and the page class.tabWidth(int tabWidth) Sets the width of the tab column.visiblePart(Predicate<Object> visible) Sets whether the panel is shown for the selected object.
-
Method Details
-
visiblePart
Sets whether the panel is shown for the selected object.- Parameters:
visible- the condition on the selected object- Returns:
- this configuration
-
tabWidth
Sets the width of the tab column. The value is scaled to the screen DPI.- Parameters:
tabWidth- the width in pixels at 96 DPI- Returns:
- this configuration
-
labelWidth
Sets the label width forLabelWidthPolicy.CONSTANT. Other policies ignore it.- Parameters:
labelWidth- the width in pixels- Returns:
- this configuration
-
maxLabelLength
Sets how many characters of the object description the header shows. The rest is replaced with an ellipsis.- Parameters:
maxLabelLength- the maximum number of characters- Returns:
- this configuration
-
defaultTabPriority
Sets a function that fills a map from tab name to priority for the selected object. A smaller priority places the tab higher; tabs without a priority go below.- Parameters:
defaultTabPriority- the function that receives the selected object and the map to fill- Returns:
- this configuration
-
ovverideTab
Sets a function that returns the tab name for the selected object and the page class. If it returns null, the page keeps its own tab (Page.getTab).- Parameters:
ovverideTab- the function that receives the selected object and the page class- Returns:
- this configuration
-
labelWidthPolicy
Sets how label width is calculated. The default isLabelWidthPolicy.DYNAMIC_BY_PROPERTY.- Parameters:
labelWidthPolicy- the policy- Returns:
- this configuration
-
background
Sets the panel background.- Parameters:
background- the background color- Returns:
- this configuration
-