I have a layouting corner case (i guess) that manages to crash the internal ui sizing.
I have no custom components used, all are stock lemur stuff.
Why do I post this? I guess that a bit earlier in that layouting (there where the problem starts) an handling is either missing, or that one of those calculations is wrong and hope that this might help to improve it.
I do not set any size anywhere myself, all is layouted via the prefered sizes.
java.lang.IllegalArgumentException: Size cannot be negative:(433.09885, -22.835289, 0.0)
at com.simsilica.lemur.core.GuiControl.setSize(GuiControl.java:242)
at com.simsilica.lemur.component.SpringGridLayout$Entry.setSize(SpringGridLayout.java:537)
at com.simsilica.lemur.component.SpringGridLayout.reshape(SpringGridLayout.java:310)
at com.simsilica.lemur.core.GuiControl.setSize(GuiControl.java:259)
at com.simsilica.lemur.component.BorderLayout.reshape(BorderLayout.java:166)
at com.simsilica.lemur.core.GuiControl.setSize(GuiControl.java:259)
at com.simsilica.lemur.component.SpringGridLayout$Entry.setSize(SpringGridLayout.java:537)
at com.simsilica.lemur.component.SpringGridLayout.reshape(SpringGridLayout.java:310)
at com.simsilica.lemur.core.GuiControl.setSize(GuiControl.java:259)
at com.simsilica.lemur.core.GuiControl.revalidate(GuiControl.java:351)
at com.simsilica.lemur.core.GuiControl.controlUpdate(GuiControl.java:318)
at com.jme3.scene.control.AbstractControl.update(AbstractControl.java:128)
at com.jme3.scene.Spatial.runControlUpdate(Spatial.java:736)
at com.jme3.scene.Spatial.updateLogicalState(Spatial.java:879)
at com.jme3.scene.Node.updateLogicalState(Node.java:230)
at com.jme3.scene.Node.updateLogicalState(Node.java:241)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:243)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:197)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
at java.lang.Thread.run(Thread.java:745)
The ui is structured like this, Simple table is an Grid with an ArrayGridModel, used to simplify building often required table semantics. At the end the parser is attached if that helps
<Container layout="BorderLayout">
<Container constraints="North">
<Button id="menuSave" text="Save"/>
<Button id="menuLoad" text="Load"/>
<TextField id="shipName"/>
<Button id="pitchPlus" text = "P+"/>
<Label id="pitch"/>
<Button id="pitchMinus" text = "P-"/>
<Button id="yawPlus" text = "Y+"/>
<Label id="yaw"/>
<Button id="yawMinus" text = "Y-"/>
<Button id="rollPlus" text = "R+"/>
<Label id="roll"/>
<Button id="rollMinus" text = "R-"/>
</Container>
<Container constraints="West">
<Label text="Filter" id="filter"/>
<Button id = "up" text="up"/>
<SimpleTable id="blockTreeTable">
<Column id="blockName" title="blockName" renderer="Label" field="name" />
<Column id="mass" title="mass" renderer="Label" field="mass" />
<Column id="blockPreview" title="blockPreview" renderer="Image" field="blockPreview" />
<Column id="info" title="info" renderer="Button" value="?" />
</SimpleTable>
<Button id = "down" text="down"/>
<Label id="cursorInfo"/>
</Container>
</Container>
I can give you a dump of the praser, if that helps, but it is not in a user friendly way currently