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.

FeatureTextField.java 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 FeatureTextField extends Feature {
  21. public FeatureTextField() {
  22. super();
  23. }
  24. protected Component getDemoComponent() {
  25. OrderedLayout l = new OrderedLayout(
  26. OrderedLayout.ORIENTATION_HORIZONTAL);
  27. // Test component
  28. TextField tf = new TextField("Caption");
  29. l.addComponent(tf);
  30. // Properties
  31. propertyPanel = new PropertyPanel(tf);
  32. Form f = propertyPanel.createBeanPropertySet(new String[] { "columns",
  33. "rows", "wordwrap", "writeThrough", "readThrough",
  34. "nullRepresentation", "nullSettingAllowed", "secret" });
  35. propertyPanel.addProperties("Text field properties", f);
  36. setJavadocURL("ui/TextField.html");
  37. return l;
  38. }
  39. protected String getExampleSrc() {
  40. return "TextField tf = new TextField(\"Caption\");\n"
  41. + "tf.setValue(\"Contents\");";
  42. }
  43. /**
  44. * @see com.itmill.toolkit.demo.features.Feature#getDescriptionXHTML()
  45. */
  46. protected String getDescriptionXHTML() {
  47. return "<p>TextField combines the logic of both the single line text-entry field and the multi-line "
  48. + "text-area into one component. "
  49. + "As with all Data-components of IT Mill Toolkit, the TextField can also be bound to an "
  50. + "underlying data source, both directly or in a buffered (asynchronous) "
  51. + "mode. In buffered mode its background color will change to indicate "
  52. + "that the value has changed but is not committed.</p>"
  53. + "<p>Furthermore a validators may be bound to the component to "
  54. + "check and validate the given input before it is actually commited."
  55. + "</p>"
  56. + "<p>On the demo tab you can try out how the different properties affect the "
  57. + "presentation of the component.</p>";
  58. }
  59. protected String getImage() {
  60. return "textfield.gif";
  61. }
  62. protected String getTitle() {
  63. return "TextField";
  64. }
  65. }