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

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

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

Checkbox.<init>介绍

暂无

代码示例

代码示例来源:origin: uk.org.mygrid.taverna.scufl/scufl-ui-api

public NestedFileChooser() {
  checkbox = new Checkbox("Embed nested workflow(s)");
}

代码示例来源:origin: stackoverflow.com

List<Checkbox> checkboxes = new ArrayList<Checkbox>();
 String labels[] = {"A", "B", "C", "D", "E", "F"};
 for (int i = 0; i < labels.length; i++) {
   Checkbox checkbox = new Checkbox(labels[i]);
   checkboxes.add(checkbox); //for further use you add it to the list
 }

代码示例来源:origin: org.fudaa.edu.auburn.vgj/vgj

public Checkbox addCheckbox(String string, CheckboxGroup group,
              boolean state, int width, int anchor,
              double weightx, double weighty, int fill, int shift)
{
  return (Checkbox)(addComponent(new Checkbox(string, group, state),
                 width, anchor, weightx, weighty, fill, shift));
}

代码示例来源:origin: sc.fiji/VIB-lib

public void addCheckbox( String label ) {
  Checkbox cb = new Checkbox( label, false );
  QuestionComponent q = new QuestionComponent( CHECKBOX,
               null,
               label,
               cb );
  components.add(q);
}

代码示例来源:origin: net.jxta/jxta-jxse

EnablingPanel(boolean actAsRelay, boolean actAsRendezvous, boolean actAsJxmeProxy) {
    super("Services Settings");
    isRelay = new Checkbox("Act as a Relay", null, actAsRelay);
    isRendezvous = new Checkbox("Act as a Rendezvous", null, actAsRendezvous);
    isJxmeProxy = new Checkbox("Act as a JXME proxy", null, actAsJxmeProxy);
    add(isRelay, stdConstr);
    add(isRendezvous, stdConstr);
    add(isJxmeProxy, stdConstr);
  }
}

代码示例来源:origin: sc.fiji/VIB-lib

public void addRadio( String groupName, String label ) {
  if( ! checkboxGroups.containsKey(groupName) ) {
    checkboxGroups.put(groupName,new CheckboxGroup());
  }
  CheckboxGroup cbg = checkboxGroups.get( groupName );
  Checkbox cb = new Checkbox( label, false, cbg );
  QuestionComponent q = new QuestionComponent( RADIO,
               groupName,
               label,
               cb );
  components.add(q);
}

代码示例来源:origin: org.knowhowlab.comm/org.knowhowlab.comm.rxtx-patched

void addCheckBoxes( String PortName )
{
  for ( int i = 0; i < 128 ; i++ )
    if( cb[i] != null )
      p1.remove( cb[i] );
  for (int i=1;i<129;i++)
  {
    cb[i-1]=new Checkbox(PortName+i);
    p1.add( "NORTH", cb[i-1] );
  }
}

代码示例来源:origin: org.openmuc/jrxtx

void addCheckBoxes( String PortName )
{
  for ( int i = 0; i < 128 ; i++ )
    if( cb[i] != null )
      p1.remove( cb[i] );
  for (int i=1;i<129;i++)
  {
    cb[i-1]=new Checkbox(PortName+i);
    p1.add( "NORTH", cb[i-1] );
  }
}

代码示例来源:origin: org.jfree/jcommon

/**
 * Run a demonstration.
 *
 * @param args  ignored.
 * 
 * @throws Exception when an error occurs.
 */
public static void main(final String[] args) throws Exception {
  final Frame frame = new Frame();
  final Panel panel = new Panel();
  panel.setLayout(new RadialLayout());
  panel.add(new Checkbox("One"));
  panel.add(new Checkbox("Two"));
  panel.add(new Checkbox("Three"));
  panel.add(new Checkbox("Four"));
  panel.add(new Checkbox("Five"));
  panel.add(new Checkbox("One"));
  panel.add(new Checkbox("Two"));
  panel.add(new Checkbox("Three"));
  panel.add(new Checkbox("Four"));
  panel.add(new Checkbox("Five"));
  frame.add(panel);
  frame.setSize(300, 500);
  frame.setVisible(true);
}

代码示例来源:origin: org.jfree/com.springsource.org.jfree

/**
 * Run a demonstration.
 *
 * @param args  ignored.
 * 
 * @throws Exception when an error occurs.
 */
public static void main(final String[] args) throws Exception {
  final Frame frame = new Frame();
  final Panel panel = new Panel();
  panel.setLayout(new RadialLayout());
  panel.add(new Checkbox("One"));
  panel.add(new Checkbox("Two"));
  panel.add(new Checkbox("Three"));
  panel.add(new Checkbox("Four"));
  panel.add(new Checkbox("Five"));
  panel.add(new Checkbox("One"));
  panel.add(new Checkbox("Two"));
  panel.add(new Checkbox("Three"));
  panel.add(new Checkbox("Four"));
  panel.add(new Checkbox("Five"));
  frame.add(panel);
  frame.setSize(300, 500);
  frame.setVisible(true);
}

代码示例来源:origin: jfree/jcommon

/**
 * Run a demonstration.
 *
 * @param args  ignored.
 * 
 * @throws Exception when an error occurs.
 */
