Commit bee3653a authored by Denis Fokin's avatar Denis Fokin
Browse files

TouchBar - Initial approach

parent 86592218
Branches unavailable Tags unavailable
No related merge requests found
Showing with 7 additions and 0 deletions
+7 -0
......@@ -241,6 +241,12 @@ public abstract class DialogWrapper {
window.addComponentListener(myResizeListener);
}
createDefaultActions();
}
public void updateTouchBar() {
myButtonMap.values().stream().forEach(button -> ((JDialog)getWindow()).addTouchBarItem(button.getText(), () -> button.getAction().actionPerformed(null)));
myOptionsButtons.forEach(button -> ((JDialog)getWindow()).addTouchBarItem(button.getText(), () -> button.getAction().actionPerformed(null)));
}
/**
......
......@@ -900,6 +900,7 @@ public class DialogWrapperPeerImpl extends DialogWrapperPeer implements FocusTra
Foundation.invoke(_native, "setCollectionBehavior:", 1 << 8);
}
}
myDialogWrapper.get().updateTouchBar();
}
SwingUtilities.invokeLater(() -> {
myOpened = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment