Interface IPropertyConfiguration


public interface IPropertyConfiguration
Settings of the property panel PropertyPart.
Author:
Ionov Ivan
  • Method Details

    • visiblePart

      IPropertyConfiguration visiblePart(Predicate<Object> visible)
      Sets whether the panel is shown for the selected object.
      Parameters:
      visible - the condition on the selected object
      Returns:
      this configuration
    • tabWidth

      IPropertyConfiguration tabWidth(int 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

      IPropertyConfiguration labelWidth(int labelWidth)
      Sets the label width for LabelWidthPolicy.CONSTANT. Other policies ignore it.
      Parameters:
      labelWidth - the width in pixels
      Returns:
      this configuration
    • maxLabelLength

      IPropertyConfiguration maxLabelLength(int 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

      IPropertyConfiguration defaultTabPriority(BiConsumer<Object,Map<String,Double>> 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

      IPropertyConfiguration ovverideTab(BiFunction<Object,Class<?>,String> 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

      IPropertyConfiguration labelWidthPolicy(LabelWidthPolicy labelWidthPolicy)
      Sets how label width is calculated. The default is LabelWidthPolicy.DYNAMIC_BY_PROPERTY.
      Parameters:
      labelWidthPolicy - the policy
      Returns:
      this configuration
    • background

      IPropertyConfiguration background(org.eclipse.swt.graphics.Color background)
      Sets the panel background.
      Parameters:
      background - the background color
      Returns:
      this configuration