1 30 31 package com.jgoodies.forms.layout; 32 33 import java.awt.Component ; 34 import java.awt.Dimension ; 35 36 43 public final class TestComponent extends Component { 44 45 49 private final Dimension minimumSize; 50 51 55 private final Dimension preferredSize; 56 57 58 60 66 public TestComponent(Dimension minimumSize, Dimension preferredSize) { 67 this.minimumSize = minimumSize; 68 this.preferredSize = preferredSize; 69 } 70 71 80 public TestComponent(int minWidth, int minHeight, int prefWidth, int prefHeight) { 81 this(new Dimension (minWidth, minHeight), 82 new Dimension (prefWidth, prefHeight)); 83 } 84 85 86 88 94 public Dimension getMinimumSize() { 95 return minimumSize; 96 } 97 98 99 105 public Dimension getPreferredSize() { 106 return preferredSize; 107 } 108 109 } 110 | Popular Tags |