本文整理了Java中javax.swing.JTextField.getBorder()
方法的一些代码示例,展示了JTextField.getBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextField.getBorder()
方法的具体详情如下:
包路径:javax.swing.JTextField
类名称:JTextField
方法名:getBorder
暂无
代码示例来源:origin: libgdx/libgdx
pane.setComponentOrientation(JOptionPane.getRootFrame().getComponentOrientation());
Border border = textField.getBorder();
placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));
代码示例来源:origin: libgdx/libgdx
pane.setComponentOrientation(JOptionPane.getRootFrame().getComponentOrientation());
Border border = textField.getBorder();
placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));
代码示例来源:origin: libgdx/libgdx
pane.setComponentOrientation(JOptionPane.getRootFrame().getComponentOrientation());
Border border = textField.getBorder();
placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));
代码示例来源:origin: libgdx/libgdx
pane.setComponentOrientation(JOptionPane.getRootFrame().getComponentOrientation());
Border border = textField.getBorder();
placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));
代码示例来源:origin: apache/pdfbox
private void updateText(String statusString)
{
statusField.setText(statusString);
if (!statusField.getBorder().equals(defaultBorder))
{
statusField.setBorder(defaultBorder);
}
}
代码示例来源:origin: stackoverflow.com
Border originalBorder;
...
JTextField textField = new JTextField(20);
originalBorder = textField.getBorder();
// here you can safely change text field's border
代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing
public JTextField getJTextField() {
if (_jTextField == null) {
_jTextField = new JTextField();
_jTextField.setPreferredSize(new Dimension(80, 10));
_jTextField.setBorder(BorderFactory.createCompoundBorder(_jTextField.getBorder(),
BorderFactory.createEmptyBorder(0, 2, 0, 0)));
}
return _jTextField;
}
代码示例来源:origin: freeplane/freeplane
public FixedBasicComboBoxEditor()
{
// don't change the background color to grey, it would be harder to use :-(
//Color c = UIManager.getLookAndFeelDefaults().getColor("ComboBox.background");
//editor.setBackground(new Color(c.getRed(), c.getGreen(), c.getBlue()));
// add left padding to the embedded JTextField:
// this border-hack was proposed by John B. Matthews on comp.lang.java.gui
editor.setBorder(BorderFactory.createCompoundBorder(
editor.getBorder(), new EmptyBorder(0, 4, 0, 0)));
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
/**
* Wraps and replaces the text fields default border with this object, to
* honor the button margins and sizes of the search, clear and popup buttons
* and the layout style.
*/
protected void replaceBorderIfNecessary() {
Border original = textField.getBorder();
if (!(original instanceof BuddyLayoutAndBorder)) {
borderDelegate = original;
textField.setBorder(this);
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
/**
* Wraps and replaces the text fields default border with this object, to
* honor the button margins and sizes of the search, clear and popup buttons
* and the layout style.
*/
protected void replaceBorderIfNecessary() {
Border original = textField.getBorder();
if (!(original instanceof BuddyLayoutAndBorder)) {
borderDelegate = original;
textField.setBorder(this);
}
}
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
/**
* Wraps and replaces the text fields default border with this object, to
* honor the button margins and sizes of the search, clear and popup buttons
* and the layout style.
*/
protected void replaceBorderIfNecessary() {
Border original = textField.getBorder();
if (!(original instanceof BuddyLayoutAndBorder)) {
borderDelegate = original;
textField.setBorder(this);
}
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
/**
* Wraps and replaces the text fields default border with this object, to
* honor the button margins and sizes of the search, clear and popup buttons
* and the layout style.
*/
protected void replaceBorderIfNecessary() {
Border original = textField.getBorder();
if (!(original instanceof BuddyLayoutAndBorder)) {
borderDelegate = original;
textField.setBorder(this);
}
}
代码示例来源:origin: stackoverflow.com
ComboBoxEditor editor = comboBox.getEditor();
JTextField textField = (JTextField)editor.getEditorComponent();
Border outer = textField.getBorder();
Border search = new MatteBorder(0, 16, 0, 0, new ImageIcon("search.gif"));
textField.setBorder( new CompoundBorder(outer, search) );
代码示例来源:origin: org.diirt/datasource-sample
/**
* Creates new form MockPVFrame
*/
public SimpleProbe() {
initComponents();
borders.put(AlarmSeverity.NONE, pvTextValue.getBorder());
borders.put(AlarmSeverity.MINOR, new LineBorder(Color.YELLOW));
borders.put(AlarmSeverity.MAJOR, new LineBorder(Color.RED));
borders.put(AlarmSeverity.INVALID, new LineBorder(Color.GRAY));
borders.put(AlarmSeverity.UNDEFINED, new LineBorder(Color.MAGENTA));
}
ValueFormat format = new SimpleValueFormat(3);
代码示例来源:origin: org.bidib.jbidib.swinglabs.swingx/swingx-core
public void uninstall() {
if (textField != null) {
textField.removePropertyChangeListener("border", this);
if (textField.getBorder() == this) {
textField.setBorder(borderDelegate);
}
textField.setLayout(null);
textField = null;
}
}
代码示例来源:origin: com.haulmont.thirdparty/swingx-core
public void uninstall() {
if (textField != null) {
textField.removePropertyChangeListener("border", this);
if (textField.getBorder() == this) {
textField.setBorder(borderDelegate);
}
textField.setLayout(null);
textField = null;
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-core
public void uninstall() {
if (textField != null) {
textField.removePropertyChangeListener("border", this);
if (textField.getBorder() == this) {
textField.setBorder(borderDelegate);
}
textField.setLayout(null);
textField = null;
}
}
代码示例来源:origin: org.swinglabs.swingx/swingx-all
public void uninstall() {
if (textField != null) {
textField.removePropertyChangeListener("border", this);
if (textField.getBorder() == this) {
textField.setBorder(borderDelegate);
}
textField.setLayout(null);
textField = null;
}
}
代码示例来源:origin: BaseXdb/basex
/**
* Constructor.
* @param gui gui
* @param combo combo box
*/
private BaseXEditor(final GUI gui, final BaseXCombo combo) {
tf = new BaseXTextField(gui);
// adopt border of original editor
if(Prop.JAVA8) {
final Component comp = combo.getEditor().getEditorComponent();
if(comp instanceof JTextField) tf.setBorder(((JTextField) comp).getBorder());
}
}
代码示例来源:origin: org.gdl-lang.gdl-tools/openehr-utils-gui-swing
private void init() {
this.setLayout(new BorderLayout());
this.add(getJTextField());
this.add(getJButton(), BorderLayout.EAST);
Border textBorder = getJTextField().getBorder();
getJTextField().setBorder(null);
this.setBackground(getJTextField().getBackground());
this.setBorder(textBorder);
}
内容来源于网络,如有侵权,请联系作者删除!