public static void main(final String[] args) throws Exception {
  final Frame frame = new Frame();
  final Panel panel = new Panel();
  panel.setLayout(new RadialLayout());
  panel.add(new Checkbox("One"));
  panel.add(new Checkbox("Two"));
  panel.add(new Checkbox("Three"));
  panel.add(new Checkbox("Four"));
  panel.add(new Checkbox("Five"));
  panel.add(new Checkbox("One"));
  panel.add(new Checkbox("Two"));
  panel.add(new Checkbox("Three"));
  panel.add(new Checkbox("Four"));
  panel.add(new Checkbox("Five"));
  frame.add(panel);
  frame.setSize(300, 500);
  frame.setVisible(true);
}

代码示例来源:origin: IanDarwin/javasrc

PhonesPanel() {
  super();
  setBackground(Color.red);
  setLayout(new FlowLayout());
  add(new Label("Tab markers at edge of page?"));
  add(new Checkbox());
  add(new Label("Each letter starts page?"));
  add(new Checkbox());
}
public String getChoice() {

代码示例来源: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: org.scijava/scijava-ui-awt

@Override
public void set(final WidgetModel model) {
  super.set(model);
  checkbox = new Checkbox("");
  getComponent().add(checkbox, BorderLayout.CENTER);
  refreshWidget();
}

代码示例来源:origin: org.w3c.jigsaw/jigsaw

private void init() {
setLayout( new BorderLayout());
label    = new Label(getString(true));
checkbox = new Checkbox();
checkbox.setState(true);
checkbox.addItemListener(this);
add(checkbox,"West");
add(label,"Center");
size = new Dimension(75,30);
}

代码示例来源:origin: net.jxta/jxta-jxse

RdvPanel(boolean useARdv, boolean onlySeeds) {
  super("Rendezvous Settings");
  useRdv = new Checkbox("Use a rendezvous", null, useARdv);
  useOnlySeeds = new Checkbox("Use only configured seeds", null, onlySeeds);
  seeds = new HostListPanel("Seeds", "Rendezvous seed peers", true, false);
  seeding = new HostListPanel("Seeding", "Rendezvous seeding URIs", true, false);
  GridBagConstraints c1 = new GridBagConstraints();
  c1.gridx = 0;
  c1.gridy = 0;
  c1.anchor = GridBagConstraints.LINE_START;
  add(useRdv, c1);
  useRdv.addItemListener(this);
  c1.gridx++;
  c1.anchor = GridBagConstraints.LINE_END;
  add(useOnlySeeds, c1);
  c1.gridx = 0;
  c1.gridy++;
  c1.gridwidth = 2;
  c1.weightx = 1.0;
  c1.fill = GridBagConstraints.HORIZONTAL;
  c1.anchor = GridBagConstraints.LINE_START;
  add(seeding, c1);
  c1.gridy++;
  add(seeds, c1);
}

代码示例来源:origin: org.jacorb/jacorb

/**
 * Return the EhterializeCheckbox property value.
 * @return java.awt.Checkbox
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private java.awt.Checkbox getEtherializeCheckbox() {
  if (ivjEtherializeCheckbox == null) {
    try {
      ivjEtherializeCheckbox = new java.awt.Checkbox();
      ivjEtherializeCheckbox.setName("EtherializeCheckbox");
      ivjEtherializeCheckbox.setFont(new java.awt.Font("dialog", 2, 10));
      ivjEtherializeCheckbox.setLabel("etherialize_objects");
      // user code begin {1}
      // user code end
    } catch (java.lang.Throwable ivjExc) {
      // user code begin {2}
      // user code end
      handleException(ivjExc);
    }
  };
  return ivjEtherializeCheckbox;
}
/**

代码示例来源:origin: org.jacorb/jacorb

/**
 * Return the WaitCheckbox property value.
 * @return java.awt.Checkbox
 */
/* WARNING: THIS METHOD WILL BE REGENERATED. */
private java.awt.Checkbox getWaitCheckbox() {
  if (ivjWaitCheckbox == null) {
    try {
      ivjWaitCheckbox = new java.awt.Checkbox();
      ivjWaitCheckbox.setName("WaitCheckbox");
      ivjWaitCheckbox.setFont(new java.awt.Font("dialog", 2, 10));
      ivjWaitCheckbox.setLabel("wait_for_completion");
      // user code begin {1}
      // user code end
    } catch (java.lang.Throwable ivjExc) {
      // user code begin {2}
      // user code end
      handleException(ivjExc);
    }
  };
  return ivjWaitCheckbox;
}
/**

代码示例来源:origin: sc.fiji/VIB-lib

private void addSelection() {
  constr.gridwidth = GridBagConstraints.REMAINDER;
  addLabel("Selection:");
  
  constr.gridwidth = 1;
  bPlus = addImageButton("iconPlus.png", al);
  bPlus.setActionCommand("plus");
  bMinus = addImageButton("iconMinus.png", al);
  bMinus.setActionCommand("minus");
  
  constr.gridwidth = GridBagConstraints.REMAINDER;
  constr.fill = GridBagConstraints.NONE;
  check3d = new Checkbox("3d", true);
  add(check3d, constr);
  constr.fill = GridBagConstraints.BOTH;
}

代码示例来源: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();
}

相关文章