微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

javax.swing.JCheckBox的实例源码

项目:myster    文件MessageManager.java   
public MessagePreferencesPanel() {
    setLayout(null);

    refuseMessages = new JCheckBox("Refuse Messages");
    refuseMessages.setSize(150,25);
    refuseMessages.setLocation(10,25);
    refuseMessages.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            updateEnabled();
        }
    });
    add(refuseMessages);

    denyMessageLabel = new JLabel("Refusal Message:");
    denyMessageLabel.setSize(150,25);
    denyMessageLabel.setLocation(20,50);
    add(denyMessageLabel);

    denyMessageText = new JTextField(REFUSAL_MESSAGE_DEFAULT);
    denyMessageText.setSize(400,25);
    denyMessageText.setLocation(25,75);
    add(denyMessageText);

    setSize(STD_XSIZE,STD_YSIZE);
}
项目:Equella    文件FilteringTab.java   
@Override
public void setup(ChangeDetector changeDetector)
{
    showResults = new JCheckBox(getString("filteringtab.display"),true); //$NON-NLS-1$
    filter = new SearchSetFilter(cache,clientService);

    final int[] rows = {TableLayout.PREFERRED,TableLayout.FILL,};
    final int[] cols = {TableLayout.FILL,};

    setLayout(new TableLayout(rows,cols));

    add(showResults,new Rectangle(0,1,1));
    add(filter,1));

    changeDetector.watch(showResults);
    changeDetector.watch(filter);
}
项目:LivroJavaComoProgramar10Edicao    文件CheckBoxFrame.java   
public CheckBoxFrame()
{
   super("JCheckBox Test");
   setLayout(new FlowLayout());

   // set up JTextField and set its font
   textField = new JTextField("Watch the font style change",20);
   textField.setFont(new Font("Serif",Font.PLAIN,14));
   add(textField); // add textField to JFrame

   boldJCheckBox = new JCheckBox("Bold"); 
   italicJCheckBox = new JCheckBox("Italic"); 
   add(boldJCheckBox); // add bold checkBox to JFrame
   add(italicJCheckBox); // add italic checkBox to JFrame

   // register listeners for JCheckBoxes
   CheckBoxHandler handler = new CheckBoxHandler();
   boldJCheckBox.addItemListener(handler);
   italicJCheckBox.addItemListener(handler);
}
项目:TwitchBot    文件MainView.java   
private void manageButtons() {
    this.joinChannel = new JButton("Join Channel");
    this.joinChannel.setPreferredSize(
            new Dimension(this.chatAreaDescription.getPreferredSize().width,this.joinChannel.getPreferredSize().height));
    this.joinChannel.setBorder(BorderFactory.createBevelBorder(1));

    this.leaveChannel = new JButton("Leave Channel");
    this.leaveChannel.setPreferredSize(
            new Dimension(this.chatAreaDescription.getPreferredSize().width,this.joinChannel.getPreferredSize().height));
    this.leaveChannel.setBorder(BorderFactory.createBevelBorder(1));

    this.actAsBot = new JCheckBox("React to !");
    this.actAsBot.setSelected(true);

    this.trollPaul = new JCheckBox("copy Swaul");
    this.trollPaul.setSelected(false);

    this.trollMatti = new JCheckBox("copy GeniusMatti");
    this.trollMatti.setSelected(false);

    this.logToFile = new JCheckBox("Log To File");
    this.logToFile.setSelected(true);

}
项目:incubator-netbeans    文件ScopeOptionsController.java   
private void init() {
    btnTestFileNamePattern = new JButton();
    chkFileNameRegex = new JCheckBox();
    chkFileNameRegex.setToolTipText(UiUtils.getText(
            "BasicSearchForm.chkFileNameRegex.tooltip"));           //NOI18N

    if (!replacing) {
        chkArchives = new JCheckBox();
        chkGenerated = new JCheckBox();
    }
    chkUseIgnoreList = new JCheckBox();
    btnEditIgnoreList = new JButton();
    checkBoxListener = new CheckBoxListener();

    component.setLayout(new FlowLayout(FlowLayout.LEADING,0));
    setMnemonics();
    initIgnoreListControlComponents();
    initScopeOptionsRow(replacing);
    initInteraction();
}
项目:GIFKR    文件PreviewStatusPanel.java   
private void initializeComponents() {
    qualitySlider = new JSlider(10,100,50) {
        private static final long serialVersionUID = -3633632766184431178L;

        @Override
        public Dimension getPreferredSize() {
            return new Dimension(super.getPreferredSize().width/2,new JLabel(" ").getPreferredSize().height);
        }
    };
    qualitySlider.addchangelistener(ce -> r.refresh());

    qualitySlider.setopaque(false);
    statusLabel = new JLabel();
    skipFrames = new JCheckBox("Skip frames",false);
    skipFrames.setopaque(false);
}
项目:incubator-netbeans    文件EditorPanelOperator.java   
protected JPanel getopenedPanel(EditorOperator editorOperator) {
    for (int i = 0; i < 10; i++) {
        this.panel =  findPanel((Container) editorOperator.getSource());
        if(panel!=null) break;
        new EventTool().waitNoEvent(200);
    }
    if(panel==null) return null;
    for (Component c : panel.getComponents()) {
        if (c instanceof JCheckBox) {
            checkBoxesInPanel.add((JCheckBox)c);
        } else if(c instanceof JButton) {
            buttons.add((JButton)c);
        }
    }      
    return panel;
}
项目:marathonv5    文件RToggleButtonTest.java   
public void selectCheckBoxNotSelected() throws InterruptedException {
    final LoggingRecorder lr = new LoggingRecorder();
    siw(new Runnable() {
        @Override public void run() {
            List<Component> comps = ComponentUtils.findComponents(JCheckBox.class,frame);
            JCheckBox checkBox = (JCheckBox) comps.get(3);
            RToggleButton rButton = new RToggleButton(checkBox,null,lr);
            checkBox.setSelected(false);
            rButton.mouseEntered(null);
            checkBox.setSelected(true);
            rButton.mouseClicked(null);
        }
    });
    Call call = lr.getCall();
    AssertJUnit.assertEquals("select",call.getFunction());
    AssertJUnit.assertEquals("true",call.getState());
}
项目:KernelHive    文件ResourceMonitorPanel.java   
/**
 *
 */
