home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / jbuilder / jhelp.z / updateAWT < prev    next >
Text File  |  1997-07-30  |  3KB  |  84 lines

  1. #! /bin/sed -f
  2. # updateAWT:  Update from deprecated 1.0 AWT method names to new 1.1 names
  3. #
  4. # Usage:  updateAWT old-file > new-file
  5. #
  6. # Example:  updateAWT MyClass.java > tmp.java
  7. #   In this example, tmp.java should eventually be renamed to
  8. #   MyClass.java once the conversion has been looked over for accuracy.
  9.  
  10.  
  11. # Bug fixes (1/7/97):
  12. #   - fixed erroneous double left paren that prevented enable,
  13. #     disable, show, and hide from being changed
  14. #   - added  show(<expression>)  -->  setVisible(<expression>)
  15. #   - added  enable(<expression>)  -->  setEnabled(<expression>)
  16. #   - added  getBoundingBox  -->  getBounds  for Polygon class
  17. #   - added  getClipRect  -->  getClipBounds  for Graphics class
  18. #   - removed  size  -->  getSize  because of conflict with Vector class
  19.  
  20.  
  21. # Component:
  22. #   - The ordering of the two "enable" lines should not be switched.
  23. #   - The ordering of the two "show" lines should not be switched.
  24. #   - Don't change size to getSize because of the same name occurs in
  25. #     Vector and possibly other classes:
  26. #         s/\<size\([     ]*(\)/getSize\1/g
  27. #
  28. s/\<bounds\([     ]*(\)/getBounds\1/g
  29. s/\<enable[     ]*([     ]*)/setEnabled(true)/g
  30. s/\<enable\([     ]*(\)/setEnabled\1/g
  31. s/\<disable[     ]*([     ]*)/setEnabled(false)/g
  32. s/\<show[     ]*([     ]*)/setVisible(true)/g
  33. s/\<show\([     ]*(\)/setVisible\1/g
  34. s/\<hide[     ]*([     ]*)/setVisible(false)/g
  35. s/\<layout\([     ]*(\)/doLayout\1/g
  36. s/\<inside\([     ]*(\)/contains\1/g
  37. s/\<locate\([     ]*(\)/getComponentAt\1/g
  38. s/\<location\([     ]*(\)/getLocation\1/g
  39. s/\<minimumSize\([     ]*(\)/getMinimumSize\1/g
  40. s/\<preferredSize\([     ]*(\)/getPreferredSize\1/g
  41. s/\<move\([     ]*(\)/setLocation\1/g
  42. s/\<nextFocus\([     ]*(\)/transferFocus\1/g
  43. s/\<reshape\([     ]*(\)/setBounds\1/g
  44. s/\<resize\([     ]*(\)/setSize\1/g
  45.  
  46. # CheckboxGroup
  47. s/\<getCurrent\([     ]*(\)/getSelectedCheckbox\1/g
  48. s/\<setCurrent\([     ]*(\)/setSelectedCheckbox\1/g
  49.  
  50. # Choice, List
  51. s/\<addItem\([     ]*(\)/add\1/g
  52. s/\<allowsMultipleSelections\([     ]*(\)/isMultipleMode\1/g
  53. s/\<clear\([     ]*(\)/removeAll\1/g
  54. s/\<countItems\([     ]*(\)/getItemCount\1/g
  55. s/\<delItem\([     ]*(\)/remove\1/g
  56. s/\<isSelected\([     ]*(\)/isIndexSelected\1/g
  57. s/\<setMultipleSelections\([     ]*(\)/setMultipleMode\1/g
  58.  
  59. # Scrollbar
  60. s/\<getLineIncrement\([     ]*(\)/getUnitIncrement\1/g
  61. s/\<setLineIncrement\([     ]*(\)/setUnitIncrement\1/g
  62. s/\<getPageIncrement\([     ]*(\)/getBlockIncrement\1/g
  63. s/\<setPageIncrement\([     ]*(\)/setBlockIncrement\1/g
  64. s/\<getVisible\([     ]*(\)/getVisibleAmount\1/g
  65.  
  66. # TextArea, TextField
  67. s/\<appendText\([     ]*(\)/append\1/g
  68. s/\<insertText\([     ]*(\)/insert\1/g
  69. s/\<replaceText\([     ]*(\)/replaceRange\1/g
  70. s/\<setEchoCharacter\([     ]*(\)/setEchoChar\1/g
  71.  
  72. # Container
  73. s/\<countComponents\([     ]*(\)/getComponentCount\1/g
  74. s/\<insets\([     ]*(\)/getInsets\1/g
  75.  
  76. # MenuBar
  77. s/\<countMenus\([     ]*(\)/getMenuCount\1/g
  78.  
  79. # Polygon
  80. s/\<getBoundingBox\([     ]*(\)/getBounds\1/g
  81.  
  82. #Graphics
  83. s/\<getClipRect\([     ]*(\)/getClipBounds\1/g
  84.