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

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

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

JSpinner.getWidth介绍

暂无

代码示例

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

@Override
public void paint(Graphics g, JComponent c) {
  super.paint(g, c);
  Graphics2D graphics = (Graphics2D) g.create();
  int width = this.spinner.getWidth();
  int height = this.spinner.getHeight();
  int componentFontSize = SubstanceSizeUtils
      .getComponentFontSize(this.spinner);
  int borderDelta = (int) Math.floor(SubstanceSizeUtils
      .getBorderStrokeWidth(componentFontSize));
  Shape contour = SubstanceOutlineUtilities
      .getBaseOutline(
          width,
          height,
          Math.max(
              0,
              2.0f
                  * SubstanceSizeUtils
                      .getClassicButtonCornerRadius(componentFontSize)
                  - borderDelta), null, borderDelta);
  graphics.setColor(SubstanceTextUtilities
      .getTextBackgroundFillColor(this.spinner));
  graphics.fill(contour);
  graphics.dispose();
}

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

@Override
public void paint(Graphics g, JComponent c) {
  super.paint(g, c);
  Graphics2D graphics = (Graphics2D) g.create();
  int width = this.spinner.getWidth();
  int height = this.spinner.getHeight();
  int componentFontSize = SubstanceSizeUtils
      .getComponentFontSize(this.spinner);
  int borderDelta = (int) Math.floor(SubstanceSizeUtils
      .getBorderStrokeWidth(componentFontSize));
  Shape contour = SubstanceOutlineUtilities
      .getBaseOutline(
          width,
          height,
          Math.max(
              0,
              2.0f
                  * SubstanceSizeUtils
                      .getClassicButtonCornerRadius(componentFontSize)
                  - borderDelta), null, borderDelta);
  graphics.setColor(SubstanceTextUtilities
      .getTextBackgroundFillColor(this.spinner));
  graphics.fill(contour);
  graphics.dispose();
}

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

.getWidth(), m_MeanPrecLabel.getHeight()));
m_MeanPrecSpinner.setPreferredSize(new Dimension(m_MeanPrecSpinner
 .getWidth() * 3, m_MeanPrecSpinner.getHeight()));
m_StdDevPrecLabel.setPreferredSize(new Dimension(m_RemoveFilterNameLabel
 .getWidth(), m_StdDevPrecLabel.getHeight()));
m_StdDevPrecSpinner.setPreferredSize(new Dimension(m_StdDevPrecSpinner
 .getWidth() * 3, m_StdDevPrecSpinner.getHeight()));
m_OutputFormatLabel.setPreferredSize(new Dimension(m_RemoveFilterNameLabel
 .getWidth(), m_OutputFormatLabel.getHeight()));

代码示例来源:origin: Waikato/weka-trunk

.getWidth(), m_MeanPrecLabel.getHeight()));
m_MeanPrecSpinner.setPreferredSize(new Dimension(m_MeanPrecSpinner
 .getWidth() * 3, m_MeanPrecSpinner.getHeight()));
m_StdDevPrecLabel.setPreferredSize(new Dimension(m_RemoveFilterNameLabel
 .getWidth(), m_StdDevPrecLabel.getHeight()));
m_StdDevPrecSpinner.setPreferredSize(new Dimension(m_StdDevPrecSpinner
 .getWidth() * 3, m_StdDevPrecSpinner.getHeight()));
m_OutputFormatLabel.setPreferredSize(new Dimension(m_RemoveFilterNameLabel
 .getWidth(), m_OutputFormatLabel.getHeight()));

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

g2offscreen.translate(-offsetX, -offsetY);
SubstanceImageCreator.paintTextComponentBorder(parent, g2offscreen,
    0, 0, parent.getWidth(), parent.getHeight(), radius,
    baseBorderScheme);
g2offscreen.translate(offsetX, offsetY);
  g2offscreen.translate(-offsetX, -offsetY);
  SubstanceImageCreator.paintTextComponentBorder(parent,
      g2offscreen, 0, 0, parent.getWidth(), parent
          .getHeight(), radius, borderScheme);
  g2offscreen.translate(offsetX, offsetY);
g2offscreen.translate(-offsetX, -offsetY);
SubstanceImageCreator.paintTextComponentBorder(parent, g2offscreen,
    0, 0, parent.getWidth(), parent.getHeight(), radius,
    baseBorderScheme);
g2offscreen.translate(offsetX, offsetY);
  g2offscreen.translate(-offsetX, -offsetY);
  SubstanceImageCreator.paintTextComponentBorder(parent,
      g2offscreen, 0, 0, parent.getWidth(), parent
          .getHeight(), radius, borderScheme);
  g2offscreen.translate(offsetX, offsetY);

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

g2offscreen.translate(-offsetX, -offsetY);
SubstanceImageCreator.paintTextComponentBorder(parent, g2offscreen,
    0, 0, parent.getWidth(), parent.getHeight(), radius,
    baseBorderScheme);
g2offscreen.translate(offsetX, offsetY);
  g2offscreen.translate(-offsetX, -offsetY);
  SubstanceImageCreator.paintTextComponentBorder(parent,
      g2offscreen, 0, 0, parent.getWidth(), parent
          .getHeight(), radius, borderScheme);
  g2offscreen.translate(offsetX, offsetY);
g2offscreen.translate(-offsetX, -offsetY);
SubstanceImageCreator.paintTextComponentBorder(parent, g2offscreen,
    0, 0, parent.getWidth(), parent.getHeight(), radius,
    baseBorderScheme);
g2offscreen.translate(offsetX, offsetY);
  g2offscreen.translate(-offsetX, -offsetY);
  SubstanceImageCreator.paintTextComponentBorder(parent,
      g2offscreen, 0, 0, parent.getWidth(), parent
          .getHeight(), radius, borderScheme);
  g2offscreen.translate(offsetX, offsetY);

相关文章