public ResourceMonitorPanel() {
    setLayout(new BorderLayout(0,0));

    picturePanel = new JPanel();
    picturePanel.setLayout(new BoxLayout(picturePanel,BoxLayout.PAGE_AXIS));

    JScrollPane scroll = new JScrollPane(picturePanel);
    add(scroll);

    final JPanel buttonPanel = new JPanel();
    add(buttonPanel,BorderLayout.soUTH);

    btnRefresh = new JButton("Refresh");
    buttonPanel.add(btnRefresh);

    autoRefreshCheckBox = new JCheckBox("Auto-refresh",true);
    buttonPanel.add(autoRefreshCheckBox);
}
项目:xdman    文件XDMMainWindow.java   
int getDupAction(String url) {
    JTextField txt = new JTextField(url,30);
    String lbl = StringResource.getString("DUP_TXT");
    JComboBox choice = new JComboBox(new String[] { StringResource.getString("DUP_OP1"),StringResource.getString("DUP_OP2"),StringResource.getString("DUP_OP3") });
    JCheckBox chk = new JCheckBox(StringResource.getString("DUP_CHK"));
    int ret = JOptionPane.showOptionDialog(null,new Object[] { txt,lbl,choice,chk },StringResource.getString("DUP_TITLE"),JOptionPane.OK_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null);
    if (ret == JOptionPane.OK_OPTION) {
        int index = choice.getSelectedindex();
        if (chk.isSelected()) {
            config.duplicateLinkAction = index;
        }
        return index;
    }
    return -1;
}
项目:PTEAssistant    文件UserTableHeaderCellRenderer.java   
public UserTableHeaderCellRenderer(JTable table) {
    this.tableModel = (UserTableModel) table.getModel();
    this.tableHeader = table.getTableHeader();
    selectBox = new JCheckBox(tableModel.getColumnName(0));
    selectBox.setSelected(false);
    tableHeader.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() > 0) {
                int selectColumn = tableHeader.columnAtPoint(e.getPoint());
                if (selectColumn == 0) {
                    boolean value = !selectBox.isSelected();
                    selectBox.setSelected(value);
                    tableModel.selectAll(value);
                    tableHeader.repaint();
                }
            }
        }
    });
}
项目:projetomcdonalds    文件ControlerAlteracaoLanche.java   
public ControlerAlteracaoLanche(AlteracaoLanche alteracaoLanche,Lanche lanche,vendas tela) {
    this.alteracaoLanche = alteracaoLanche;
    this.lanche = lanche;
    this.telavenda = tela;

    this.alteracaoLanche.getBtn_Cancelar().addActionListener(this);
    this.alteracaoLanche.getBtn_Finalizar().addActionListener(this);
    for (JCheckBox botao : this.alteracaoLanche.getBotoes()) {
        botao.addActionListener(this);
    }

    getDados();
    iniciaCheckBox();
    marcarCheck();

    this.alteracaoLanche.setVisible(true);
    this.alteracaoLanche.toFront();
    this.alteracaoLanche.setLocationRelativeto(this.telavenda);
    this.alteracaoLanche.setVisible(true);
}
项目:jdigitalSimulator    文件Application.java   
private JPanel createTitlePanel() {
    JPanel title = new JPanel(new BorderLayout());
    title.add(Guitilities.createGradientTitle(getTranslation("components.title")),BorderLayout.norTH);

    JPanel interact = new JPanel();
    interact.setBackground(UIManager.getColor(Guitilities.SUB_PANEL_BACKGROUND));
    interact.setLayout(new BoxLayout(interact,BoxLayout.X_AXIS));
    interact.setBorder(new CompoundBorder(Guitilities.CHISEL_BORDER,new EmptyBorder(12,8,12,8)));
    final JCheckBox checkImages = new JCheckBox(getTranslation("group.images"),true);
    checkImages.setBackground(UIManager.getColor(Guitilities.SUB_PANEL_BACKGROUND));
    checkImages.addActionListener(new ActionListener() {
        @Override public void actionPerformed(ActionEvent event) {
            for(ComponentButton button:componentButtons)
                button.setIconVisible(checkImages.isSelected());
            for(CollapsiblePanel panel:collapsiblePanels)
                panel.setExpanded(false);
        }
    });
    interact.add(checkImages);
    title.add(interact,BorderLayout.CENTER);
    return title;
}
项目:incubator-netbeans    文件CodeTemplatesOperator.java   
public CodeTemplatesOperator setContext(Set<String> set) {
    JTabbedPaneOperator tabbedPane = getTabbedPane();
    tabbedPane.selectPage("Contexts");
    ContainerOperator<JEditorPane> selectedComponent = new ContainerOperator<>((Container)tabbedPane.getSelectedComponent());
    JListOperator list = new JListOperator(selectedComponent);
    for (int i = 0; i < list.getModel().getSize(); i++) {
        JCheckBox checkBox = (JCheckBox) list.getRenderedComponent(i);
        String contextName = checkBox.getText();
        list.scrollToItem(i);
        if(!checkBox.isSelected() && set.contains(contextName)) {
            list.selectItem(i);
        } else if(checkBox.isSelected() && !set.contains(contextName)) {
            list.selectItem(i);
        }            
    }   
    return this;

}
项目:Tarski    文件SimpleGUI.java   
/** This method performs Edit->Find. */
private Runner doFind() {
    if (wrap) return wrapMe();
    JTextField x = OurUtil.textfield(lastFind,30);
    x.selectAll();
    JCheckBox c = new JCheckBox("Case Sensitive?",lastFindCaseSensitive);
    c.setMnemonic('c');
    JCheckBox b = new JCheckBox("Search Backward?",!lastFindForward);
    b.setMnemonic('b');
    if (!OurDialog.getInput("Find","Text:",x," ",c,b)) return null;
    if (x.getText().length() == 0) return null;
    lastFind = x.getText();
    lastFindCaseSensitive = c.getModel().isSelected();
    lastFindForward = !b.getModel().isSelected();
    doFindNext();
    return null;
}
项目:jdk8u-jdk    文件Test7024235.java   
public void run() {
    if (this.pane == null) {
        this.pane = new JTabbedPane();
        this.pane.addTab("1",new Container());
        this.pane.addTab("2",new JButton());
        this.pane.addTab("3",new JCheckBox());

        JFrame frame = new JFrame();
        frame.add(BorderLayout.WEST,this.pane);
        frame.pack();
        frame.setVisible(true);

        test("first");
    }
    else {
        test("second");
        if (this.passed || AUTO) { // do not close a frame for manual review
            SwingUtilities.getwindowAncestor(this.pane).dispose();
        }
        this.pane = null;
    }
}
项目:VASSAL-src    文件ReportState.java   
public Ed(ReportState piece) {

      Box = new JPanel();
      Box.setLayout(new BoxLayout(Box,BoxLayout.Y_AXIS));
      descInput = new StringConfigurer(null,"Description:  ",piece.description);
      Box.add(descInput.getControls());
      keys = new NamedKeystrokeArrayConfigurer(null,"Report on these keystrokes:  ",piece.keys);
      Box.add(keys.getControls());
      cycle = new JCheckBox("Cycle through different messages?");
      Box.add(cycle);
      format = new PlayerIdFormattedStringConfigurer(null,"Report format:  ",new String[]{COMMAND_NAME,OLD_UNIT_NAME,NEW_UNIT_NAME,MAP_NAME,OLD_MAP_NAME,LOCATION_NAME,OLD_LOCATION_NAME});
      format.setValue(piece.reportFormat);
      Box.add(format.getControls());
      cycleFormat = new StringArrayConfigurer(null,"Message formats",piece.cycleReportFormat);
      Box.add(cycleFormat.getControls());
      cycleDownKeys = new NamedKeystrokeArrayConfigurer(null,"Report prevIoUs message on these keystrokes:  ",piece.cycleDownKeys);
      Box.add(cycleDownKeys.getControls());
      ItemListener l = new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          format.getControls().setVisible(!cycle.isSelected());
          cycleFormat.getControls().setVisible(cycle.isSelected());
          cycleDownKeys.getControls().setVisible(cycle.isSelected());
          Window w = SwingUtilities.getwindowAncestor(Box);
          if (w != null) {
            w.pack();
          }
        }
      };
      l.itemStateChanged(null);
      cycle.addItemListener(l);
      cycle.setSelected(piece.cycleReportFormat.length > 0);
    }
