jdk/src/share/classes/sun/swing/DefaultLayoutStyle.java
changeset 10104 c3cf1968e244
parent 5506 202f599c92aa
child 23010 6dadb192ad81
equal deleted inserted replaced
10103:18425b919fcd 10104:c3cf1968e244
    46     }
    46     }
    47 
    47 
    48     @Override
    48     @Override
    49     public int getPreferredGap(JComponent component1, JComponent component2,
    49     public int getPreferredGap(JComponent component1, JComponent component2,
    50             ComponentPlacement type, int position, Container parent) {
    50             ComponentPlacement type, int position, Container parent) {
    51 
       
    52         if (component1 == null || component2 == null || type == null) {
    51         if (component1 == null || component2 == null || type == null) {
    53             throw new NullPointerException();
    52             throw new NullPointerException();
    54         }
    53         }
       
    54 
       
    55         checkPosition(position);
       
    56 
    55         if (type == ComponentPlacement.INDENT &&
    57         if (type == ComponentPlacement.INDENT &&
    56                 (position == SwingConstants.EAST ||
    58                 (position == SwingConstants.EAST ||
    57                  position == SwingConstants.WEST)) {
    59                  position == SwingConstants.WEST)) {
    58             int indent = getIndent(component1, position);
    60             int indent = getIndent(component1, position);
    59             if (indent > 0) {
    61             if (indent > 0) {