private boolean enabled = true;
+ private String width = "notinited";
+
public VMenuBar() {
// Create an empty horizontal menubar
this(false, null);
@Override
public void setWidth(String width) {
+ if (Util.equals(this.width, width)) {
+ return;
+ }
+
+ this.width = width;
Util.setWidthExcludingPaddingAndBorder(this, width, 0);
if (!subMenu) {
// Only needed for root level menu
private VMenuBar findRootMenu() {
VMenuBar menubar = getParentMenu();
-
+
// Traverse up until root menu is found
while (menubar.getParentMenu() != null) {
menubar = menubar.getParentMenu();