Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

FeatureCustomLayout.java 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 FeatureCustomLayout extends Feature {
  21. protected String getDescriptionXHTML() {
  22. return "<p>A container component with freely designed layout and style. The "
  23. + "container consists of items with textually represented locations. Each "
  24. + "item contains one sub-component. The adapter and theme are resposible "
  25. + "for rendering the layout with given style by placing the items on the "
  26. + "screen in defined locations.</p>"
  27. + "<p>The definition of locations is not fixed - the each style can define its "
  28. + "locations in a way that is suitable for it. One typical example would be "
  29. + "to create visual design for a website as a custom layout: the visual design "
  30. + "could define locations for \"menu\", \"body\" and \"title\" for example. "
  31. + "The layout would then be implemented as XLS-template with for given style.</p>"
  32. + "<p>The default theme handles the styles that are not defined by just drawing "
  33. + "the subcomponents with flowlayout.</p>";
  34. }
  35. protected String getExampleSrc() {
  36. return "CustomLayout c = new CustomLayout(\"style-name\");\n"
  37. + "c.addComponent(new Label(\"foo\"),\"foo-location\");\n"
  38. + "c.addComponent(new Label(\"bar\"),\"bar-location\");\n";
  39. }
  40. protected String getImage() {
  41. return "customlayout.jpg";
  42. }
  43. protected String getTitle() {
  44. return "CustomLayout";
  45. }
  46. protected Component getDemoComponent() {
  47. OrderedLayout l = new OrderedLayout();
  48. Label lab = new Label();
  49. lab.setStyle("featurebrowser-none");
  50. l.addComponent(lab);
  51. // Properties
  52. propertyPanel = null;
  53. setJavadocURL("ui/CustomLayout.html");
  54. return l;
  55. }
  56. }