swing-ui 1.1.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -608,6 +608,25 @@ export class ComponentContainer extends UIComponent
608
608
 
609
609
  delete desc.trayIcons;
610
610
  }
611
+
612
+ if("toolBars" in desc)
613
+ {
614
+ Object.keys(desc.toolBars).forEach(location =>{
615
+ try
616
+ {
617
+ common.validateComponent(desc.toolBars[location]);
618
+ }catch(ex)
619
+ {
620
+ error(`Failed to load a ToolBar at location "${location}". ${ex.name}: ${ex.message}`, false);
621
+ return;
622
+ }
623
+
624
+ const bar = new ToolBar();
625
+ this[desc.toolBars[location].ref] = bar;
626
+ this._applyComponentPropertiesV1_0(bar, desc.toolBars[location], common);
627
+ this.toolBar(location, bar);
628
+ });
629
+ }
611
630
  }
612
631
  }
613
632
 
package/classes/Window.js CHANGED
@@ -453,7 +453,7 @@ class Window extends ShapeContainer
453
453
  if(size.width < 0 || size.height < 0) return this;
454
454
 
455
455
  const offset = this.innerOffset;
456
- this.#prop.size = {width: size.width + offset.left + offset.right, height: size.height + offset.top + offset.bottom};
456
+ this.prop.size = {width: size.width + offset.left + offset.right, height: size.height + offset.top + offset.bottom};
457
457
 
458
458
  return this.property("innerSize", [size]);
459
459
  }
@@ -606,11 +606,11 @@ class Window extends ShapeContainer
606
606
  }
607
607
 
608
608
  /**
609
- * Sets a ToolBar to one of locations: `top`, `right`, `bottom` and `left`, or gets a ToolBar at a specified location.
609
+ * Sets a ToolBar to one of locations: `top`, `right`, `bottom` and `left`.
610
610
  *
611
611
  * @param {string} dockLocation - One of: `top`, `right`, `bottom` and `left`.
612
612
  * @param {ToolBar} [toolbar] - ToolBar to set to specified location. Set `null` to remove the toolbar from that location. Omit to get the toolbar already in that location.
613
- * @returns {ToolBar|null|Window} If only location is specified, a {@link ToolBar} or `null` is returned. When `toolbar` argument is passed, an instance of `this` Window is returned.
613
+ * @returns {null|any|Window}
614
614
  * @since 1.0.8
615
615
  */
616
616
  toolBar(dockLocation, toolbar = undefined)
package/icon.png CHANGED
Binary file
package/jar/gui-11.jar CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swing-ui",
3
- "version": "1.1.5",
3
+ "version": "1.2.0",
4
4
  "description": "Cross-platform Graphic User Interface for Node.js, Bun and Deno 2+",
5
5
  "main": "index.js",
6
6
  "scripts": {