protected void layout() { Rectangle parentArea = this.composite.getClientArea(); int width = parentArea.width; int height = parentArea.height; Rectangle sashBounds = sash.getBounds(); resultText.setBounds(0, 0, width, sashBounds.y); userText.setBounds(0, sashBounds.y + 3, width, height - sashBounds.y - 3); sash.setBounds(0, sashBounds.y, width, 3); }
protected void resized() { Rectangle parentArea = this.composite.getClientArea(); int width = parentArea.width; int height = parentArea.height; int userTextHeight = (int) (height * (1 - defaultRatio)); if (userTextHeight < 25) userTextHeight = 25; resultText.setBounds(0, 0, width, height - userTextHeight - 3); userText.setBounds(0, height - userTextHeight, width, userTextHeight); sash.setBounds(0, height - userTextHeight - 3, width, 3); }