项目:A-Pathfinding-Visualization    文件ControlHandler.java   
public JCheckBox getC(String t) {
    for(int i = 0; i < checks.size(); i++) {
        if(checks.get(i).getName().equals(t)) {
            return checks.get(i);
        }
    }
    return null;
}
项目:openjdk-jdk10    文件Test4520754.java   
public static void main(String[] args) {
    // ensure that 4168475 does not regress
    test4168475(Component.class);
    // AWT classes (com.sun.beans.infos.ComponentBeanInfo)
    test(null,Button.class,Component.class,List.class,Menu.class,Panel.class);
    // Swing classes (dt.jar)
    test(null,JApplet.class,JButton.class,JCheckBox.class);
    // user defined classes
    test(Boolean.TRUE,Wombat.class,Foo.class,FooBar.class);
}
项目:gchisto    文件GUIUtilities.java   
/**
 * It creates a new check Box for inclusion in a table and sets 
 * its "is selected" attribute to the given value.
 * 
 * @param selected It determines whether the newly-created check Box
 * will be selected or not.
 * @return A new check Box for inclusion in a table.
 */
static public JCheckBox createJCheckBoxForTable(boolean selected) {
    JCheckBox checkBox = new JCheckBox();
    checkBox.setopaque(true);
    checkBox.setHorizontalAlignment(SwingConstants.CENTER);
    checkBox.setForeground(TABLE_COMPONENT_FG_COLOR);
    checkBox.setBackground(TABLE_COMPONENT_BG_COLOR);
    checkBox.setSelected(selected);
    return checkBox;
}
项目:Equella    文件AttachmentsSectionConfig.java   
@Override
public void setup()
{
    showFull = new JCheckBox(s("showfullscreen"));
    showFullNewWindow = new JCheckBox(s("showfullscreen.newwindow"));
    modeStructured = new JRadioButton(s("displaymode.structured.title"));
    modeThumbnail = new JRadioButton(s("displaymode.thumbnail.title"));
    MetadataTarget = new MultiTargetChooser(schemaModel,"");

    ButtonGroup bg = new ButtonGroup();
    bg.add(modeStructured);
    bg.add(modeThumbnail);

    changeDetector = new ChangeDetector();
    changeDetector.watch(showFull);
    changeDetector.watch(showFullNewWindow);
    changeDetector.watch(modeStructured);
    changeDetector.watch(modeThumbnail);
    changeDetector.watch(MetadataTarget);

    setLayout(new MigLayout("wrap","[]"));

    super.setup();

    add(new JLabel(s("fullscreen")),"gaptop 2u");
    add(showFull,"gap 2i");
    add(showFullNewWindow,"gap 2i");

    add(new JLabel(s("displaymode")),"gaptop 2u");

    add(modeStructured,"gap i*2");
    add(new JLabel("<html>" + s("displaymode.structured.description")),"gap i*4");

    add(modeThumbnail,"gap i*2");
    add(new JLabel("<html>" + s("displaymode.thumbnail.description")),"gap i*4");

    add(new JLabel(s("restrict")),"gaptop 2u,grow");
    add(new JLabel("<html>" + s("restrict.help")),"gap 2i");
    add(MetadataTarget,"grow,gap 2i");
}
项目:Equella    文件SearchSetInheritance.java   
public SearchSetInheritance(final EntityCache cache,final ClientService clientService)
{
    final JLabel schemasLabel = new JLabel(
        getString("searchset.searchsetinheritance.inheritschemas")); //$NON-NLS-1$
    final JLabel itemDefsLabel = new JLabel(
        getString("searchset.searchsetinheritance.inheritcollections")); //$NON-NLS-1$

    inheritFreetext = new JCheckBox(
        getString("searchset.searchsetinheritance.inheritfreetext")); //$NON-NLS-1$
    schemasModel = new InheritedTableModel<Schema,SchemaScript>(cache.getSchemaMap(),SchemaScript.class,getString("searchset.searchsetinheritance.schema")); //$NON-NLS-1$
    itemDefsModel = new InheritedTableModel<ItemDeFinition,ItemDeFinitionScript>(cache.getItemDeFinitionMap(),ItemDeFinitionScript.class,getString("searchset.searchsetinheritance.collection")); //$NON-NLS-1$

    final JTable schemasTable = generateTable(schemasModel,clientService);
    final JTable itemDefTable = generateTable(itemDefsModel,clientService);

    final int height1 = inheritFreetext.getPreferredSize().height;
    final int height2 = schemasLabel.getPreferredSize().height;

    final int[] rows = {height1,height2,cols));

    add(inheritFreetext,1));

    add(schemasLabel,1));
    add(new JScrollPane(schemasTable),2,1));

    add(itemDefsLabel,3,1));
    add(new JScrollPane(itemDefTable),4,1));

    changeDetector = new ChangeDetector();
    changeDetector.watch(inheritFreetext);
    changeDetector.watch(schemasModel);
    changeDetector.watch(itemDefsModel);
}
项目:sumo    文件ActionDialog.java   
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FirsT:event_jButton1ActionPerformed
    this.setVisible(false);
    try {
        //String[] args = new String[components.size() ];
        this.actionArgs=new HashMap<>();
        int i = 0;
        for (JComponent c : components.values()) {
            if (c instanceof JTextField) {
                //args[i++]= ((JTextField) c).getText();
                actionArgs.put(((JTextField) c).getName(),((JTextField) c).getText());
            } else if (c instanceof JComboBox) {
                //args[i++] = ((JComboBox) c).getSelectedItem() + "";
                actionArgs.put(((JComboBox) c).getName(),((JComboBox) c).getSelectedItem() + "");
            }
            else if (c instanceof JCheckBox) {
               // args[i++] = ((JCheckBox) c).isSelected() + "";
                actionArgs.put(((JCheckBox) c).getName(),((JCheckBox) c).isSelected() + "");
            }
            /* else if (c instanceof DateControl) {
                args[i++] = new Timestamp(((DateControl) c).getDate().getTime()).toString();
            }*/
        }
        ok=true;
    } catch (Exception ex) {
        logger.error(ex.getMessage(),ex);
        ok=false;
    }
}
项目:VisualGraphviz    文件MainFrame.java   
private void addCheckBox() {
    /* isDirected */

    directed = new JCheckBox("isDirected");
    directed.setBounds(635,17,125,20);
    directed.setFont(checkBoxFont);
    directed.setMargin(DEFAULT_INSETS);

    /* hasWight */

    weight = new JCheckBox("hasWeight");
    weight.setBounds(530,20);
    weight.setFont(checkBoxFont);
    weight.setMargin(DEFAULT_INSETS);
}
项目:BaseClient    文件EffectUtil.java   
/**
 * Prompts the user for boolean value
 * 
 * @param name The name of the dialog to show
 * @param currentValue The current value to be displayed
 * @param description The help text to provide
 * @return The value selected by the user
 */
