home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 14 / IOPROG_14.ISO / soft / sdkjava / sdkjava.exe / SDKJava.cab / Samples / AFC / FxTextures / Src / SDKInsetPanel.java < prev    next >
Encoding:
Java Source  |  1998-03-05  |  1.5 KB  |  70 lines

  1. //
  2. // (c) 1998 Microsoft Corporation.  All rights reserved.
  3. //
  4. import java.awt.Insets;
  5. import com.ms.ui.*;
  6.  
  7. public class SDKInsetPanel extends UIPanel
  8. {
  9.     private int t,l,b,r;
  10.  
  11.     public SDKInsetPanel() { this(0,0,0,0); }
  12.  
  13.     public SDKInsetPanel(int t, int l, int b, int r)
  14.     { 
  15.         super();
  16.         this.t = t; this.l = l; this.b = b; this.r = r;
  17.     }
  18.  
  19.     public Insets getInsets() { return new Insets(t,l,b,r); }
  20. }
  21.  
  22. class SDKInsetPanelVFL extends SDKInsetPanel
  23. {
  24.     public SDKInsetPanelVFL(int t, int l, int b, int r)
  25.     { 
  26.         super(t,l,b,r);
  27.         setLayout(new UIVerticalFlowLayout(UIVerticalFlowLayout.FILL, 0));
  28.     }
  29. }
  30.  
  31. class SDKInsetPanelGL extends SDKInsetPanel
  32. {
  33.     public SDKInsetPanelGL(int t, int l, int b, int r)
  34.     { 
  35.         super(t,l,b,r);
  36.         setLayout(new UIGridLayout(0, 1, 0, 1));
  37.     }
  38. }
  39.  
  40. class SDKInsetPanelBL extends SDKInsetPanel
  41. {
  42.     public SDKInsetPanelBL() { this(0,0,0,0); }
  43.  
  44.     public SDKInsetPanelBL(IUIComponent comp) { this(comp,0,0,0,0); }
  45.  
  46.     public SDKInsetPanelBL(IUIComponent comp, int t, int l, int b, int r)
  47.     { 
  48.         this(t,l,b,r);
  49.         add(comp, "center");
  50.     }
  51.  
  52.     public SDKInsetPanelBL(int t, int l, int b, int r)
  53.     { 
  54.         super(t,l,b,r);
  55.         setLayout(new UIBorderLayout());
  56.     }
  57. }
  58.  
  59. class SDKInsetGroup extends UIGroup
  60. {
  61.     private int t, l, b, r;
  62.  
  63.     public SDKInsetGroup(String title, int t, int l, int b, int r)
  64.     {
  65.         super(title);
  66.         this.t = t; this.l = l; this.b = b; this.r = r;
  67.     }
  68.  
  69.     public Insets getInsets() { return new Insets(t, l, b, r); }
  70. }