本文整理了Java中javax.swing.text.JTextComponent.getBorder()
方法的一些代码示例,展示了JTextComponent.getBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextComponent.getBorder()
方法的具体详情如下:
包路径:javax.swing.text.JTextComponent
类名称:JTextComponent
方法名:getBorder
暂无
代码示例来源:origin: bobbylight/RSyntaxTextArea
Border border = editor.getBorder();
if (border==null) {
editor.setBorder(new BasicBorders.MarginBorder());
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
@Override
public void paintBackground(Graphics g) {
JTextComponent c = getComponent();
if (c.getBorder() instanceof BackdropBorder) {
BackdropBorder bb = (BackdropBorder) c.getBorder();
bb.getBackdropBorder().paintBorder(c, g, 0, 0, c.getWidth(), c.getHeight());
} else {
super.paintBackground(g);
}
}
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
@Override
public void paintBackground(Graphics g) {
JTextComponent c = getComponent();
if (c.getBorder() instanceof BackdropBorder) {
BackdropBorder bb = (BackdropBorder) c.getBorder();
bb.getBackdropBorder().paintBorder(c, g, 0, 0, c.getWidth(), c.getHeight());
} else {
super.paintBackground(g);
}
}
}
代码示例来源:origin: stackoverflow.com
mOrigBorder = component.getBorder();
mBorder = mOrigBorder;
代码示例来源:origin: com.jtattoo/JTattoo
public void focusGained(FocusEvent e) {
if (getComponent() != null) {
orgBorder = getComponent().getBorder();
LookAndFeel laf = UIManager.getLookAndFeel();
if (laf instanceof AbstractLookAndFeel && orgBorder instanceof UIResource) {
Border focusBorder = ((AbstractLookAndFeel)laf).getBorderFactory().getFocusFrameBorder();
getComponent().setBorder(focusBorder);
}
getComponent().invalidate();
getComponent().repaint();
}
}
代码示例来源:origin: com.jtattoo/JTattoo
public void focusGained(FocusEvent e) {
if (getComponent() != null) {
orgBorder = getComponent().getBorder();
LookAndFeel laf = UIManager.getLookAndFeel();
if (laf instanceof AbstractLookAndFeel && orgBorder instanceof UIResource) {
Border focusBorder = ((AbstractLookAndFeel)laf).getBorderFactory().getFocusFrameBorder();
getComponent().setBorder(focusBorder);
}
getComponent().invalidate();
getComponent().repaint();
}
}
代码示例来源:origin: com.jtattoo/JTattoo
public void focusGained(FocusEvent e) {
if (getComponent() != null) {
orgBorder = getComponent().getBorder();
LookAndFeel laf = UIManager.getLookAndFeel();
if (laf instanceof AbstractLookAndFeel && orgBorder instanceof UIResource) {
Border focusBorder = ((AbstractLookAndFeel)laf).getBorderFactory().getFocusFrameBorder();
getComponent().setBorder(focusBorder);
}
getComponent().invalidate();
getComponent().repaint();
}
}
代码示例来源:origin: com.jtattoo/JTattoo
public void focusGained(FocusEvent e) {
if (getComponent() != null) {
orgBorder = getComponent().getBorder();
LookAndFeel laf = UIManager.getLookAndFeel();
if (laf instanceof AbstractLookAndFeel && orgBorder instanceof UIResource) {
Border focusBorder = ((AbstractLookAndFeel)laf).getBorderFactory().getFocusFrameBorder();
getComponent().setBorder(focusBorder);
}
getComponent().invalidate();
getComponent().repaint();
}
}
代码示例来源:origin: com.jtattoo/JTattoo
public void focusGained(FocusEvent e) {
if (getComponent() != null) {
orgBorder = getComponent().getBorder();
LookAndFeel laf = UIManager.getLookAndFeel();
if (laf instanceof AbstractLookAndFeel && orgBorder instanceof UIResource) {
Border focusBorder = ((AbstractLookAndFeel) laf).getBorderFactory().getFocusFrameBorder();
getComponent().setBorder(focusBorder);
}
getComponent().invalidate();
getComponent().repaint();
}
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
protected void paintTodo( Graphics g) {
JTextComponent c = getComponent();
Border bb = c.getBorder();
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
Border b = txt.getBorder();
lbl.setBorder(txt.getBorder());
} else {
Insets insets = b.getBorderInsets(txt);
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
Border b = txt.getBorder();
lbl.setBorder(txt.getBorder());
} else {
Insets insets = b.getBorderInsets(txt);
代码示例来源:origin: org.swinglabs.swingx/swingx-core
Border b = txt.getBorder();
lbl.setBorder(txt.getBorder());
} else {
Insets insets = b.getBorderInsets(txt);
代码示例来源:origin: org.swinglabs.swingx/swingx-all
Border b = txt.getBorder();
lbl.setBorder(txt.getBorder());
} else {
Insets insets = b.getBorderInsets(txt);
代码示例来源:origin: khuxtable/seaglass
/**
* @see javax.swing.plaf.basic.BasicTextUI#uninstallDefaults()
*/
protected void uninstallDefaults() {
JTextComponent c = getComponent();
SeaGlassContext context = getContext(c, ENABLED);
// Remove the search border, if present.
Border border = c.getBorder();
if (border instanceof TextFieldBorder) {
c.setBorder(null);
}
c.putClientProperty("caretAspectRatio", null);
c.removeFocusListener(this);
style.uninstallDefaults(context);
context.dispose();
style = null;
super.uninstallDefaults();
}
代码示例来源:origin: net.sf.nimrod/nimrod-laf
protected void paintBackground( Graphics g) {
JTextComponent c = (JTextComponent)getComponent();
Border bb = c.getBorder();
if ( bb != null && bb instanceof NimRODBorders.NimRODGenBorder ) {
g.setColor( getComponent().getBackground());
Graphics2D g2d = (Graphics2D)g;
g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.fillRoundRect( 2,2, c.getWidth()-4, c.getHeight()-4, 7,7);
g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_DEFAULT);
if ( c.isEnabled() && c.isEditable() ) {
if ( focus ) {
NimRODUtils.paintFocus( g, 1,1, c.getWidth()-2, c.getHeight()-2, 2, 2, NimRODLookAndFeel.getFocusColor());
}
else if ( rollover ) {
NimRODUtils.paintFocus( g, 1,1, c.getWidth()-2, c.getHeight()-2, 2, 2, NimRODUtils.getColorAlfa( NimRODLookAndFeel.getFocusColor(), 150));
}
}
}
else {
super.paintBackground( g);
}
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
promptComponent.setOpaque(txt.isOpaque());
promptComponent.setBounds(txt.getBounds());
Border b = txt.getBorder();
promptComponent.setBorder(txt.getBorder());
} else {
Insets insets = b.getBorderInsets(txt);
代码示例来源:origin: org.swinglabs.swingx/swingx-core
promptComponent.setOpaque(txt.isOpaque());
promptComponent.setBounds(txt.getBounds());
Border b = txt.getBorder();
promptComponent.setBorder(txt.getBorder());
} else {
Insets insets = b.getBorderInsets(txt);
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
Border b = editor.getBorder();
if ((b == null) || (b instanceof UIResource)) {
editor.setBorder(plaf.getBorder(prefix + ".border"));
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
Border b = editor.getBorder();
if ((b == null) || (b instanceof UIResource)) {
editor.setBorder(plaf.getBorder(prefix + ".border"));
内容来源于网络,如有侵权,请联系作者删除!