1. /*
  2. * @(#)ImagePainter.java 1.8 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.swing.plaf.synth;
  8. import java.awt.*;
  9. import java.net.*;
  10. import javax.swing.*;
  11. /**
  12. * ImagePainter fills in the specified region using an Image. The Image
  13. * is split into 9 segments: north, north east, east, south east, south,
  14. * south west, west, north west and the center. The corners are defined
  15. * by way of an insets, and the remaining regions are either tiled or
  16. * scaled to fit.
  17. *
  18. * @version 1.8, 12/19/03
  19. * @author Scott Violet
  20. */
  21. class ImagePainter extends SynthPainter {
  22. private Image image;
  23. private Insets sInsets;
  24. private Insets dInsets;
  25. private URL path;
  26. private boolean tiles;
  27. private boolean paintCenter;
  28. private Object renderingHint;
  29. ImagePainter(boolean tiles, boolean paintCenter, Object renderingHint,
  30. Insets sourceInsets, Insets destinationInsets) {
  31. this.sInsets = (Insets)sourceInsets.clone();
  32. if (destinationInsets == null) {
  33. dInsets = sInsets;
  34. }
  35. else {
  36. this.dInsets = (Insets)destinationInsets.clone();
  37. }
  38. this.tiles = tiles;
  39. this.paintCenter = paintCenter;
  40. this.renderingHint = renderingHint;
  41. }
  42. public ImagePainter(boolean tiles, boolean paintCenter,
  43. Object renderingHint, Insets sourceInsets,
  44. Insets destinationInsets, Image image) {
  45. this(tiles, paintCenter, renderingHint, sourceInsets,
  46. destinationInsets);
  47. this.image = image;
  48. }
  49. public ImagePainter(boolean tiles, boolean paintCenter,
  50. Object renderingHint, Insets sourceInsets,
  51. Insets destinationInsets, URL path) {
  52. this(tiles, paintCenter, renderingHint, sourceInsets,
  53. destinationInsets);
  54. this.path = path;
  55. }
  56. public boolean getTiles() {
  57. return tiles;
  58. }
  59. public boolean getPaintsCenter() {
  60. return paintCenter;
  61. }
  62. public Object getRenderingHint() {
  63. return renderingHint;
  64. }
  65. public Insets getInsets(Insets insets) {
  66. if (insets == null) {
  67. return (Insets)this.dInsets.clone();
  68. }
  69. insets.left = this.dInsets.left;
  70. insets.right = this.dInsets.right;
  71. insets.top = this.dInsets.top;
  72. insets.bottom = this.dInsets.bottom;
  73. return insets;
  74. }
  75. public Image getImage() {
  76. if (image == null) {
  77. image = new ImageIcon(path, null).getImage();
  78. }
  79. return image;
  80. }
  81. private void paint(Graphics g, int x, int y, int w, int h) {
  82. Image image;
  83. Object lastHint;
  84. Object renderingHint = getRenderingHint();
  85. if (renderingHint != null) {
  86. Graphics2D g2 = (Graphics2D)g;
  87. lastHint = g2.getRenderingHint(RenderingHints.KEY_INTERPOLATION);
  88. if (lastHint == null) {
  89. lastHint = RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
  90. }
  91. g2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
  92. renderingHint);
  93. }
  94. else {
  95. lastHint = null;
  96. }
  97. if ((image = getImage()) != null) {
  98. Insets sInsets = this.sInsets;
  99. Insets dInsets = this.dInsets;
  100. int iw = image.getWidth(null);
  101. int ih = image.getHeight(null);
  102. boolean stretch = !getTiles();
  103. // top left
  104. g.drawImage(image, x, y, x + dInsets.left, y + dInsets.top,
  105. 0, 0, sInsets.left, sInsets.top, null);
  106. // top
  107. drawChunk(image, g, stretch, x + dInsets.left, y,
  108. x + w - dInsets.right, y + dInsets.top, sInsets.left, 0,
  109. iw - sInsets.right, sInsets.top, true);
  110. // top right
  111. g.drawImage(image, x + w - dInsets.right, y, x + w,
  112. y + dInsets.top, iw - sInsets.right, 0, iw,
  113. sInsets.top, null);
  114. // right
  115. drawChunk(image, g, stretch, x + w - dInsets.right,
  116. y + dInsets.top, x + w, y + h - dInsets.bottom,
  117. iw - sInsets.right, sInsets.top, iw,
  118. ih - sInsets.bottom, false);
  119. // bottom right
  120. g.drawImage(image, x + w - dInsets.right,
  121. y + h - dInsets.bottom, x + w, y + h,
  122. iw - sInsets.right, ih - sInsets.bottom, iw, ih,
  123. null);
  124. // bottom
  125. drawChunk(image, g, stretch, x + dInsets.left,
  126. y + h - dInsets.bottom, x + w - dInsets.right,
  127. y + h, sInsets.left, ih - sInsets.bottom,
  128. iw - sInsets.right, ih, true);
  129. // bottom left
  130. g.drawImage(image, x, y + h - dInsets.bottom, x + dInsets.left,
  131. y + h, 0, ih - sInsets.bottom, sInsets.left, ih,
  132. null);
  133. // left
  134. drawChunk(image, g, stretch, x, y + dInsets.top,
  135. x + dInsets.left, y + h - dInsets.bottom,
  136. 0, sInsets.top, sInsets.left, ih - sInsets.bottom,
  137. false);
  138. // center
  139. if (getPaintsCenter()) {
  140. g.drawImage(image, x + dInsets.left, y + dInsets.top,
  141. x + w - dInsets.right, y + h - dInsets.bottom,
  142. sInsets.left, sInsets.top, iw - sInsets.right,
  143. ih - sInsets.bottom, null);
  144. }
  145. }
  146. if (renderingHint != null) {
  147. ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_INTERPOLATION,
  148. lastHint);
  149. }
  150. }
  151. private void drawChunk(Image image, Graphics g, boolean stretch,
  152. int dx1, int dy1, int dx2, int dy2, int sx1,
  153. int sy1, int sx2, int sy2,
  154. boolean xDirection) {
  155. if (stretch) {
  156. g.drawImage(image, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null);
  157. }
  158. else {
  159. int xSize = sx2 - sx1;
  160. int ySize = sy2 - sy1;
  161. int deltaX;
  162. int deltaY;
  163. if (xDirection) {
  164. deltaX = xSize;
  165. deltaY = 0;
  166. }
  167. else {
  168. deltaX = 0;
  169. deltaY = ySize;
  170. }
  171. while (dx1 < dx2 && dy1 < dy2) {
  172. int newDX2 = Math.min(dx2, dx1 + xSize);
  173. int newDY2 = Math.min(dy2, dy1 + ySize);
  174. g.drawImage(image, dx1, dy1, newDX2, newDY2,
  175. sx1, sy1, sx1 + newDX2 - dx1,
  176. sy1 + newDY2 - dy1, null);
  177. dx1 += deltaX;
  178. dy1 += deltaY;
  179. }
  180. }
  181. }
  182. // SynthPainter
  183. public void paintArrowButtonBackground(SynthContext context,
  184. Graphics g, int x, int y,
  185. int w, int h) {
  186. paint(g, x, y, w, h);
  187. }
  188. public void paintArrowButtonBorder(SynthContext context,
  189. Graphics g, int x, int y,
  190. int w, int h) {
  191. paint(g, x, y, w, h);
  192. }
  193. public void paintArrowButtonForeground(SynthContext context,
  194. Graphics g, int x, int y,
  195. int w, int h,
  196. int direction) {
  197. paint(g, x, y, w, h);
  198. }
  199. // BUTTON
  200. public void paintButtonBackground(SynthContext context,
  201. Graphics g, int x, int y,
  202. int w, int h) {
  203. paint(g, x, y, w, h);
  204. }
  205. public void paintButtonBorder(SynthContext context,
  206. Graphics g, int x, int y,
  207. int w, int h) {
  208. paint(g, x, y, w, h);
  209. }
  210. // CHECK_BOX_MENU_ITEM
  211. public void paintCheckBoxMenuItemBackground(SynthContext context,
  212. Graphics g, int x, int y,
  213. int w, int h) {
  214. paint(g, x, y, w, h);
  215. }
  216. public void paintCheckBoxMenuItemBorder(SynthContext context,
  217. Graphics g, int x, int y,
  218. int w, int h) {
  219. paint(g, x, y, w, h);
  220. }
  221. // CHECK_BOX
  222. public void paintCheckBoxBackground(SynthContext context,
  223. Graphics g, int x, int y,
  224. int w, int h) {
  225. paint(g, x, y, w, h);
  226. }
  227. public void paintCheckBoxBorder(SynthContext context,
  228. Graphics g, int x, int y,
  229. int w, int h) {
  230. paint(g, x, y, w, h);
  231. }
  232. // COLOR_CHOOSER
  233. public void paintColorChooserBackground(SynthContext context,
  234. Graphics g, int x, int y,
  235. int w, int h) {
  236. paint(g, x, y, w, h);
  237. }
  238. public void paintColorChooserBorder(SynthContext context,
  239. Graphics g, int x, int y,
  240. int w, int h) {
  241. paint(g, x, y, w, h);
  242. }
  243. // COMBO_BOX
  244. public void paintComboBoxBackground(SynthContext context,
  245. Graphics g, int x, int y,
  246. int w, int h) {
  247. paint(g, x, y, w, h);
  248. }
  249. public void paintComboBoxBorder(SynthContext context,
  250. Graphics g, int x, int y,
  251. int w, int h) {
  252. paint(g, x, y, w, h);
  253. }
  254. // DESKTOP_ICON
  255. public void paintDesktopIconBackground(SynthContext context,
  256. Graphics g, int x, int y,
  257. int w, int h) {
  258. paint(g, x, y, w, h);
  259. }
  260. public void paintDesktopIconBorder(SynthContext context,
  261. Graphics g, int x, int y,
  262. int w, int h) {
  263. paint(g, x, y, w, h);
  264. }
  265. // DESKTOP_PANE
  266. public void paintDesktopPaneBackground(SynthContext context,
  267. Graphics g, int x, int y,
  268. int w, int h) {
  269. paint(g, x, y, w, h);
  270. }
  271. public void paintDesktopPaneBorder(SynthContext context,
  272. Graphics g, int x, int y,
  273. int w, int h) {
  274. paint(g, x, y, w, h);
  275. }
  276. // EDITOR_PANE
  277. public void paintEditorPaneBackground(SynthContext context,
  278. Graphics g, int x, int y,
  279. int w, int h) {
  280. paint(g, x, y, w, h);
  281. }
  282. public void paintEditorPaneBorder(SynthContext context,
  283. Graphics g, int x, int y,
  284. int w, int h) {
  285. paint(g, x, y, w, h);
  286. }
  287. // FILE_CHOOSER
  288. public void paintFileChooserBackground(SynthContext context,
  289. Graphics g, int x, int y,
  290. int w, int h) {
  291. paint(g, x, y, w, h);
  292. }
  293. public void paintFileChooserBorder(SynthContext context,
  294. Graphics g, int x, int y,
  295. int w, int h) {
  296. paint(g, x, y, w, h);
  297. }
  298. // FORMATTED_TEXT_FIELD
  299. public void paintFormattedTextFieldBackground(SynthContext context,
  300. Graphics g, int x, int y,
  301. int w, int h) {
  302. paint(g, x, y, w, h);
  303. }
  304. public void paintFormattedTextFieldBorder(SynthContext context,
  305. Graphics g, int x, int y,
  306. int w, int h) {
  307. paint(g, x, y, w, h);
  308. }
  309. // INTERNAL_FRAME_TITLE_PANE
  310. public void paintInternalFrameTitlePaneBackground(SynthContext context,
  311. Graphics g, int x, int y,
  312. int w, int h) {
  313. paint(g, x, y, w, h);
  314. }
  315. public void paintInternalFrameTitlePaneBorder(SynthContext context,
  316. Graphics g, int x, int y,
  317. int w, int h) {
  318. paint(g, x, y, w, h);
  319. }
  320. // INTERNAL_FRAME
  321. public void paintInternalFrameBackground(SynthContext context,
  322. Graphics g, int x, int y,
  323. int w, int h) {
  324. paint(g, x, y, w, h);
  325. }
  326. public void paintInternalFrameBorder(SynthContext context,
  327. Graphics g, int x, int y,
  328. int w, int h) {
  329. paint(g, x, y, w, h);
  330. }
  331. // LABEL
  332. public void paintLabelBackground(SynthContext context,
  333. Graphics g, int x, int y,
  334. int w, int h) {
  335. paint(g, x, y, w, h);
  336. }
  337. public void paintLabelBorder(SynthContext context,
  338. Graphics g, int x, int y,
  339. int w, int h) {
  340. paint(g, x, y, w, h);
  341. }
  342. // LIST
  343. public void paintListBackground(SynthContext context,
  344. Graphics g, int x, int y,
  345. int w, int h) {
  346. paint(g, x, y, w, h);
  347. }
  348. public void paintListBorder(SynthContext context,
  349. Graphics g, int x, int y,
  350. int w, int h) {
  351. paint(g, x, y, w, h);
  352. }
  353. // MENU_BAR
  354. public void paintMenuBarBackground(SynthContext context,
  355. Graphics g, int x, int y,
  356. int w, int h) {
  357. paint(g, x, y, w, h);
  358. }
  359. public void paintMenuBarBorder(SynthContext context,
  360. Graphics g, int x, int y,
  361. int w, int h) {
  362. paint(g, x, y, w, h);
  363. }
  364. // MENU_ITEM
  365. public void paintMenuItemBackground(SynthContext context,
  366. Graphics g, int x, int y,
  367. int w, int h) {
  368. paint(g, x, y, w, h);
  369. }
  370. public void paintMenuItemBorder(SynthContext context,
  371. Graphics g, int x, int y,
  372. int w, int h) {
  373. paint(g, x, y, w, h);
  374. }
  375. // MENU
  376. public void paintMenuBackground(SynthContext context,
  377. Graphics g, int x, int y,
  378. int w, int h) {
  379. paint(g, x, y, w, h);
  380. }
  381. public void paintMenuBorder(SynthContext context,
  382. Graphics g, int x, int y,
  383. int w, int h) {
  384. paint(g, x, y, w, h);
  385. }
  386. // OPTION_PANE
  387. public void paintOptionPaneBackground(SynthContext context,
  388. Graphics g, int x, int y,
  389. int w, int h) {
  390. paint(g, x, y, w, h);
  391. }
  392. public void paintOptionPaneBorder(SynthContext context,
  393. Graphics g, int x, int y,
  394. int w, int h) {
  395. paint(g, x, y, w, h);
  396. }
  397. // PANEL
  398. public void paintPanelBackground(SynthContext context,
  399. Graphics g, int x, int y,
  400. int w, int h) {
  401. paint(g, x, y, w, h);
  402. }
  403. public void paintPanelBorder(SynthContext context,
  404. Graphics g, int x, int y,
  405. int w, int h) {
  406. paint(g, x, y, w, h);
  407. }
  408. // PANEL
  409. public void paintPasswordFieldBackground(SynthContext context,
  410. Graphics g, int x, int y,
  411. int w, int h) {
  412. paint(g, x, y, w, h);
  413. }
  414. public void paintPasswordFieldBorder(SynthContext context,
  415. Graphics g, int x, int y,
  416. int w, int h) {
  417. paint(g, x, y, w, h);
  418. }
  419. // POPUP_MENU
  420. public void paintPopupMenuBackground(SynthContext context,
  421. Graphics g, int x, int y,
  422. int w, int h) {
  423. paint(g, x, y, w, h);
  424. }
  425. public void paintPopupMenuBorder(SynthContext context,
  426. Graphics g, int x, int y,
  427. int w, int h) {
  428. paint(g, x, y, w, h);
  429. }
  430. // PROGRESS_BAR
  431. public void paintProgressBarBackground(SynthContext context,
  432. Graphics g, int x, int y,
  433. int w, int h) {
  434. paint(g, x, y, w, h);
  435. }
  436. public void paintProgressBarBorder(SynthContext context,
  437. Graphics g, int x, int y,
  438. int w, int h) {
  439. paint(g, x, y, w, h);
  440. }
  441. public void paintProgressBarForeground(SynthContext context,
  442. Graphics g, int x, int y,
  443. int w, int h, int orientation) {
  444. paint(g, x, y, w, h);
  445. }
  446. // RADIO_BUTTON_MENU_ITEM
  447. public void paintRadioButtonMenuItemBackground(SynthContext context,
  448. Graphics g, int x, int y,
  449. int w, int h) {
  450. paint(g, x, y, w, h);
  451. }
  452. public void paintRadioButtonMenuItemBorder(SynthContext context,
  453. Graphics g, int x, int y,
  454. int w, int h) {
  455. paint(g, x, y, w, h);
  456. }
  457. // RADIO_BUTTON
  458. public void paintRadioButtonBackground(SynthContext context,
  459. Graphics g, int x, int y,
  460. int w, int h) {
  461. paint(g, x, y, w, h);
  462. }
  463. public void paintRadioButtonBorder(SynthContext context,
  464. Graphics g, int x, int y,
  465. int w, int h) {
  466. paint(g, x, y, w, h);
  467. }
  468. // ROOT_PANE
  469. public void paintRootPaneBackground(SynthContext context,
  470. Graphics g, int x, int y,
  471. int w, int h) {
  472. paint(g, x, y, w, h);
  473. }
  474. public void paintRootPaneBorder(SynthContext context,
  475. Graphics g, int x, int y,
  476. int w, int h) {
  477. paint(g, x, y, w, h);
  478. }
  479. // SCROLL_BAR
  480. public void paintScrollBarBackground(SynthContext context,
  481. Graphics g, int x, int y,
  482. int w, int h) {
  483. paint(g, x, y, w, h);
  484. }
  485. public void paintScrollBarBorder(SynthContext context,
  486. Graphics g, int x, int y,
  487. int w, int h) {
  488. paint(g, x, y, w, h);
  489. }
  490. // SCROLL_BAR_THUMB
  491. public void paintScrollBarThumbBackground(SynthContext context,
  492. Graphics g, int x, int y,
  493. int w, int h, int orientation) {
  494. paint(g, x, y, w, h);
  495. }
  496. public void paintScrollBarThumbBorder(SynthContext context,
  497. Graphics g, int x, int y,
  498. int w, int h, int orientation) {
  499. paint(g, x, y, w, h);
  500. }
  501. // SCROLL_BAR_TRACK
  502. public void paintScrollBarTrackBackground(SynthContext context,
  503. Graphics g, int x, int y,
  504. int w, int h) {
  505. paint(g, x, y, w, h);
  506. }
  507. public void paintScrollBarTrackBorder(SynthContext context,
  508. Graphics g, int x, int y,
  509. int w, int h) {
  510. paint(g, x, y, w, h);
  511. }
  512. // SCROLL_PANE
  513. public void paintScrollPaneBackground(SynthContext context,
  514. Graphics g, int x, int y,
  515. int w, int h) {
  516. paint(g, x, y, w, h);
  517. }
  518. public void paintScrollPaneBorder(SynthContext context,
  519. Graphics g, int x, int y,
  520. int w, int h) {
  521. paint(g, x, y, w, h);
  522. }
  523. // SEPARATOR
  524. public void paintSeparatorBackground(SynthContext context,
  525. Graphics g, int x, int y,
  526. int w, int h) {
  527. paint(g, x, y, w, h);
  528. }
  529. public void paintSeparatorBorder(SynthContext context,
  530. Graphics g, int x, int y,
  531. int w, int h) {
  532. paint(g, x, y, w, h);
  533. }
  534. public void paintSeparatorForeground(SynthContext context,
  535. Graphics g, int x, int y,
  536. int w, int h, int orientation) {
  537. paint(g, x, y, w, h);
  538. }
  539. // SLIDER
  540. public void paintSliderBackground(SynthContext context,
  541. Graphics g, int x, int y,
  542. int w, int h) {
  543. paint(g, x, y, w, h);
  544. }
  545. public void paintSliderBorder(SynthContext context,
  546. Graphics g, int x, int y,
  547. int w, int h) {
  548. paint(g, x, y, w, h);
  549. }
  550. // SLIDER_THUMB
  551. public void paintSliderThumbBackground(SynthContext context,
  552. Graphics g, int x, int y,
  553. int w, int h, int orientation) {
  554. paint(g, x, y, w, h);
  555. }
  556. public void paintSliderThumbBorder(SynthContext context,
  557. Graphics g, int x, int y,
  558. int w, int h, int orientation) {
  559. paint(g, x, y, w, h);
  560. }
  561. // SLIDER_TRACK
  562. public void paintSliderTrackBackground(SynthContext context,
  563. Graphics g, int x, int y,
  564. int w, int h) {
  565. paint(g, x, y, w, h);
  566. }
  567. public void paintSliderTrackBorder(SynthContext context,
  568. Graphics g, int x, int y,
  569. int w, int h) {
  570. paint(g, x, y, w, h);
  571. }
  572. // SPINNER
  573. public void paintSpinnerBackground(SynthContext context,
  574. Graphics g, int x, int y,
  575. int w, int h) {
  576. paint(g, x, y, w, h);
  577. }
  578. public void paintSpinnerBorder(SynthContext context,
  579. Graphics g, int x, int y,
  580. int w, int h) {
  581. paint(g, x, y, w, h);
  582. }
  583. // SPLIT_PANE_DIVIDER
  584. public void paintSplitPaneDividerBackground(SynthContext context,
  585. Graphics g, int x, int y,
  586. int w, int h) {
  587. paint(g, x, y, w, h);
  588. }
  589. public void paintSplitPaneDividerForeground(SynthContext context,
  590. Graphics g, int x, int y,
  591. int w, int h, int orientation) {
  592. paint(g, x, y, w, h);
  593. }
  594. public void paintSplitPaneDragDivider(SynthContext context,
  595. Graphics g, int x, int y,
  596. int w, int h, int orientation) {
  597. paint(g, x, y, w, h);
  598. }
  599. // SPLIT_PANE
  600. public void paintSplitPaneBackground(SynthContext context,
  601. Graphics g, int x, int y,
  602. int w, int h) {
  603. paint(g, x, y, w, h);
  604. }
  605. public void paintSplitPaneBorder(SynthContext context,
  606. Graphics g, int x, int y,
  607. int w, int h) {
  608. paint(g, x, y, w, h);
  609. }
  610. // TABBED_PANE
  611. public void paintTabbedPaneBackground(SynthContext context,
  612. Graphics g, int x, int y,
  613. int w, int h) {
  614. paint(g, x, y, w, h);
  615. }
  616. public void paintTabbedPaneBorder(SynthContext context,
  617. Graphics g, int x, int y,
  618. int w, int h) {
  619. paint(g, x, y, w, h);
  620. }
  621. // TABBED_PANE_TAB_AREA
  622. public void paintTabbedPaneTabAreaBackground(SynthContext context,
  623. Graphics g, int x, int y,
  624. int w, int h) {
  625. paint(g, x, y, w, h);
  626. }
  627. public void paintTabbedPaneTabAreaBorder(SynthContext context,
  628. Graphics g, int x, int y,
  629. int w, int h) {
  630. paint(g, x, y, w, h);
  631. }
  632. // TABBED_PANE_TAB
  633. public void paintTabbedPaneTabBackground(SynthContext context, Graphics g,
  634. int x, int y, int w, int h,
  635. int tabIndex) {
  636. paint(g, x, y, w, h);
  637. }
  638. public void paintTabbedPaneTabBorder(SynthContext context, Graphics g,
  639. int x, int y, int w, int h,
  640. int tabIndex) {
  641. paint(g, x, y, w, h);
  642. }
  643. // TABBED_PANE_CONTENT
  644. public void paintTabbedPaneContentBackground(SynthContext context,
  645. Graphics g, int x, int y, int w,
  646. int h) {
  647. paint(g, x, y, w, h);
  648. }
  649. public void paintTabbedPaneContentBorder(SynthContext context, Graphics g,
  650. int x, int y, int w, int h) {
  651. paint(g, x, y, w, h);
  652. }
  653. // TABLE_HEADER
  654. public void paintTableHeaderBackground(SynthContext context,
  655. Graphics g, int x, int y,
  656. int w, int h) {
  657. paint(g, x, y, w, h);
  658. }
  659. public void paintTableHeaderBorder(SynthContext context,
  660. Graphics g, int x, int y,
  661. int w, int h) {
  662. paint(g, x, y, w, h);
  663. }
  664. // TABLE
  665. public void paintTableBackground(SynthContext context,
  666. Graphics g, int x, int y,
  667. int w, int h) {
  668. paint(g, x, y, w, h);
  669. }
  670. public void paintTableBorder(SynthContext context,
  671. Graphics g, int x, int y,
  672. int w, int h) {
  673. paint(g, x, y, w, h);
  674. }
  675. // TEXT_AREA
  676. public void paintTextAreaBackground(SynthContext context,
  677. Graphics g, int x, int y,
  678. int w, int h) {
  679. paint(g, x, y, w, h);
  680. }
  681. public void paintTextAreaBorder(SynthContext context,
  682. Graphics g, int x, int y,
  683. int w, int h) {
  684. paint(g, x, y, w, h);
  685. }
  686. // TEXT_PANE
  687. public void paintTextPaneBackground(SynthContext context,
  688. Graphics g, int x, int y,
  689. int w, int h) {
  690. paint(g, x, y, w, h);
  691. }
  692. public void paintTextPaneBorder(SynthContext context,
  693. Graphics g, int x, int y,
  694. int w, int h) {
  695. paint(g, x, y, w, h);
  696. }
  697. // TEXT_FIELD
  698. public void paintTextFieldBackground(SynthContext context,
  699. Graphics g, int x, int y,
  700. int w, int h) {
  701. paint(g, x, y, w, h);
  702. }
  703. public void paintTextFieldBorder(SynthContext context,
  704. Graphics g, int x, int y,
  705. int w, int h) {
  706. paint(g, x, y, w, h);
  707. }
  708. // TOGGLE_BUTTON
  709. public void paintToggleButtonBackground(SynthContext context,
  710. Graphics g, int x, int y,
  711. int w, int h) {
  712. paint(g, x, y, w, h);
  713. }
  714. public void paintToggleButtonBorder(SynthContext context,
  715. Graphics g, int x, int y,
  716. int w, int h) {
  717. paint(g, x, y, w, h);
  718. }
  719. // TOOL_BAR
  720. public void paintToolBarBackground(SynthContext context,
  721. Graphics g, int x, int y,
  722. int w, int h) {
  723. paint(g, x, y, w, h);
  724. }
  725. public void paintToolBarBorder(SynthContext context,
  726. Graphics g, int x, int y,
  727. int w, int h) {
  728. paint(g, x, y, w, h);
  729. }
  730. // TOOL_BAR_CONTENT
  731. public void paintToolBarContentBackground(SynthContext context,
  732. Graphics g, int x, int y,
  733. int w, int h) {
  734. paint(g, x, y, w, h);
  735. }
  736. public void paintToolBarContentBorder(SynthContext context,
  737. Graphics g, int x, int y,
  738. int w, int h) {
  739. paint(g, x, y, w, h);
  740. }
  741. // TOOL_DRAG_WINDOW
  742. public void paintToolBarDragWindowBackground(SynthContext context,
  743. Graphics g, int x, int y,
  744. int w, int h) {
  745. paint(g, x, y, w, h);
  746. }
  747. public void paintToolBarDragWindowBorder(SynthContext context,
  748. Graphics g, int x, int y,
  749. int w, int h) {
  750. paint(g, x, y, w, h);
  751. }
  752. // TOOL_TIP
  753. public void paintToolTipBackground(SynthContext context,
  754. Graphics g, int x, int y,
  755. int w, int h) {
  756. paint(g, x, y, w, h);
  757. }
  758. public void paintToolTipBorder(SynthContext context,
  759. Graphics g, int x, int y,
  760. int w, int h) {
  761. paint(g, x, y, w, h);
  762. }
  763. // TREE
  764. public void paintTreeBackground(SynthContext context,
  765. Graphics g, int x, int y,
  766. int w, int h) {
  767. paint(g, x, y, w, h);
  768. }
  769. public void paintTreeBorder(SynthContext context,
  770. Graphics g, int x, int y,
  771. int w, int h) {
  772. paint(g, x, y, w, h);
  773. }
  774. // TREE_CELL
  775. public void paintTreeCellBackground(SynthContext context,
  776. Graphics g, int x, int y,
  777. int w, int h) {
  778. paint(g, x, y, w, h);
  779. }
  780. public void paintTreeCellBorder(SynthContext context,
  781. Graphics g, int x, int y,
  782. int w, int h) {
  783. paint(g, x, y, w, h);
  784. }
  785. public void paintTreeCellFocus(SynthContext context,
  786. Graphics g, int x, int y,
  787. int w, int h) {
  788. paint(g, x, y, w, h);
  789. }
  790. // VIEWPORT
  791. public void paintViewportBackground(SynthContext context,
  792. Graphics g, int x, int y,
  793. int w, int h) {
  794. paint(g, x, y, w, h);
  795. }
  796. public void paintViewportBorder(SynthContext context,
  797. Graphics g, int x, int y,
  798. int w, int h) {
  799. paint(g, x, y, w, h);
  800. }
  801. }