Skip to content

Commit

Permalink
Example project improvements to use a template
Browse files Browse the repository at this point in the history
  • Loading branch information
davetcc committed Nov 28, 2024
1 parent 4d62aad commit b461cb0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ public void managerWillStart() {
}
});

// TEMPLATE_COPY=off
// add some data to the list menu item.
MenuItemHelper.setMenuState(menuDef.getStatusMyListItem(), List.of("Item 1", "Item 2", "Item 3"), menuDef.getMenuTree());
// TEMPLATE_COPY=on
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@ public void start(Stage stage) {
var localController = new LocalMenuController();
navigationHeader = ctx.getBean(JfxNavigationHeader.class);
var factory = new JfxMenuEditorFactory(localController, Platform::runLater, dlgMgr);

// TEMPLATE_COPY=off
// The following demonstrates how to add a custom panel to your project for a particular menu item. See the
// StatusPanelDrawable class for more information. You provide the menu item for which custom drawing is needed
// and the panel that should be presented instead of the AutoUI.
navigationHeader.addCustomMenuPanel(menuTree.getStatus(), new StatusPanelDrawable(menuTree, executor, factory,
localController, mgr, new CondColorFromGlobal(globalSettings)));
// TEMPLATE_COPY=on

navigationHeader.initialiseUI(dlgMgr, localController, scroller);

var localTree = new LocalTreeComponentManager(mgr, navigationHeader, executor);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TEMPLATE_COPY=off
package com.thecoderscorner.menu.devicedemo.optional;

import com.thecoderscorner.embedcontrol.core.controlmgr.*;
Expand Down

0 comments on commit b461cb0

Please sign in to comment.