java.awt.Checkbox.addKeyListener()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(156)

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

Checkbox.addKeyListener介绍

暂无

代码示例

代码示例来源:origin: sc.fiji/MTrackJ_

public void addCheckbox(String label, boolean defaultValue) {
  
  String label2 = label;
  if (label2.indexOf('_')!=-1) label2 = label2.replace('_', ' ');
  if (checkbox==null) {
    checkbox = new Vector(4);
    c.insets = getInsets(10,10,0,0);
  } else c.insets = getInsets(0,10,0,0);
  c.gridx = 0; c.gridy = y;
  c.gridwidth = 2;
  c.anchor = GridBagConstraints.WEST;
  Checkbox cb = new Checkbox(" "+label2);
  cb.setFont(font);
  grid.setConstraints(cb, c);
  cb.setState(defaultValue);
  cb.addItemListener(this);
  cb.addKeyListener(this);
  add(cb);
  checkbox.addElement(cb);
  y++;
}

代码示例来源:origin: sc.fiji/Image_5D

void addTiledSelectorPanel() {
  if (channelSelectorOverlay == null) {
    channelSelectorOverlay = new ChannelSelectorOverlay(this);
  }
  if (tiledSelectorPanel == null) {
    tiledSelectorPanel = new Panel(new BorderLayout());
  }
  if (allGrayInTilesBox == null) {
    allGrayInTilesBox = new Checkbox("all gray", displayGrayInTiles);
    allGrayInTilesBox.addItemListener(this);
    allGrayInTilesBox.addKeyListener(win);
    allGrayInTilesBox.addKeyListener(ij);
    allGrayInTilesBox.addKeyListener(win);
  }
  if (channelSelectorOverlay != null) selectorPanel
    .remove(channelSelectorOverlay);
  if (scrollbarWL != null) selectorPanel.remove(scrollbarWL);
  tiledSelectorPanel.add(allGrayInTilesBox, BorderLayout.NORTH);
  tiledSelectorPanel.add(channelSelectorOverlay, BorderLayout.CENTER);
  selectorPanel.add(tiledSelectorPanel, BorderLayout.CENTER);
  win.pack();
  selectorPanel.repaint();
}

代码示例来源:origin: net.imagej/ij

cb.setState(defaultValue);
cb.addItemListener(this);
cb.addKeyListener(this);
add(cb, c);
c.insets.left = 0;

代码示例来源:origin: imagej/ImageJA

cb.setState(defaultValue);
cb.addItemListener(this);
cb.addKeyListener(this);
add(cb, c);
c.insets.left = 0;

代码示例来源:origin: sc.fiji/Image_5D

channelPanel.add(p);
channelActive[i].addKeyListener(win);
channelDisplayed[i].addKeyListener(win);
channelActive[i].addKeyListener(ij);
channelDisplayed[i].addKeyListener(ij);
channelActive[i].addKeyListener(win);
channelDisplayed[i].addKeyListener(win);

代码示例来源:origin: sc.fiji/Image_5D

displayGrayBox.addKeyListener(win);
cColorCanvas.addKeyListener(win);
editColorButton.addKeyListener(win);
displayGrayBox.addKeyListener(ij);
cColorCanvas.addKeyListener(ij);
editColorButton.addKeyListener(ij);
displayGrayBox.addKeyListener(win);
cColorCanvas.addKeyListener(win);
editColorButton.addKeyListener(win);

代码示例来源:origin: net.imagej/ij

add(checkbox[i], c);
checkbox[i].addItemListener(this);
checkbox[i].addKeyListener(ij);

代码示例来源:origin: imagej/ImageJA

add(checkbox[i], c);
checkbox[i].addItemListener(this);
checkbox[i].addKeyListener(ij);

相关文章