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.
- package/classes/ComponentContainer.js +19 -0
- package/classes/Window.js +3 -3
- package/icon.png +0 -0
- package/jar/gui-11.jar +0 -0
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
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 {
|
|
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
|