/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* An implementation of <code>LayoutStyle</code> that returns 6 for related
* components, otherwise 12. This class also provides helper methods for
* subclasses.
*
*/
new DefaultLayoutStyle();
return INSTANCE;
}
throw new NullPointerException();
}
if (indent > 0) {
return indent;
}
}
}
throw new NullPointerException();
}
return 6;
}
/**
* Returns true if the classes identify a JLabel and a non-JLabel
* along the horizontal axis.
*/
int position) {
}
return false;
}
/**
* For some look and feels check boxs and radio buttons typically
* don't paint the border, yet they have padding for a border. Look
* and feel guidelines generally don't include this space. Use
* this method to subtract this space from the specified
* components.
*
* @param source First component
* @param target Second component
* @param position Position doing layout along.
*/
if (offset > 0) {
}
if (offset < 0) {
return 0;
}
return offset;
}
/**
* For some look and feels check boxs and radio buttons typically
* don't paint the border, yet they have padding for a border. Look
* and feel guidelines generally don't include this space. Use
* this method to subtract this space from the specified
* components.
*
* @param source Component
* @param position Position doing layout along.
*/
}
/**
* If <code>c</code> is a check box or radio button, and the border is
* not painted this returns the inset along the specified axis.
*/
!((AbstractButton)c).isBorderPainted()) {
if (border instanceof UIResource) {
}
}
return 0;
}
throw new IllegalArgumentException();
}
}
switch(position) {
case SwingConstants.NORTH:
return SwingConstants.SOUTH;
case SwingConstants.SOUTH:
return SwingConstants.NORTH;
case SwingConstants.EAST:
return SwingConstants.WEST;
case SwingConstants.WEST:
return SwingConstants.EAST;
}
assert false;
return 0;
}
/**
* Returns the amount to indent the specified component if it's
* a JCheckBox or JRadioButton. If the component is not a JCheckBox or
* JRadioButton, 0 will be returned.
*/
}
}
return 0;
}
return icon;
}
key = "CheckBox.icon";
} else if (button instanceof JRadioButton) {
key = "RadioButton.icon";
}
}
}
return null;
}
}
return false;
}
}
return false;
}
}
return 0;
}
switch(position) {
case SwingConstants.NORTH:
case SwingConstants.SOUTH:
case SwingConstants.EAST:
case SwingConstants.WEST:
}
assert false;
return 0;
}
}