home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09961.iso / java / mojo1-2e.exe / MOJODISK / DATA.4 / plugins / tabwrap.def < prev    next >
Encoding:
Text File  |  1996-07-01  |  5.1 KB  |  202 lines

  1. DEF_COMPONENTNAME
  2. MlTabPanel
  3. DEF_SUPERCLASS
  4. Panel
  5. DEF_SUPERCOMPONENT
  6.  
  7. DEF_PACKAGE
  8. plugins
  9. microline
  10. DEF_ENDLIST
  11. DEF_SUBCOMPONENTLIST
  12. DEF_ENDLIST
  13. DEF_SUBCOMPONENTCLASSLIST
  14. DEF_ENDLIST
  15. DEF_CATEGORY
  16.  
  17. DEF_BITMAP
  18.  
  19. DEF_THUMBNAIL_UP
  20.  
  21. DEF_THUMBNAIL_DOWN
  22.  
  23. DEF_BASE
  24. DEF_IMPORTS
  25. DEF_ENDLIST
  26. DEF_REQUIRES
  27. DEF_ENDLIST
  28. DEF_IMPLEMENTS
  29. DEF_ENDLIST
  30. DEF_DECLARATION
  31. DEF_ENDLIST
  32. DEF_METHOD
  33. public Component addTab(String name)
  34. // Adds a tab. The name passed defines the tab's label as well as the page name of the tab. 
  35. DEF_ENDLIST
  36. DEF_METHOD
  37. public Component addTab(String name, Image image)
  38. // Adds a tab containing a label and an image. The name passed defines the tab's label as well as the
  39. // page name of the tab. 
  40. DEF_ENDLIST
  41. DEF_METHOD
  42. public Component add(String name, Component comp)
  43. // Adds a tab managing the component comp. The name passed defines the tab's label as well as the
  44. // page name of the tab. When the tab is selected, the given component will be shown. 
  45. DEF_ENDLIST
  46. DEF_METHOD
  47. public synchronized Component add(String pageName, String tabLabel, Image tabImage,
  48. Component comp)
  49. // Adds a tab managing the component comp. The comp parameter may be null, in which case the tab
  50. // will not manage any component. The pageName parmaeter defines the page name of the tab. This
  51. // name is used to uniquely identify the tab. The tabLabel is the label to display in the tab and
  52. // tabImage defines an Image to appear in the tab. Either of these values may be null. 
  53. DEF_ENDLIST
  54. DEF_METHOD
  55. public Object getTabValue(String pageName, String name)
  56. // Returns the value of the the tab resource for the tab with the given pageName. The type of the value
  57. // returned is determined by the resource. Integer values will return as Integer objects, boolean values
  58. // as Boolean objects, etc. 
  59. DEF_ENDLIST
  60. DEF_METHOD
  61. public void remove(String pageName)
  62. // Removes the tab and any component managed by the tab for the given pageName. 
  63. DEF_ENDLIST
  64. DEF_METHOD
  65. public synchronized void remove(int position)
  66. // Removes the tab and any component managed by the tab at the given position in the TabPanel. 
  67. DEF_ENDLIST
  68. DEF_METHOD
  69. public void showPage(String pageName)
  70. // Shows the page with the pageName passed. An ACTION_EVENT will be posted if the newly
  71. // activated page is not the same as the current active page. 
  72. DEF_ENDLIST
  73. DEF_METHOD
  74. public synchronized void showPage(String pageName, boolean notify)
  75. // Shows the page with the pageName passed. If notify is true, an ACTION_EVENT will be posted
  76. // if the newly activated page is not the same as the current active page. 
  77. DEF_ENDLIST
  78. DEF_METHOD
  79. public synchronized void showPage(int position, boolean notify)
  80. // Shows the page at the given position. If notify is true, an ACTION_EVENT will be posted if the
  81. // newly activated page is not the same as the current active page. 
  82. DEF_ENDLIST
  83. DEF_ENDCOMPONENT
  84. DEF_COMPONENTNAME
  85. MicrolineTabs
  86. DEF_SUPERCLASS
  87. MlTabPanel
  88. DEF_SUPERCOMPONENT
  89.  
  90. DEF_PACKAGE
  91. plugins
  92. tabs
  93. DEF_ENDLIST
  94. DEF_SUBCOMPONENTLIST
  95. DEF_ENDLIST
  96. DEF_SUBCOMPONENTCLASSLIST
  97. DEF_ENDLIST
  98. DEF_CATEGORY
  99. MicroLine
  100. DEF_BITMAP
  101. tabm.bmp
  102. DEF_THUMBNAIL_UP
  103. mltab.bmp
  104. DEF_THUMBNAIL_DOWN
  105. 2-mltab.bmp
  106. DEF_VISUAL
  107. DEF_TOOL
  108. DEF_IMPORTS
  109. DEF_ENDLIST
  110. DEF_REQUIRES
  111. DEF_ENDLIST
  112. DEF_IMPLEMENTS
  113. DEF_ENDLIST
  114. DEF_DECLARATION
  115. // A class that produces a tabpanel.
  116. // This component has much more functionality which is described in
  117. // the included Microline documentation in /docs/microline.
  118. // This third party component was created by MicroLine.  They can be contacted at:
  119. // http://www.mlsoft.com
  120. //  Variable Declarations
  121.   MlResources res;      
  122.   int numTabs;
  123.   int place;
  124. DEF_ENDLIST
  125. DEF_METHOD
  126. void initialize() {
  127.     int i;    
  128.     res = new MlResources();    
  129.     setLayout(new BorderLayout());
  130.     setBackground(new Color(192, 192, 192));
  131.     if (place == 1)  {
  132.       res.add("tabPlacement", "TABS_ON_TOP");  
  133.     }
  134.     if (place == 2)  {
  135.       res.add("tabPlacement", "TABS_ON_BOTTOM");  
  136.     }    
  137.     if (place == 3)  {
  138.       res.add("tabPlacement", "TABS_ON_LEFT");  
  139.     }
  140.     if (place == 4)  {
  141.       res.add("tabPlacement", "TABS_ON_RIGHT");  
  142.     }
  143.     setValues(res);
  144.     setValue("marginWidth", 4);
  145.     for (i = 1; i <= numTabs; i++)
  146.                 add("Tab " + i, new Label("Page " + i, Label.CENTER));
  147.     }
  148. DEF_ENDLIST
  149. DEF_METHOD
  150. public void setPlacement(int aParam) {
  151.     place = aParam;    
  152.   }
  153. DEF_ENDLIST
  154. DEF_METHOD
  155. public void setTabs(int tabsparameter) {
  156.     numTabs = tabsparameter;     
  157. }
  158. DEF_ENDLIST
  159. DEF_PROPERTY
  160. Tabs Placement
  161. int
  162. setPlacement(AVALUE);
  163. AVALUE = AVALUE;
  164. 3
  165. DEF_ENDLIST
  166. DEF_PROPERTY
  167. #ofTabs
  168. int
  169. setTabs(AVALUE);
  170. AVALUE = AVALUE;
  171. 3
  172. DEF_ENDLIST
  173. DEF_PROPERTY
  174. Top
  175. int
  176. move(bounds().x, AVALUE);
  177. AVALUE = bounds().y;
  178. 0
  179. DEF_ENDLIST
  180. DEF_PROPERTY
  181. Left
  182. int
  183. move(AVALUE, bounds().y);
  184. AVALUE = bounds().x;
  185. 0
  186. DEF_ENDLIST
  187. DEF_PROPERTY
  188. Height
  189. int
  190. resize(bounds().width, AVALUE);
  191. AVALUE = bounds().height;
  192. 175
  193. DEF_ENDLIST
  194. DEF_PROPERTY
  195. Width
  196. int
  197. resize(AVALUE, bounds().height);
  198. AVALUE = bounds().width;
  199. 285
  200. DEF_ENDLIST
  201. DEF_ENDCOMPONENT
  202.