Java Code Examples for java.awt.Insets#set()

The following examples show how to use java.awt.Insets#set() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TitledBorder.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static Insets getBorderInsets(Border border, Component c, Insets insets) {
    if (border == null) {
        insets.set(0, 0, 0, 0);
    }
    else if (border instanceof AbstractBorder) {
        AbstractBorder ab = (AbstractBorder) border;
        insets = ab.getBorderInsets(c, insets);
    }
    else {
        Insets i = border.getBorderInsets(c);
        insets.set(i.top, i.left, i.bottom, i.right);
    }
    return insets;
}
 
Example 2
Source File: MetalBorders.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets newInsets) {
    newInsets.set(1, 1, 1, 1);
    return newInsets;
}
 
Example 3
Source File: BasicBorders.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets)       {
    insets.set(2, 2, 2, 2);
    return insets;
}
 
Example 4
Source File: MotifBorders.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets) {
    insets.set(6, 6, 6, 6);
    return insets;
}
 
Example 5
Source File: MetalBorders.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets newInsets) {
    newInsets.set(5, 5, 5, 5);
    return newInsets;
}
 
Example 6
Source File: WindowsBorders.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets) {
    insets.set(1,1,1,1);
    return insets;
}
 
Example 7
Source File: BasicBorders.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets)       {
    insets.set(0, 0, 2, 0);
    return insets;
}
 
Example 8
Source File: MotifBorders.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets) {
    int thickness = (c instanceof JButton && ((JButton)c).isDefaultCapable())? 8 : 2;
    insets.set(thickness, thickness, thickness, thickness);
    return insets;
}
 
Example 9
Source File: MetalBorders.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets newInsets) {
    newInsets.set(3, 3, 3, 3);
    return newInsets;
}
 
Example 10
Source File: MetalBorders.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets newInsets) {
    newInsets.set(3, 3, 3, 3);
    return newInsets;
}
 
Example 11
Source File: MetalBorders.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets) {
    insets.set(1, 1, 2, 2);
    return insets;
}
 
Example 12
Source File: MotifBorders.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets) {
    int thickness = (c instanceof JButton && ((JButton)c).isDefaultCapable())? 8 : 2;
    insets.set(thickness, thickness, thickness, thickness);
    return insets;
}
 
Example 13
Source File: MotifBorders.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets) {
    insets.set(2, 2, 3, 3);
    return insets;
}
 
Example 14
Source File: BasicBorders.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets)       {
    insets.set(0, 0, 2, 0);
    return insets;
}
 
Example 15
Source File: MetalBorders.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets newInsets) {
    newInsets.set(5, 5, 5, 5);
    return newInsets;
}
 
Example 16
Source File: BasicBorders.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets)       {
    // leave room for default visual
    insets.set(2, 3, 3, 3);
    return insets;
}
 
Example 17
Source File: BasicBorders.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Insets getBorderInsets(Component c, Insets insets)       {
    // leave room for default visual
    insets.set(2, 3, 3, 3);
    return insets;
}
 
Example 18
Source File: EtchedBorder.java    From jdk8u-dev-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Reinitialize the insets parameter with this Border's current Insets.
 * @param c the component for which this border insets value applies
 * @param insets the object to be reinitialized
 */
public Insets getBorderInsets(Component c, Insets insets) {
    insets.set(2, 2, 2, 2);
    return insets;
}
 
Example 19
Source File: LineBorder.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Reinitialize the insets parameter with this Border's current Insets.
 * @param c the component for which this border insets value applies
 * @param insets the object to be reinitialized
 */
public Insets getBorderInsets(Component c, Insets insets) {
    insets.set(thickness, thickness, thickness, thickness);
    return insets;
}
 
Example 20
Source File: SoftBevelBorder.java    From jdk8u-dev-jdk with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Reinitialize the insets parameter with this Border's current Insets.
 * @param c the component for which this border insets value applies
 * @param insets the object to be reinitialized
 */
public Insets getBorderInsets(Component c, Insets insets)       {
    insets.set(3, 3, 3, 3);
    return insets;
}