public CategoryNodeRenderer() { _panel.setBackground(UIManager.getColor("Tree.textBackground")); if (_sat == null) { // Load the satellite image. String resource = "/org/apache/log4j/lf5/viewer/images/channelexplorer_satellite.gif"; URL satURL = getClass().getResource(resource); _sat = new ImageIcon(satURL); } setOpaque(false); _checkBox.setOpaque(false); _panel.setOpaque(false); // The flowlayout set to LEFT is very important so that the editor // doesn't jump around. _panel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); _panel.add(_checkBox); _panel.add(this); setOpenIcon(_sat); setClosedIcon(_sat); setLeafIcon(_sat); }
public FileTreeNode(File file, FileTreeNode parent) { super(file); this.setParent(parent); this.file = file; boolean isLeaf = file.isFile(); if(isLeaf) { check = new JCheckBox(this.toString(),isLeaf); check.setOpaque(true); check.setBackground(Color.WHITE); } else label = new JLabel(this.toString()); this.setAllowsChildren(!isLeaf); }
@Override public void setOpaque(boolean isOpaque) { if (!isOpaque) { super.setOpaque(isOpaque); } }
public MarkTableRenderer() { super(); checkBox = new JCheckBox(); checkBox.setOpaque(true); }
public JComponent create() { JCheckBox checkbox = new JCheckBox(); checkbox.setText(""); checkbox.setOpaque(false); return checkbox; }
public JComponent create() { JCheckBox checkbox = new JCheckBox(); checkbox.setText(""); checkbox.setOpaque(false); return checkbox; }
public CheckCellEditor() { super(); check = new JCheckBox(); add(check, BorderLayout.CENTER); check.setOpaque(false); check.addActionListener(this); }
public CheckCellRenderer() { super(); check = new JCheckBox(); add(check, BorderLayout.CENTER); check.setOpaque(false); }
public void updateUI() { super.updateUI(); if (m_panel != null) { m_panel.setBackground(javax.swing.UIManager.getColor("TextField.background")); m_cbox.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 4, 2, 2)); m_cbox.setOpaque(false); } } };
private JCheckBox createCheckBox(final String label, final boolean selected) { final JCheckBox checkBox = new JCheckBox(label, selected); checkBox.setOpaque(false); checkBox.setForeground(WidgetUtils.BG_COLOR_BRIGHTEST); checkBox.addItemListener(item -> onSettingsUpdated(false)); return checkBox; }
private void addEntity(NamedOption ne) { JCheckBox cb = new JCheckBox(); Mnemonics.setLocalizedText(cb, ne.getDisplayName()); if (ne.getDescription() != null) { cb.setToolTipText(ne.getDescription()); } cb.setOpaque(false); entities.add(new Entity(ne, cb)); cb.addActionListener(this); }
public CheckBoxTreeRenderer() { setLayout(new BorderLayout()); setOpaque(true); this.check = new JCheckBox(); this.label = new JLabel(); add(check, BorderLayout.WEST); add(label, BorderLayout.CENTER); check.setOpaque(false); label.setOpaque(false); }
protected JCheckBox getCheckBox() { if (checkBox == null) { checkBox = new JCheckBox(I18nAdapter.getAdapter().getString( GUIStringKeys.SELECT_DESELECT_ALL.getKey())); checkBox.setOpaque(false); } return checkBox; }
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); }
@Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { profile = (ProfileWrapper) value; final JCheckBox checkBox = (JCheckBox) getComponent(); checkBox.setText(profile.getProfile().getName()); checkBox.setSelected(profile.isSelected()); checkBox.setOpaque(false); return checkBox; }
@Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { profile = (ProfileWrapper) value; final JCheckBox checkBox = (JCheckBox) getComponent(); checkBox.setText(profile.getProfile().getName()); checkBox.setSelected(profile.isSelected()); checkBox.setOpaque(false); return checkBox; }
public CheckTreeCellRenderer() { setLayout(new BorderLayout()); setOpaque(false); checkBox.setOpaque(false); // --- Workaround for #205932 - not sure why, but works fine... Font f = UIManager.getFont("Label.font"); // NOI18N if (f != null) treeRenderer.setFont(f.deriveFont(f.getStyle())); // --- add(checkBox, BorderLayout.WEST); }
private CheckBoxRenderer() { super(new FlowLayout(FlowLayout.CENTER, 0, 0)); add(checkBox = new JCheckBox()); add(label = new JLabel()); label.setIconTextGap(1); checkBox.setOpaque(false); checkBox.setMargin(new Insets(0, 0, 0, 0)); setOpaque(false); setEnabled(true); setBorder(null); }
public BooleanEditor() { super(new SubstanceEditorCheckBox()); JCheckBox checkBox = (JCheckBox) getComponent(); checkBox.setOpaque(false); checkBox.setHorizontalAlignment(JCheckBox.CENTER); } }
public BooleanEditor() { super(new SubstanceEditorCheckBox()); JCheckBox checkBox = (JCheckBox) getComponent(); checkBox.setOpaque(false); checkBox.setHorizontalAlignment(JCheckBox.CENTER); } }