private static JCheckBox addNewCheckbox(String text, String configString, Boolean configBool) { JCheckBox checkbox = new JCheckBox(text, Utils.getConfigBoolean(configString, configBool)); checkbox.setHorizontalAlignment(JCheckBox.RIGHT); checkbox.setHorizontalTextPosition(JCheckBox.LEFT); return checkbox; }
public CheapTimePanel() { setLayout(new BorderLayout()); groupByMachineCheckBox = new JCheckBox("Group by assigned machine", false); groupByMachineCheckBox.setHorizontalAlignment(SwingConstants.RIGHT); groupByMachineCheckBox.addActionListener(e -> { updatePanel(getSolution()); validate(); }); }
chkPiles.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); chkPiles.setMargin(new java.awt.Insets(3, 2, 2, 2)); chkPiles.addActionListener(evt -> chkPilesActionPerformed(evt));
private static JCheckBox createJCheckBox() { JCheckBox jCheckBox = new JCheckBox(); jCheckBox.setHorizontalAlignment(JLabel.CENTER); return jCheckBox; } }
showPlayerNamesPermanently.setText("Show player names on avatar permanently"); showPlayerNamesPermanently.setToolTipText("Instead showing the names only if you hover over the avatar with the mouse, the name is shown all the time."); showPlayerNamesPermanently.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); showPlayerNamesPermanently.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { displayLifeOnAvatar.setText("Display life on avatar image"); displayLifeOnAvatar.setToolTipText("Display the player's life over its avatar image."); displayLifeOnAvatar.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); displayLifeOnAvatar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { showAbilityPickerForced.setText("Show ability picker for abilities or spells without costs"); showAbilityPickerForced.setToolTipText("This prevents you from accidently activating abilities without other costs than tapping or casting spells with 0 mana costs."); showAbilityPickerForced.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); showAbilityPickerForced.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cbAllowRequestToShowHandCards.setText("Allow requests from players and spectators to show your hand cards"); cbAllowRequestToShowHandCards.setToolTipText("<html>This is the default setting used for your matches. If activated other players or spectators<br>\nof your match can send a request so you can allow them to see your hand cards."); cbAllowRequestToShowHandCards.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); cbAllowRequestToShowHandCards.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cbShowStormCounter.setText("Show the number of spell casts during the current turn"); cbShowStormCounter.setToolTipText("<html>Adds a little box left to the short keys line with the number<br>\nof spells already cast during the current turn (storm counter)."); cbShowStormCounter.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); cbShowStormCounter.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) {
private static JCheckBox createCeckbox(final JPanel panel, boolean enabled) { JCheckBox checkBox = new JCheckBox(); checkBox.setHorizontalAlignment(SwingConstants.CENTER); checkBox.setEnabled(enabled); panel.add(checkBox); return checkBox; }
public BooleanEditor() { super(new JCheckBox()); JCheckBox checkBox = (JCheckBox) getComponent(); checkBox.setHorizontalAlignment(JCheckBox.CENTER); }
public BooleanEditor() { super(new JCheckBox()); JCheckBox checkBox = (JCheckBox) getComponent(); checkBox.setHorizontalAlignment(JCheckBox.CENTER); } }
@Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { JCheckBox checkbox = (JCheckBox) editorComponent; checkbox.setSelected(value == null ? false : (Boolean) value); checkbox.setHorizontalAlignment(SwingConstants.LEFT); return super.getTableCellEditorComponent(table, value, isSelected, row, column); } }
public BooleanEditor() { super(new JCheckBox()); JCheckBox checkBox = (JCheckBox) getComponent(); checkBox.setHorizontalAlignment(JCheckBox.CENTER); }
public BooleanCellRenderer(TableCellRenderer delegate, JCheckBox checkBox, Predicate<?> predicate) { this.defaultDelegate = delegate; this.predicate = predicate; this.checkBox = checkBox; this.checkBox.setBorderPainted(true); this.checkBox.setHorizontalAlignment(JLabel.CENTER); }
public SelectedCellEditor( JCheckBox selectValuesCheckBox, JCheckBox multipleChoiceCheckBox ) { this.selectValuesCheckBox = selectValuesCheckBox; this.multipleChoiceCheckBox = multipleChoiceCheckBox; radioBtn = new JRadioButton(); checkbox = new JCheckBox(); radioBtn.setHorizontalAlignment( JRadioButton.CENTER ); checkbox.setHorizontalAlignment(JCheckBox.CENTER); radioBtn.addActionListener( (ActionListener)this ); checkbox.addActionListener( (ActionListener)this ); }
public BooleanCellRenderer(TableCellRenderer delegate) { //super(new BorderLayout()); this.checkBox = new JCheckBox(); add(checkBox, BorderLayout.CENTER); checkBox.setHorizontalAlignment(JLabel.CENTER); checkBox.setBorderPainted(true); this.defaultDelegate = delegate; }
/** Creates a new instance of BooleanTableCellRenderer */ public BooleanTableCellRenderer() { super(); super.setLayout(new BorderLayout(0, 0)); checkBox = new JCheckBox(); checkBox.setHorizontalAlignment(JCheckBox.CENTER); checkBox.setOpaque(false); add(checkBox, BorderLayout.CENTER); }
@Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { JComponent rendered = (JComponent) rendererDelegate.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (rendered instanceof JCheckBox) { JCheckBox checkBox = (JCheckBox)rendered; checkBox.setHorizontalAlignment(JLabel.CENTER); checkBox.setVerticalTextPosition(JLabel.TOP); checkBox.setBorderPainted(true); checkBox.setIcon(icon); } return rendered; }
private CheckBoxTableCellEditor() { super(new JCheckBox()); ((JCheckBox)getEditorComponent()).setHorizontalAlignment(JLabel.CENTER); ((JCheckBox)getEditorComponent()).setBorderPainted(true); }
private static void makeCellCheckBox(JCheckBox cb, Icon icon, Icon selIcon, String tooltip){ cb.setHorizontalAlignment(JCheckBox.CENTER); if(icon != null){ cb.setIcon(icon); } if(selIcon != null){ cb.setSelectedIcon(selIcon); } cb.setOpaque(true); cb.setToolTipText(tooltip); }
public BooleanCellRenderer(TableCellRenderer delegate, Icon icon) { //super(new BorderLayout()); this.checkBox = new JCheckBox(icon); add(checkBox, BorderLayout.NORTH); checkBox.setHorizontalAlignment(JLabel.CENTER); checkBox.setVerticalTextPosition(JLabel.TOP); checkBox.setBorderPainted(true); this.defaultDelegate = delegate; }
public BooleanEditor() { super(new SubstanceEditorCheckBox()); JCheckBox checkBox = (JCheckBox) getComponent(); checkBox.setOpaque(false); checkBox.setHorizontalAlignment(JCheckBox.CENTER); } }
CheckBoxRenderer() { if (com.izforge.izpack.util.OsVersion.IS_UNIX && !com.izforge.izpack.util.OsVersion.IS_OSX) { checkbox.setIcon(new LFIndependentIcon()); checkbox.setDisabledIcon(new LFIndependentIcon()); checkbox.setSelectedIcon(new LFIndependentIcon()); checkbox.setDisabledSelectedIcon(new LFIndependentIcon()); } checkbox.setHorizontalAlignment(CENTER); }