javax.swing.plaf.basic.BasicBorders Java Examples

The following examples show how to use javax.swing.plaf.basic.BasicBorders. 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 hottub 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 openjdk-jdk8u-backup 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 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 #4
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 #5
Source File: ContrastMetalTheme.java    From dragonwell8_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 #6
Source File: ContrastMetalTheme.java    From openjdk-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 #7
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 #8
Source File: ContrastMetalTheme.java    From openjdk-jdk8u 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 #9
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 #10
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 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 #11
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 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 #12
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 #13
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 JButton
 * @since 1.3
 */
public static Border getButtonBorder() {
    if (buttonBorder == null) {
        buttonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return buttonBorder;
}
 
Example #14
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 JToggleButton}.
 *
 * @return a border instance for a {@code 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 openjdk-8-source 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 #16
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 #17
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 #18
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 JToggleButton
 * @since 1.3
 */
public static Border getToggleButtonBorder() {
    if (toggleButtonBorder == null) {
        toggleButtonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ToggleButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return toggleButtonBorder;
}
 
Example #19
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 #20
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 JButton
 * @since 1.3
 */
public static Border getButtonBorder() {
    if (buttonBorder == null) {
        buttonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return buttonBorder;
}
 
Example #21
Source File: MetalBorders.java    From Java8CN with Apache License 2.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 #22
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 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 #23
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 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 #24
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 JButton}.
 *
 * @return a border instance for a {@code JButton}
 * @since 1.3
 */
public static Border getButtonBorder() {
    if (buttonBorder == null) {
        buttonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return buttonBorder;
}
 
Example #25
Source File: MetalBorders.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a border instance for a {@code JToggleButton}.
 *
 * @return a border instance for a {@code JToggleButton}
 * @since 1.3
 */
public static Border getToggleButtonBorder() {
    if (toggleButtonBorder == null) {
        toggleButtonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ToggleButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return toggleButtonBorder;
}
 
Example #26
Source File: MetalBorders.java    From Bytecoder with Apache License 2.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 #27
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 #28
Source File: MetalBorders.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a border instance for a {@code JButton}.
 *
 * @return a border instance for a {@code JButton}
 * @since 1.3
 */
public static Border getButtonBorder() {
    if (buttonBorder == null) {
        buttonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return buttonBorder;
}
 
Example #29
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 JToggleButton
 * @since 1.3
 */
public static Border getToggleButtonBorder() {
    if (toggleButtonBorder == null) {
        toggleButtonBorder = new BorderUIResource.CompoundBorderUIResource(
                                               new MetalBorders.ToggleButtonBorder(),
                                               new BasicBorders.MarginBorder());
    }
    return toggleButtonBorder;
}
 
Example #30
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;
}