use of javax.swing.border.LineBorder in project jdk8u_jdk by JetBrains.
the class ContrastMetalTheme method addCustomEntriesToTable.
@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);
}
use of javax.swing.border.LineBorder in project JMRI by JMRI.
the class PositionablePopupUtil method setBorderSize.
public void setBorderSize(int border) {
borderSize = border;
if (borderColor != null) {
outlineBorder = new LineBorder(borderColor, borderSize);
_parent.setBorder(new CompoundBorder(outlineBorder, borderMargin));
//setHorizontalAlignment(CENTRE);
}
_parent.updateSize();
}
use of javax.swing.border.LineBorder in project JMRI by JMRI.
the class PositionablePopupUtil method setMargin.
public void setMargin(int m) {
margin = m;
if (_parent.isOpaque()) {
borderMargin = new LineBorder(getBackground(), m);
} else {
borderMargin = BorderFactory.createEmptyBorder(m, m, m, m);
}
if (_showBorder) {
_parent.setBorder(new CompoundBorder(outlineBorder, borderMargin));
}
_parent.updateSize();
}
use of javax.swing.border.LineBorder in project JMRI by JMRI.
the class PositionablePopupUtil method setBorder.
public void setBorder(boolean set) {
_showBorder = set;
if (set) {
if (borderColor != null && _showBorder) {
outlineBorder = new LineBorder(borderColor, borderSize);
_parent.setBorder(new CompoundBorder(outlineBorder, borderMargin));
}
} else {
_parent.setBorder(null);
}
}
use of javax.swing.border.LineBorder in project JMRI by JMRI.
the class PositionablePopupUtil method setBorderColor.
public void setBorderColor(Color border) {
borderColor = border;
if (borderColor != null && _showBorder) {
outlineBorder = new LineBorder(borderColor, borderSize);
_parent.setBorder(new CompoundBorder(outlineBorder, borderMargin));
}
}
Aggregations