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

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

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

JSpinner.getName介绍

暂无

代码示例

代码示例来源:origin: org.jsystemtest.systemobjects/swing-so

public boolean checkComponent(Component comp) {
  if (componentClass != null && !comp.getClass().equals(componentClass)){
    return false;
  }
  
  if (comp instanceof JSpinner){
    return name.equals(((JSpinner)comp).getName());
  }
  if (comp instanceof JPanel){
    return name.equals(((JPanel)comp).getName());
  }
  if (comp instanceof AbstractButton){
    return name.equals(((AbstractButton)comp).getText()) || name.equals(((AbstractButton)comp).getToolTipText());
  }
  if (comp instanceof JLabel){
    return name.equals(((JLabel)comp).getText());
  }
  if (comp instanceof JDialog){
    return name.equals(comp.getName()) || name.equals(((JDialog)comp).getTitle());
  }
  return name.equals(comp.getName());
}

代码示例来源:origin: senbox-org/snap-desktop

@Test
public void testCreateSpinner_WithParameter() {
  final String labelname = "paramLabel";
  final ParamProperties properties = new ParamProperties(Integer.class, Integer.valueOf(3));
  properties.setLabel(labelname);
  final Parameter parameter = new Parameter("paramName", properties);
  final JSpinner spinner = UIUtils.createSpinner(parameter, Integer.valueOf(10), "#0");
  assertEquals(labelname, spinner.getName());
}

代码示例来源:origin: bcdev/beam

@Test
public void testCreateSpinner_WithParameter() {
  final String labelname = "paramLabel";
  final ParamProperties properties = new ParamProperties(Integer.class, Integer.valueOf(3));
  properties.setLabel(labelname);
  final Parameter parameter = new Parameter("paramName", properties);
  final JSpinner spinner = UIUtils.createSpinner(parameter, Integer.valueOf(10), "#0");
  assertEquals(labelname, spinner.getName());
}

相关文章