本文整理了Java中javax.swing.JTextField.setUI()
方法的一些代码示例,展示了JTextField.setUI()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextField.setUI()
方法的具体详情如下:
包路径:javax.swing.JTextField
类名称:JTextField
方法名:setUI
暂无
代码示例来源:origin: atarw/material-ui-swing
private static JTextField init () {
JTextField textField = new JTextField ();
textField.setUI (new MaterialTextFieldUI (false));
return textField;
}
代码示例来源:origin: atarw/material-ui-swing
private void init () {
textField = new JTextField ();
textField.setUI (new MaterialTextFieldUI ());
textField.addKeyListener (new KeyAdapter () {
@Override
public void keyTyped (KeyEvent e) {
if (e.getKeyChar () == KeyEvent.VK_ENTER)
stopCellEditing ();
}
});
}
代码示例来源:origin: com.fifesoft/languagesupport
/**
* Creates the text field allowing the user to enter filter text.
*
* @return The text field.
*/
private JTextField createTextField() {
JTextField field = new JTextField(30);
field.setUI(new BasicTextFieldUI());
field.setBorder(new TextFieldBorder());
field.addActionListener(listener);
field.addKeyListener(listener);
field.getDocument().addDocumentListener(listener);
return field;
}
代码示例来源:origin: stackoverflow.com
field.setUI ( new RoundedFieldUI () );
panel.add ( field );
代码示例来源:origin: com.fifesoft.rtext/fife.common
/**
* Overridden so that we always have a document listener on the text field.
*/
@Override
public void setUI(javax.swing.plaf.TextUI ui) {
// Add the document listener.
Document document = getDocument();
if (document!=null)
document.removeDocumentListener(this);
super.setUI(ui);
getDocument().addDocumentListener(this);
// Update the scroll pane in the drop-down window.
if (popupWindow!=null) {
SwingUtilities.updateComponentTreeUI(popupWindow);
}
else if (contentPane!=null) { // It's null first time through
SwingUtilities.updateComponentTreeUI(contentPane);
}
// Install extra key actions.
installExtraKeyActions();
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
greenLabel.setUI((LabelUI) PaletteLabelUI.createUI(greenLabel));
blueLabel.setUI((LabelUI) PaletteLabelUI.createUI(blueLabel));
redField.setUI((TextUI) PaletteTextFieldUI.createUI(redField));
greenField.setUI((TextUI) PaletteTextFieldUI.createUI(greenField));
blueField.setUI((TextUI) PaletteTextFieldUI.createUI(blueField));
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
saturationFieldLabel.setUI((LabelUI) PaletteLabelUI.createUI(saturationFieldLabel));
brightnessFieldLabel.setUI((LabelUI) PaletteLabelUI.createUI(brightnessFieldLabel));
hueField.setUI((TextUI) PaletteTextFieldUI.createUI(hueField));
saturationField.setUI((TextUI) PaletteTextFieldUI.createUI(saturationField));
brightnessField.setUI((TextUI) PaletteTextFieldUI.createUI(brightnessField));
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
yellowFieldLabel.setUI((LabelUI) PaletteLabelUI.createUI(yellowFieldLabel));
blackFieldLabel.setUI((LabelUI) PaletteLabelUI.createUI(blackFieldLabel));
cyanField.setUI((TextUI) PaletteTextFieldUI.createUI(cyanField));
magentaField.setUI((TextUI) PaletteTextFieldUI.createUI(magentaField));
yellowField.setUI((TextUI) PaletteTextFieldUI.createUI(yellowField));
blackField.setUI((TextUI) PaletteTextFieldUI.createUI(blackField));
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
txfTitle.setUI(new HintTextFieldUI("Brief error description"));
txfTitle.setMargin(new Insets(0, 4, 0, 4));
内容来源于网络,如有侵权,请联系作者删除!