00001
00066 package com.arcle.rmt.superwaba.ui;
00067
00068 import waba.ui.Button;
00069
00075 public abstract class CommandWindow extends WindowBase {
00076 public CommandWindow(String title, byte borderStyle) {
00077 super(title, borderStyle);
00078 }
00079
00080
00081
00082
00087 public abstract Button[] getCommandButtons();
00088
00089
00090
00091
00095 protected void layoutChildren() {
00096 final int xGap = 2;
00097 final int yGap = 2;
00098 Button[] commandButtons = getCommandButtons();
00099
00100 if (commandButtons != null && commandButtons.length > 0) {
00101
00102 add(commandButtons[0], LEFT+xGap, BOTTOM);
00103
00104 for (int i=1; i<commandButtons.length; i++ ){
00105 add(commandButtons[i], AFTER+xGap, SAME);
00106 }
00107 bottomMargin = commandButtons[0].getSize().height() + yGap;
00108 }
00109 }
00110
00111
00112
00113
00114
00120 protected int getBottomMargin() {
00121 return bottomMargin;
00122 }
00123
00127 private int bottomMargin = 0;
00128 }
00129