static public Value booleanValue (String name,final boolean currentValue,final String description) {
    return new DefaultValue(name,String.valueOf(currentValue)) {
        public void showDialog () {
            JCheckBox checkBox = new JCheckBox();
            checkBox.setSelected(currentValue);
            if (showValueDialog(checkBox,description)) value = String.valueOf(checkBox.isSelected());
        }

        public Object getobject () {
            return Boolean.valueOf(value);
        }
    };
}
项目:Equella    文件InternalDataSourceChoice.java   
public InternalDataSourceChoice()
{
    super(new MigLayout("wrap 1"));

    allowNewTerms = new JCheckBox(getString("internal.allownewterms"));

    add(new JLabel("<html>" + getString("internal.choicedescription")));
    add(allowNewTerms);

    changeDetector.watch(allowNewTerms);
}
项目:gate-core    文件CheckBoxTableCellRenderer.java   
public CheckBoxTableCellRenderer() {
  super();

  // centre the checkBox within the cell
  setHorizontalAlignment(JCheckBox.CENTER);

  // make sure we always paint the cell border
  setBorderPainted(true);

  // make sure we always paint the background
  setopaque(true);
}
项目:incubator-netbeans    文件DataViewUI.java   
@Override
public void actionPerformed(ActionEvent e) {
    JCheckBox source = (JCheckBox) e.getSource();
    int index = Integer.parseInt(e.getActionCommand());
    Set<Integer> currentVisibleColumns = dataPanel.getVisibleColumns();
    if (source.isSelected()) {
        currentVisibleColumns.add(index);
    } else {
        currentVisibleColumns.remove(index);
    }
    dataPanel.setVisibleColumns(currentVisibleColumns);
}
项目:jaer    文件ControlPanel.java   
void addTip(Controllable f,JCheckBox label) {
    String s = f.getPropertyTooltip(label.getText());
    if (s == null) {
        return;
    }
    label.setToolTipText(s);
    label.setForeground(Color.BLUE);
}
项目:AgentWorkbench    文件TableCellRenderer4CheckBox.java   
public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column) {

    JCheckBox checkBox = new JCheckBox();
    checkBox.setSelected((Boolean) value);
    checkBox.setHorizontalAlignment(SwingConstants.CENTER);
    checkBox.setopaque(true);
    GraphGlobals.Colors.setTableCellRendererColors(checkBox,row,isSelected);
    return checkBox;
}
项目:incubator-netbeans    文件DefaultFoldingOptions.java   
private void updateChecker(String prefKey,JCheckBox cb,FoldType ft) {
    if (lastChangedCB == cb) {
        // ignore
        lastChangedCB = null;
        return;
    }
    boolean val = isCollapseEnabled(ft);
    ignoreStateChange = true;
    LOG.log(Level.FINE,"Updating checker: " + prefKey + ",setSelected " + val); // NOI18N
    cb.setSelected(val);
    ignoreStateChange = false;
}
项目:progetto-C    文件EmitterList.java   
/**
 * @see javax.swing.DefaultListCellRenderer#getListCellRendererComponent(javax.swing.JList,java.lang.Object,int,boolean,boolean)
 */
