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
    • 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
    • conditionPanelVisible

      EntityPanel.Builder conditionPanelVisible(boolean conditionPanelVisible)
      Parameters:
      conditionPanelVisible - if true then the table condition panel is made visible when the panel is initialized
      Returns:
      this builder instance
    • filterPanelVisible

      EntityPanel.Builder filterPanelVisible(boolean filterPanelVisible)
      Parameters:
      filterPanelVisible - if true then the table filter panel is made visible when the panel is initialized
      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