Java Code Examples for javax.swing.plaf.basic.BasicBorders#MarginBorder

The following examples show how to use javax.swing.plaf.basic.BasicBorders#MarginBorder . 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: ContrastMetalTheme.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {

    Border blackLineBorder =
            new BorderUIResource(new LineBorder(getBlack()));
    Border whiteLineBorder =
            new BorderUIResource(new LineBorder(getWhite()));

    Object textBorder = new BorderUIResource(new CompoundBorder(
            blackLineBorder,
            new BasicBorders.MarginBorder()));

    table.put("ToolTip.border", blackLineBorder);
    table.put("TitledBorder.border", blackLineBorder);
    table.put("Table.focusCellHighlightBorder", whiteLineBorder);
    table.put("Table.focusCellForeground", getWhite());

    table.put("TextField.border", textBorder);
    table.put("PasswordField.border", textBorder);
    table.put("TextArea.border", textBorder);
    table.put("TextPane.font", textBorder);


}
 
Example 2
Source File: ContrastMetalTheme.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {

    Border blackLineBorder =
            new BorderUIResource(new LineBorder(getBlack()));
    Border whiteLineBorder =
            new BorderUIResource(new LineBorder(getWhite()));

    Object textBorder = new BorderUIResource(new CompoundBorder(
            blackLineBorder,
            new BasicBorders.MarginBorder()));

    table.put("ToolTip.border", blackLineBorder);
    table.put("TitledBorder.border", blackLineBorder);
    table.put("Table.focusCellHighlightBorder", whiteLineBorder);
    table.put("Table.focusCellForeground", getWhite());

    table.put("TextField.border", textBorder);
    table.put("PasswordField.border", textBorder);
    table.put("TextArea.border", textBorder);
    table.put("TextPane.font", textBorder);


}
 
Example 3
Source File: ContrastMetalTheme.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void addCustomEntriesToTable(UIDefaults table) {

    Border blackLineBorder =
            new BorderUIResource(new LineBorder(getBlack()));
    Border whiteLineBorder =
            new BorderUIResource(new LineBorder(getWhite()));

    Object textBorder = new BorderUIResource(new CompoundBorder(
            blackLineBorder,
            new BasicBorders.MarginBorder()));

    table.put("ToolTip.border", blackLineBorder);
    table.put("TitledBorder.border", blackLineBorder);
    table.put("Table.focusCellHighlightBorder", whiteLineBorder);
    table.put("Table.focusCellForeground", getWhite());

    table.put("TextField.border", textBorder);
    table.put("PasswordField.border", textBorder);
    table.put("TextArea.border", textBorder);
    table.put("TextPane.font", textBorder);


}
 
Example 4
Source File: MetalBorders.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JTextField
 * @since 1.3
 */
public static Border getTextFieldBorder() {
    if (textFieldBorder == null) {
        textFieldBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.TextFieldBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textFieldBorder;
}
 
Example 5
Source File: MetalBorders.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a {@code JTextField}.
 *
 * @return a border instance for a {@code JTextField}
 * @since 1.3
 */
public static Border getTextFieldBorder() {
    if (textFieldBorder == null) {
        textFieldBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.TextFieldBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textFieldBorder;
}
 
Example 6
Source File: MetalBorders.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JTextField
 * @since 1.3
 */
public static Border getTextFieldBorder() {
    if (textFieldBorder == null) {
        textFieldBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.TextFieldBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textFieldBorder;
}
 
Example 7
Source File: MetalBorders.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JButton
 * @since 1.3
 */
public static Border getButtonBorder() {
    if (buttonBorder == null) {
        buttonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return buttonBorder;
}
 
Example 8
Source File: MetalBorders.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JToggleButton
 * @since 1.3
 */
public static Border getToggleButtonBorder() {
    if (toggleButtonBorder == null) {
        toggleButtonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ToggleButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return toggleButtonBorder;
}
 
Example 9
Source File: MetalBorders.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JTextField
 * @since 1.3
 */
public static Border getTextFieldBorder() {
    if (textFieldBorder == null) {
        textFieldBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.TextFieldBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textFieldBorder;
}
 
Example 10
Source File: MetalBorders.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JToggleButton
 * @since 1.3
 */
public static Border getToggleButtonBorder() {
    if (toggleButtonBorder == null) {
        toggleButtonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ToggleButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return toggleButtonBorder;
}
 
Example 11
Source File: MetalBorders.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JButton
 * @since 1.3
 */
public static Border getButtonBorder() {
    if (buttonBorder == null) {
        buttonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return buttonBorder;
}
 
Example 12
Source File: MetalBorders.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a border instance for a text component.
 *
 * @return a border instance for a text component
 * @since 1.3
 */
public static Border getTextBorder() {
    if (textBorder == null) {
        textBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.Flush3DBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textBorder;
}
 
Example 13
Source File: MetalBorders.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a text component
 * @since 1.3
 */
public static Border getTextBorder() {
    if (textBorder == null) {
        textBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.Flush3DBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textBorder;
}
 
Example 14
Source File: MetalBorders.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JToggleButton
 * @since 1.3
 */
public static Border getToggleButtonBorder() {
    if (toggleButtonBorder == null) {
        toggleButtonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ToggleButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return toggleButtonBorder;
}
 
Example 15
Source File: MetalBorders.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JButton
 * @since 1.3
 */
public static Border getButtonBorder() {
    if (buttonBorder == null) {
        buttonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return buttonBorder;
}
 
Example 16
Source File: MetalBorders.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JButton
 * @since 1.3
 */
public static Border getButtonBorder() {
    if (buttonBorder == null) {
        buttonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return buttonBorder;
}
 
Example 17
Source File: MetalBorders.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a border instance for a text component
 * @since 1.3
 */
public static Border getTextBorder() {
    if (textBorder == null) {
        textBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.Flush3DBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textBorder;
}
 
Example 18
Source File: MetalBorders.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a border instance for a JTextField
 * @since 1.3
 */
public static Border getTextFieldBorder() {
    if (textFieldBorder == null) {
        textFieldBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.TextFieldBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textFieldBorder;
}
 
Example 19
Source File: MetalBorders.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Returns a border instance for a JTextField
 * @since 1.3
 */
public static Border getTextFieldBorder() {
    if (textFieldBorder == null) {
        textFieldBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.TextFieldBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textFieldBorder;
}
 
Example 20
Source File: MetalBorders.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a border instance for a text component
 * @since 1.3
 */
public static Border getTextBorder() {
    if (textBorder == null) {
        textBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.Flush3DBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return textBorder;
}