public Component getListCellRendererComponent(JList list,final Object value,int index,boolean cellHasFocus) {
    JLabel label = (JLabel) super.getListCellRendererComponent(list,value,index,isSelected,cellHasFocus);

    final JCheckBox Box = new JCheckBox(label.getText());
    Box.setBackground(label.getBackground());

    Box.setSelected(((ConfigurableEmitter) value).isEnabled());
    checks.put(value,Box);

    return Box;
}
项目:Hollow-Knight-SaveManager    文件CharmPanel.java   
public static List<CharmPanel> createCharmPanels(JsonObject playerData,Notches notches,JCheckBox autoCalc,JCheckBox overcharmed){
    List<CharmPanel> out = new ArrayList<CharmPanel>(); 
    for( int i = 0; i < 40; i++){
        CharmPanel charm = new CharmPanel(i,charmNames[i],playerData,notches,autoCalc,overcharmed);
        out.add(charm);
    }
    Collections.sort(out);
    return out;
}
项目:Equella    文件MultiEditor.java   
private JComponent createDetails()
{
    JLabel titleLabel = new JLabel(CurrentLocale.get("wizard.controls.title")); //$NON-NLS-1$
    JLabel descriptionLabel = new JLabel(CurrentLocale.get("wizard.controls.description")); //$NON-NLS-1$

    title = new I18nTextField(BundleCache.getLanguages());
    description = new I18nTextField(BundleCache.getLanguages());
    mandatory = new JCheckBox(CurrentLocale.get("wizard.controls.mandatory")); //$NON-NLS-1$

    final int height1 = title.getPreferredSize().height;
    final int width1 = descriptionLabel.getPreferredSize().width;

    final int[] rows = {height1,height1,};
    final int[] cols = {width1,TableLayout.DOUBLE_FILL,};

    JPanel all = new JPanel(new TableLayout(rows,cols,5,5));

    all.add(titleLabel,1));
    all.add(title,new Rectangle(1,1));

    all.add(descriptionLabel,1));
    all.add(description,1));

    all.add(mandatory,1));

    return all;
}
项目:incubator-netbeans    文件DefaultOutlineCellRenderer.java   
final JCheckBox createCheckBox() {
    JCheckBox cb = new JCheckBox();
    cb.setSize(cb.getPreferredSize());
    cb.setBorderPainted(false);
    cb.setopaque(false);
    return cb;
}
项目:jmeter-prometheus-plugin    文件PrometheusListenerGui.java   
protected JPanel createLabelsPanel() {
    HorizontalPanel panel = new HorizontalPanel();
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),"Labels"));

    this.codeCheckBox = new JCheckBox("Code");
    panel.add(this.codeCheckBox);

    this.labelsCheckBox = new JCheckBox("Jmeter Labels");
    panel.add(this.labelsCheckBox);

    this.successCheckBox = new JCheckBox("Success");
    panel.add(this.successCheckBox);

    return panel;
}
项目:appinventor-extensions    文件aimerger.java   
private static JCheckBox[] getScreenCheckBoxes(AIProject project,boolean isMainProject) {
  List<AIScreen> tempScreensList = project.getScreensList();
  JCheckBox[] screenCheckBoxLabels = new JCheckBox[1 + tempScreensList.size()];
  screenCheckBoxLabels[0] = new JCheckBox("Check All");
  for (int i = 1; i <= tempScreensList.size(); i++) {
    String tempScreenName = tempScreensList.get(i - 1).getName();
    if (tempScreenName.equals("Screen1") && isMainProject) {
      screenCheckBoxLabels[i] = new JCheckBox(tempScreenName,true);
    } else {
      screenCheckBoxLabels[i] = new JCheckBox(tempScreenName);
    }
  }
  return screenCheckBoxLabels;
}
项目:geomapapp    文件CustomDB.java   
protected Component createThumbsCheckBox() {
    thumbsB = new JCheckBox("<html>Image Viewer</html>",true);
    thumbsB.setSize(45,45);
    thumbsB.addActionListener(this);
    thumbsB.setActionCommand("thumb");
    thumbsB.setEnabled(false);
    return thumbsB;
}
项目:incubator-netbeans    文件NodeTableModel.java   
void makeAccessibleCheckBox(JCheckBox Box,Property p) {
    Box.getAccessibleContext().setAccessibleName(p.getdisplayName());
    Box.getAccessibleContext().setAccessibleDescription(p.getShortDescription());

    Object mnemonicChar = p.getValue(ATTR_MNEMONIC_CHAR);

    if ((null != mnemonicChar) && (mnemonicChar.toString().length() > 0)) {
        Box.setMnemonic(mnemonicChar.toString().charat(0));
    }
}
项目:BachSys    文件TelaPrincipal.java   
private void adicionarPainelListaMusica() {
        painelListaMusica = new Painel(600,550);
        adicionarComponente(painelListaMusica,GridBagConstraints.CENTER,GridBagConstraints.BOTH,2);
//        painelListaMusica.setBackground(Color.red);



        criaTabelaMusicas(musicas,false);

        BoxMusicasUsuario = new JCheckBox("Ver apenas minhas músicas");
        painelListaMusica.adicionarComponente(BoxMusicasUsuario,GridBagConstraints.WEST,GridBagConstraints.NONE,0.1,0.1);
        adicionarBarraBusca();
    }

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。