Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

FeatureTabSheet.java 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /* *************************************************************************
  2. IT Mill Toolkit
  3. Development of Browser User Interfaces Made Easy
  4. Copyright (C) 2000-2006 IT Mill Ltd
  5. *************************************************************************
  6. This product is distributed under commercial license that can be found
  7. from the product package on license.pdf. Use of this product might
  8. require purchasing a commercial license from IT Mill Ltd. For guidelines
  9. on usage, see licensing-guidelines.html
  10. *************************************************************************
  11. For more information, contact:
  12. IT Mill Ltd phone: +358 2 4802 7180
  13. Ruukinkatu 2-4 fax: +358 2 4802 7181
  14. 20540, Turku email: info@itmill.com
  15. Finland company www: www.itmill.com
  16. Primary source for information and releases: www.itmill.com
  17. ********************************************************************** */
  18. package com.itmill.toolkit.demo.features;
  19. import com.itmill.toolkit.ui.*;
  20. public class FeatureTabSheet extends Feature {
  21. public FeatureTabSheet() {
  22. super();
  23. }
  24. protected Component getDemoComponent() {
  25. OrderedLayout l = new OrderedLayout();
  26. // Example panel
  27. Panel show = new Panel("TabSheet component");
  28. TabSheet ts = new TabSheet();
  29. ts.addTab(new Label("Tab 1 Body"), "Tab 1 caption", null);
  30. ts.addTab(new Label("Tab 2 Body"), "Tab 2 caption", null);
  31. ts.addTab(new Label("Tab 3 Body"), "Tab 3 caption", null);
  32. show.addComponent(ts);
  33. l.addComponent(show);
  34. // Properties
  35. propertyPanel = new PropertyPanel(ts);
  36. return l;
  37. }
  38. protected String getExampleSrc() {
  39. return "TabSheet ts = new TabSheet();"
  40. + "ts.addTab(new Label(\"Tab 1 Body\"),\"Tab 1 caption\",null);"
  41. + "ts.addTab(new Label(\"Tab 2 Body\"),\"Tab 2 caption\",null);"
  42. + "ts.addTab(new Label(\"Tab 3 Body\"),\"Tab 3 caption\",null);";
  43. }
  44. protected String getDescriptionXHTML() {
  45. return "A multicomponent container with tabs for switching between them.<br/>"
  46. + "In the normal case, one would place a layout component on each tab.<br/><br />"
  47. + "On the demo tab you can try out how the different properties affect "
  48. + "the presentation of the component.";
  49. }
  50. protected String getImage() {
  51. return "tabsheet.jpg";
  52. }
  53. protected String getTitle() {
  54. return "TabSheet";
  55. }
  56. }