01: package net.xoetrope.builder.editor.components.swing;
02:
03: import javax.swing.JComponent;
04: import java.awt.FlowLayout;
05: import javax.swing.BorderFactory;
06: import java.awt.Color;
07: import java.awt.Dimension;
08:
09: /**
10: * A stand-in for editing menu items
11: * <p> Copyright (c) Xoetrope Ltd., 2002-2003</p>
12: * <p> $Revision: 1.1 $</p>
13: * <p> License: see License.txt</p>
14: */
15: public class XMenuItemProxy extends JComponent {
16: public XMenuItemProxy() {
17: setLayout(new FlowLayout());
18: setBorder(BorderFactory.createLineBorder(Color.blue));
19: setOpaque(true);
20: }
21:
22: /**
23: * Get the maximum size for this component. As the component is only a stand-in
24: * for a runtime component we limit its size to 20x20
25: * @return
26: */
27: public Dimension getMaximumSize() {
28: return new Dimension(10, 10);
29: }
30: }
|