1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.jelly.tags.swing.impl;
17
18 import java.awt.Component;
19 import java.awt.GridBagConstraints;
20
21 /***
22 * A simple class to represent the information for a single cell in a table
23 * when using the GridBagLayout
24 *
25 * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
26 * @version $Revision: 155420 $
27 */
28 public class Cell {
29 private GridBagConstraints constraints;
30 private Component component;
31
32 public Cell() {
33 }
34
35 public Cell(GridBagConstraints constraints, Component component) {
36 this.constraints = constraints;
37 this.component = component;
38 }
39
40 /***
41 * Returns the component.
42 * @return Component
43 */
44 public Component getComponent() {
45 return component;
46 }
47
48 /***
49 * Returns the constraints.
50 * @return GridBagConstraints
51 */
52 public GridBagConstraints getConstraints() {
53 return constraints;
54 }
55
56 /***
57 * Sets the component.
58 * @param component The component to set
59 */
60 public void setComponent(Component component) {
61 this.component = component;
62 }
63
64 /***
65 * Sets the constraints.
66 * @param constraints The constraints to set
67 */
68 public void setConstraints(GridBagConstraints constraints) {
69 this.constraints = constraints;
70 }
71
72 }