Interface IPageConfiguration<T>

Type Parameters:
T - the type of the selected object

public interface IPageConfiguration<T>
Settings of a Page in the property panel.
Author:
Ionov Ivan
  • Method Details

    • visible

      IPageConfiguration<T> visible(Predicate<T> visible)
      Sets whether the page is shown for the selected object. By default the page is always shown.
      Parameters:
      visible - the condition on the selected object
      Returns:
      this configuration
    • enabled

      IPageConfiguration<T> enabled(Predicate<T> enabled)
      Sets whether the fields of the page can be edited for the selected object. A field is enabled only when both its section and the page are enabled. By default the page is enabled.
      Parameters:
      enabled - the condition on the selected object
      Returns:
      this configuration
    • tabPriority

      IPageConfiguration<T> tabPriority(ToDoubleFunction<T> tabPriority)
      Sets the position of the page tab in the tab column. A smaller value places the tab higher. -1, the default, means the priority is not set. Overrides the value from IPropertyConfiguration.defaultTabPriority(java.util.function.BiConsumer).
      Parameters:
      tabPriority - the priority for the selected object
      Returns:
      this configuration
    • pagePriority

      IPageConfiguration<T> pagePriority(ToIntFunction<T> pagePriority)
      Sets the index of the page among the pages of its tab. With -1, the default, pages for more general types go above pages for more specific types, and pages for the same type follow the order of PropertyPart.getPages(). An index greater than the number of pages places the page last.
      Parameters:
      pagePriority - the index for the selected object
      Returns:
      this configuration
    • objectTypeName

      IPageConfiguration<T> objectTypeName(Function<T,String> objectTypeName)
      Sets the type part of the property panel header, shown in parentheses. If the function returns null, the simple class name of the object is used.

      The header has the form description (type). Line breaks in the description are replaced with spaces, and a long description is cut to IPropertyConfiguration.maxLabelLength(int) characters with an ellipsis. If customLabel(Function) returns a non-null value, the header is that text only. If several pages provide a value, the page for the most specific type wins.

      Parameters:
      objectTypeName - the function that returns the type name
      Returns:
      this configuration
    • objectDescription

      IPageConfiguration<T> objectDescription(Function<T,String> objectDescription)
      Sets the description part of the property panel header, shown before the parentheses. If the function returns null, the simple class name of the object is used.

      The header has the form description (type). Line breaks in the description are replaced with spaces, and a long description is cut to IPropertyConfiguration.maxLabelLength(int) characters with an ellipsis. If customLabel(Function) returns a non-null value, the header is that text only. If several pages provide a value, the page for the most specific type wins.

      Parameters:
      objectDescription - the function that returns the description
      Returns:
      this configuration
    • customLabel

      IPageConfiguration<T> customLabel(Function<T,String> customLabel)
      Sets the whole property panel header, replacing the description (type) form. If the function returns null, the header is built from objectDescription(Function) and objectTypeName(Function).

      The header has the form description (type). Line breaks in the description are replaced with spaces, and a long description is cut to IPropertyConfiguration.maxLabelLength(int) characters with an ellipsis. If customLabel(Function) returns a non-null value, the header is that text only. If several pages provide a value, the page for the most specific type wins.

      Parameters:
      customLabel - the function that returns the header text
      Returns:
      this configuration
    • features

      IPageConfiguration<T> features(org.eclipse.emf.ecore.EStructuralFeature... features)
      Adds EMF features whose changes update the header. Works only for EmfPage.
      Parameters:
      features - the features to observe
      Returns:
      this configuration
    • featurePaths

      IPageConfiguration<T> featurePaths(org.eclipse.emf.databinding.FeaturePath... featurePaths)
      Adds EMF feature paths whose changes update the header. Works only for EmfPage.
      Parameters:
      featurePaths - the feature paths to observe
      Returns:
      this configuration