public BSelecteurCheckBox(final String _property) { this(_property, new BuCheckBox()); }
/** * @return l'tat de la case "ne plus demander" */ public boolean getDoNotAskValue(){ return doNotAsk_.isSelected(); }
private void updateComponents() { cbAstuceVisible_.setSelected(options_.getBooleanProperty(ASTUCES_VISIBLES_PREF, true)); }
public BuCheckBox(String _text, Icon _icon, boolean _selected) { super(); setIcon(_icon); setText(_text); setSelected(_selected); }
public void actionPerformed(final ActionEvent _evt){ if (_evt.getSource() == allLocal_) { boolean b = allLocal_.isSelected(); doNotAsk_.setEnabled(b); t_.setEnabled(!b); if (b) { for (int i = 0; i < this.distant_.length; i++) { distant_[i] = false; } ((AbstractTableModel) t_.getModel()).fireTableDataChanged(); } } }
public FudaaStartupExitPreferencesPanel(final boolean _update) { setLayout(new BuVerticalLayout()); if (_update) { cbUpdate_ = new BuCheckBox(); cbUpdate_.setText(FudaaLib.getS("Tester les mises jour au dmarrage")); cbUpdate_.addActionListener(this); add(cbUpdate_); } else { cbUpdate_ = null; } cbSplash_ = new BuCheckBox(); cbSplash_.setText(FudaaLib.getS("Bannire l'ouverture (splash screen)")); cbSplash_.setToolTipText(FudaaLib.getS("Si activ, une bannire est affiche lors du lancement de l'application")); cbSplash_.addActionListener(this); add(cbSplash_); cbExit_ = new BuCheckBox(); cbExit_.setText(FudaaLib.getS("Confirmer la fermeture")); cbExit_.setToolTipText(FudaaLib .getS("Si activ, une bote de dialogue demande l'utilisateur de confirmer la fermeture de l'application")); cbExit_.addActionListener(this); add(cbSplash_); add(cbExit_); cancelPreferences(); }
/** * @param _s le coeur */ public FudaaDodicoSelectionFirstPanel(final FudaaDodicoSelectionServeur _s) { srv_ = _s; distant_ = new boolean[srv_.getNbServeur()]; setLayout(new BuVerticalLayout(5)); allLocal_ = new BuCheckBox(FudaaLib.getS("Connexion(s) locale(s) uniquement")); allLocal_.addActionListener(this); add(allLocal_); doNotAsk_ = new BuCheckBox(FudaaLib.getS("Toujours se connecter localement")); doNotAsk_.setBorder(BorderFactory.createEmptyBorder(0, 10, 15, 0)); doNotAsk_.setSelected(_s.getAllLocalPref()); add(doNotAsk_); doNotAsk_.setEnabled(false); add(doNotAsk_); t_ = new JTable(new ServeurTypeTableModel()); t_.getColumnModel().getColumn(0).setCellRenderer(new ServeurCellRenderer()); final TableColumn c2 = t_.getColumnModel().getColumn(1); c2.setCellEditor(new CtuluCellBooleanEditor()); c2.setCellRenderer(new BooleanCellRenderer()); final BuScrollPane sp = new BuScrollPane(t_); sp.setPreferredHeight(300); add(sp); }
b.add(menu); if (showSelectedRows(table_)) { final BuCheckBox bc = new BuCheckBox(); bc.setText(EbliLib.getS("Afficher les objets slectionns uniquement")); bc.setActionCommand("CHANGE_SELECT"); bc.setEnabled(selectedLine_ != null); bc.setSelected(selectedLine_ != null); bc.addItemListener(this); b.add(bc);
for(int i=0;i<CODES.length;i++) cbEtats_[i]=new BuCheckBox(); cbEtats_[i].setName("cb"+CODES[i][4]); cbEtats_[i].setActionCommand(CODES[i][4]); cbEtats_[i].setText(getS(CODES[i][2])); cbEtats_[i].addActionListener(this); q.add(cbEtats_[i]); BuLabel lb=new BuLabel(); cbEtats_[i].setSelected("true".equals(CODES[i][1]));
pn_.setLayout(new BuGridLayout(2, 5, 5)); pn_.add(new BuLabel(EbliResource.EBLI.getString("Visible"))); cbVisible_ = new BuCheckBox(); pn_.add(cbVisible_); cbRapide_ = new BuCheckBox(); pn_.add(new BuLabel(EbliResource.EBLI.getString("Rapide"))); pn_.add(cbRapide_); cbFilaire_ = new BuCheckBox(); pn_.add(new BuLabel(EbliResource.EBLI.getString("Filaire"))); pn_.add(cbFilaire_); pn_.add(pnColor); pn_.add(new BuLabel(EbliResource.EBLI.getString("Ombrage"))); cbOmbre_ = new BuCheckBox(); pn_.add(cbOmbre_); pn_.add(new BuLabel(EbliResource.EBLI.getString("Texture"))); pn_.add(txt_.getPanel()); cbOmbre_.addActionListener(this); cbVisible_.addActionListener(this); cbRapide_.addActionListener(this); cbFilaire_.addActionListener(this); btColorApply_.addActionListener(this); btColor_.addActionListener(this);
private JPanel createDecimalPanel() { if (pnDecimalFormat_ != null) { return pnDecimalFormat_; } pnDecimalFormat_ = new BuPanel(new BuGridLayout(2, 5, 5)); cbISExp_ = new BuCheckBox(); tfFraction_ = BuTextField.createIntegerField(); final CtuluValueValidator min = new CtuluValueValidator.IntMin(0); tfFraction_.setToolTipText(min.getDescription()); tfFractionMin_.setToolTipText(min.getDescription()); cbISExp_.setSelected(decimalFormat_.toPattern().indexOf('E') > 0); BuLabel buLabel = new BuLabel(CtuluLib.getS("Nombre de dcimales max")); pnDecimalFormat_.add(buLabel); tfFraction_.getDocument().addDocumentListener(fraction); tfFractionMin_.getDocument().addDocumentListener(fraction); cbISExp_.addItemListener(new ItemListener() {
cbOrig_=new BuCheckBox(BuResource.BU.getString("Origine fixe")); cbOrig_.setToolTipText(BuResource.BU.getString("Si non activ, le centre de l'enveloppe des objets slectionns est pris")); cbOrig_.addActionListener(this); lbX0_=new BuLabel("x0:"); lbY0_=new BuLabel("y0:"); add(pnButtons,BorderLayout.EAST); cbOrig_.setSelected(false); tfX0_.setEnabled(false); tfY0_.setEnabled(false);
protected void build() { BuGridLayout lo=new BuGridLayout(2,5,5,true,true,false,false); lo.setSameWidth(true); lo.setSameHeight(true); BuPanel p1=new BuPanel(lo); p1.setBorder (new CompoundBorder (new BuTitledBorder(getTitle()), EMPTY5555)); cbEtats_=new BuCheckBox[NBL]; for(int i=0;i<NBL;i++) { cbEtats_[i]=new BuCheckBox(getS(INTITULES[i])); cbEtats_[i].setName("cb"+CODES[i].replace('.','_').toUpperCase()); cbEtats_[i].setActionCommand(CODES[i].replace('.','_').toUpperCase()); cbEtats_[i].addActionListener(this); p1.add(cbEtats_[i]); } add(p1); }
ltTaille_ .addListSelectionListener(this); cbBold_ =new BuCheckBox("Bold" ); cbItalic_ =new BuCheckBox("Italic" ); cbUnderlined_ =new BuCheckBox("Underlined" ); cbCrossed_ =new BuCheckBox("Crossed" ); cbSmallcaps_ =new BuCheckBox("Small caps" ); cbCondensed_ =new BuCheckBox("Condensed" ); cbExpanded_ =new BuCheckBox("Expanded" ); cbTransparent_=new BuCheckBox("Transparent"); cbSmallcaps_.setEnabled(false); bg.add(rbBlur_ ); cbBold_ .addActionListener(this); cbItalic_ .addActionListener(this); cbUnderlined_ .addActionListener(this); cbCrossed_ .addActionListener(this); cbSmallcaps_ .addActionListener(this); cbCondensed_ .addActionListener(this); cbExpanded_ .addActionListener(this); cbTransparent_.addActionListener(this);
if (!isDiscreteTarget_) { if (cbChangedLeg_ == null) { cbChangedLeg_ = new BuCheckBox(EbliLib.getS("Label") + suff); cbChangedLeg_.addItemListener(new ItemListener() {
public void setTarget(final BControleAffichageTarget _target) { target_ = _target; txt_.setSrc(target_); setEnable(target_ != null); if (target_ != null) { cbOmbre_.setSelected(target_.isEclairage()); cbRapide_.setSelected(target_.isRapide()); cbRapide_.setEnabled(target_.isRapideEditable()); cbVisible_.setSelected(target_.isVisible()); cbFilaire_.setSelected(target_.isFilaire()); cbFilaire_.setEnabled(target_.isFilaireEditable()); icColor_.setCouleur(target_.getCouleur()); btColor_.repaint(); updateApplyBt(); } }
private void setEnable(final boolean _b) { cbOmbre_.setEnabled(_b); cbRapide_.setEnabled(_b); cbFilaire_.setEnabled(_b); cbVisible_.setEnabled(_b); btColor_.setEnabled(_b); btColorApply_.setEnabled(_b); }
public BuCheckBox(String _text) { super(); setText((_text == null) ? "" : _text); }
cbFallBack_=new BuCheckBox("Fall back on english",false); cbFallBack_.addActionListener(this);
|| _defautFormatter[_defautFormatter.length - 1] instanceof CtuluDurationFormatter) { addLabel(CtuluLib.getS("Afficher les valeurs nulles:")); cbZeroUsed_ = new BuCheckBox(); cbZeroUsed_.setSelected(_selectedFormatter != null && (_selectedFormatter instanceof CtuluDurationFormatter) && ((CtuluDurationFormatter) _selectedFormatter).isAlwaysDisplayZero()); cbZeroUsed_.addItemListener(this); add(cbZeroUsed_);