Package velox.gui

Class StrategyPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class StrategyPanel extends JPanel
JPanel that can be display in strategies dialog with custom title specified
Will follow general style with border and title
If you want displayed panel to be without general styled border and title, set title to null
Also, sets all components Component.setEnabled(boolean)
See Also:
  • Constructor Details

    • StrategyPanel

      public StrategyPanel(String title)
      Parameters:
      title - title that will be displayed in strategies dialog
    • StrategyPanel

      public StrategyPanel(String title, boolean isDoubleBuffered)
      Parameters:
      title - title that will be displayed in strategies dialog
      isDoubleBuffered -
    • StrategyPanel

      public StrategyPanel(String title, LayoutManager layout, boolean isDoubleBuffered)
      Parameters:
      title - title that will be displayed in strategies dialog
      layout -
      isDoubleBuffered -
    • StrategyPanel

      public StrategyPanel(String title, LayoutManager layout)
      Parameters:
      title - title that will be displayed in strategies dialog
      layout -
  • Method Details

    • setLocalizedTitle

      public void setLocalizedTitle(TranslatableComponent localizedTitle)
      Set localized title. After set, this version will be displayed instead of usual title.
      Parameters:
      localizedTitle -
    • getTitle

      public String getTitle()
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • requestReload

      public void requestReload()
      Reload strategy panels, Layer1CustomPanelsGetter.getCustomGuiFor(String, String) will be called again if panel was still visible to retrieve updated version
    • addReloadListener

      public void addReloadListener(Runnable reloadListener)
      Called on requestReload()
      Parameters:
      reloadListener -
    • removeReloadListenersIf

      public void removeReloadListenersIf(Predicate<Runnable> listener)
      Remove reloadListeners (see requestReload()) which match the rule. Helpful when panel gets reused multiple times.