Class SimComponentPalette

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SimComponentPalette extends JPanel
Palette of all SimComponent classes for the graph panel in edit mode (Redmine #62): a tree grouped by package (below net.simplace.sim.components) with a filter. A component is added by dragging it into the graph (the graph panel accepts the text simcomponent:<class>) or by double click. The classes are searched once in the background (this takes some seconds) and cached.
Author:
Andreas Enders, Claude (Anthropic), co-author
See Also:
  • Field Details

  • Constructor Details

    • SimComponentPalette

      public SimComponentPalette(Consumer<String> aOnDoubleClick)
      Creates the palette.
      Parameters:
      aOnDoubleClick - called with the class name on double click (e.g. add in the middle of the graph), may be null