private void command_SIZE_Y(WidgetInfo widget, int height, ResizeDirection direction)
throws Exception {
Rectangle bounds = widget.getBounds();
// TopHeight
{
MethodInvocation invocation = getWidgetInvocation(widget, "setWidgetTopHeight");
if (invocation != null) {
if (direction == ResizeDirection.LEADING) {
int oldTop = bounds.top();
int deltaHeight = height - bounds.height;
int top = oldTop - deltaHeight;
setInvocationArgument(invocation, 1, top, false);
}
setInvocationArgument(invocation, 3, height, false);
return;
}
}
// BottomHeight
{
MethodInvocation invocation = getWidgetInvocation(widget, "setWidgetBottomHeight");
if (invocation != null) {
if (direction == ResizeDirection.TRAILING) {
int oldBottom = getBounds().height - bounds.bottom();
int deltaHeight = height - bounds.height;
int bottom = oldBottom - deltaHeight;
setInvocationArgument(invocation, 1, bottom, false);
}
setInvocationArgument(invocation, 3, height, false);
return;
}
}
// TopBottom
{
MethodInvocation invocation = getWidgetInvocation(widget, "setWidgetTopBottom");
if (invocation != null) {
if (direction == ResizeDirection.LEADING) {
int oldTop = bounds.top();
int deltaHeight = height - bounds.height;
int top = oldTop - deltaHeight;