javax.swing.JSpinner.getBorder()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中javax.swing.JSpinner.getBorder()方法的一些代码示例,展示了JSpinner.getBorder()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSpinner.getBorder()方法的具体详情如下:
包路径:javax.swing.JSpinner
类名称:JSpinner
方法名:getBorder

JSpinner.getBorder介绍

暂无

代码示例

代码示例来源:origin: freeplane/freeplane

/**
   * Updates the UI.
   *
   * @see javax.swing.JPanel#updateUI()
   */
  @Override
  public void updateUI() {
    final JSpinner testSpinner = new JSpinner();
    if (spinner != null) {
      if ("Windows".equals(UIManager.getLookAndFeel().getID())) {
        spinner.setBorder(testSpinner.getBorder());
      }
      else {
        spinner.setBorder(new EmptyBorder(0, 0, 0, 0));
      }
    }
  }
}

代码示例来源:origin: net.sf.nimrod/nimrod-laf

Border bb = ((JSpinner)getParent()).getBorder();
if ( bb != null ) {
 if ( dir == SwingConstants.NORTH ) {

代码示例来源:origin: GoldenGnu/jeveassets

private void updateGroupColor() {
  Color color = getGroupColor();
  Border border = jGroup.getBorder();
  JFormattedTextField jTextField = ((JSpinner.DefaultEditor) jGroup.getEditor()).getTextField();
  if ("Nimbus".equals(UIManager.getLookAndFeel().getName())) {

代码示例来源:origin: com.github.insubstantial/substance

@Override
protected void installDefaults() {
  super.installDefaults();
  JComponent editor = this.spinner.getEditor();
  if ((editor != null) && (editor instanceof JSpinner.DefaultEditor)) {
    JTextField tf = ((JSpinner.DefaultEditor) editor).getTextField();
    if (tf != null) {
      int fontSize = SubstanceSizeUtils
          .getComponentFontSize(this.spinner);
      Insets ins = SubstanceSizeUtils
          .getSpinnerTextBorderInsets(fontSize);
      tf.setBorder(new EmptyBorder(ins.top, ins.left, ins.bottom,
          ins.right));
      tf.setFont(spinner.getFont());
      tf.setOpaque(false);
    }
  }
  if (editor != null) {
    editor.setOpaque(false);
  }
  Border b = this.spinner.getBorder();
  if (b == null || b instanceof UIResource) {
    this.spinner.setBorder(new SubstanceTextComponentBorder(
        SubstanceSizeUtils
            .getSpinnerBorderInsets(SubstanceSizeUtils
                .getComponentFontSize(this.spinner))));
  }
}

代码示例来源:origin: org.java.net.substance/substance

@Override
protected void installDefaults() {
  super.installDefaults();
  JComponent editor = this.spinner.getEditor();
  if ((editor != null) && (editor instanceof JSpinner.DefaultEditor)) {
    JTextField tf = ((JSpinner.DefaultEditor) editor).getTextField();
    if (tf != null) {
      int fontSize = SubstanceSizeUtils
          .getComponentFontSize(this.spinner);
      Insets ins = SubstanceSizeUtils
          .getSpinnerTextBorderInsets(fontSize);
      tf.setBorder(new EmptyBorder(ins.top, ins.left, ins.bottom,
          ins.right));
      tf.setFont(spinner.getFont());
      tf.setOpaque(false);
    }
  }
  if (editor != null) {
    editor.setOpaque(false);
  }
  Border b = this.spinner.getBorder();
  if (b == null || b instanceof UIResource) {
    this.spinner.setBorder(new SubstanceTextComponentBorder(
        SubstanceSizeUtils
            .getSpinnerBorderInsets(SubstanceSizeUtils
                .getComponentFontSize(this.spinner))));
  }
}

相关文章