Interface EntityPanel.Builder

Enclosing class:
EntityPanel

public static interface EntityPanel.Builder
A builder for EntityPanel instances.
  • Method Details

    • entityType

      EntityType entityType()
      Returns:
      the entityType
    • caption

      EntityPanel.Builder caption(String caption)
      Parameters:
      caption - the panel caption
      Returns:
      this builder instance
    • caption

      Optional<String> caption()
      Returns:
      the caption, an empty Optional if none has been set
    • description

      EntityPanel.Builder description(String description)
      Parameters:
      description - the panel description
      Returns:
      this builder instance
    • description

      Optional<String> description()
      Returns:
      the description, an empty Optional if none has been set
    • icon

      Parameters:
      icon - the panel icon
      Returns:
      this builder instance
    • icon

      Returns:
      the icon, an empty Optional if none has been set
    • detailPanel

      EntityPanel.Builder detailPanel(EntityPanel.Builder panelBuilder)
      Adds the given detail panel builder to this panel builder, if it hasn't been previously added
      Parameters:
      panelBuilder - the detail panel provider
      Returns:
      this builder instance
    • refreshWhenInitialized

      EntityPanel.Builder refreshWhenInitialized(boolean refreshWhenInitialized)
      Default true.
      Parameters:
      refreshWhenInitialized - if true then the table model this panel is based on will be refreshed when the panel is initialized
      Returns:
      this builder instance
    • conditionView

      EntityPanel.Builder conditionView(ConditionPanel.ConditionView conditionView)
      Parameters:
      conditionView - the initial condition panel view
      Returns:
      this builder instance
    • filterView

      Parameters:
      filterView - the initial filter panel view
      Returns:
      this builder instance
    • detailLayout

      Parameters:
      detailLayout - provides the detail panel layout to use
      Returns:
      this builder instane
    • preferredSize

      EntityPanel.Builder preferredSize(Dimension preferredSize)
      Parameters:
      preferredSize - the preferred panel size
      Returns:
      this builder instance
    • panel

      EntityPanel.Builder panel(Class<? extends EntityPanel> panelClass)
      Note that setting the EntityPanel class overrides any table panel or edit panel classes that have been set.
      Parameters:
      panelClass - the EntityPanel class to use when providing this panel
      Returns:
      this builder instance
    • editPanel

      EntityPanel.Builder editPanel(Class<? extends EntityEditPanel> editPanelClass)
      Parameters:
      editPanelClass - the EntityEditPanel class to use when providing this panel
      Returns:
      this builder instance
    • tablePanel

      EntityPanel.Builder tablePanel(Class<? extends EntityTablePanel> tablePanelClass)
      Parameters:
      tablePanelClass - the EntityTablePanel class to use when providing this panel
      Returns:
      this builder instance
    • onBuildPanel

      EntityPanel.Builder onBuildPanel(Consumer<EntityPanel> onBuildPanel)
      Parameters:
      onBuildPanel - called after the entity panel has been built
      Returns:
      this builder instance
    • onBuildEditPanel

      EntityPanel.Builder onBuildEditPanel(Consumer<EntityEditPanel> onBuildEditPanel)
      Parameters:
      onBuildEditPanel - called after the edit panel has been built
      Returns:
      this builder instance
    • onBuildTablePanel

      EntityPanel.Builder onBuildTablePanel(Consumer<EntityTablePanel> onBuildTablePanel)
      Parameters:
      onBuildTablePanel - called after the table panel has been built
      Returns:
      this builder instance
    • build

      EntityPanel build(EntityConnectionProvider connectionProvider)
      Creates an EntityPanel based on this builder
      Parameters:
      connectionProvider - the connection provider
      Returns:
      an EntityPanel based on this builder
      Throws:
      IllegalStateException - in case no SwingEntityModel.Builder has been set
    • build

      Creates an EntityPanel based on this builder
      Parameters:
      model - the EntityModel to base this panel on
      Returns:
      an EntityPanel based on this builder