Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

CommandWindow.java

Go to the documentation of this file.
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     // New Abstract Methods
00082 
00087     public abstract Button[] getCommandButtons();
00088 
00089     //-----------------------------------------------------------------------
00090     // Implemented Abstract Methods
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             // first button
00102             add(commandButtons[0], LEFT+xGap, BOTTOM);
00103             // the rest of the buttons
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     // Protected Methods
00113 
00114 
00120     protected int getBottomMargin() {
00121         return bottomMargin;
00122     }
00123 
00127     private int bottomMargin = 0;
00128 }
00129 

Generated on Fri Jun 18 19:50:54 2004 for Arcle Rambutan by doxygen 1.3.5