Exemplo n.º 1
0
 private JComponent createToolPanel() {
   JComponent box = Box.createVerticalBox();
   JCheckBox button = new JCheckBox(disablingItem.getText());
   button.setModel(disablingItem.getModel());
   box.add(Box.createGlue());
   box.add(button);
   box.add(Box.createGlue());
   JRadioButton blur = new JRadioButton(blurItem.getText());
   blur.setModel(blurItem.getModel());
   box.add(blur);
   JRadioButton emboss = new JRadioButton(embossItem.getText());
   emboss.setModel(embossItem.getModel());
   box.add(emboss);
   JRadioButton translucent = new JRadioButton(busyPainterItem.getText());
   translucent.setModel(busyPainterItem.getModel());
   box.add(translucent);
   box.add(Box.createGlue());
   return box;
 }
Exemplo n.º 2
0
  public void doSelectionLaf() {
    try {
      C_Configuration cConfiguration = new C_Configuration(false);

      Enumeration lEnumeration = SC_RadioLaf.getElements();

      // fenetrePrincipale.clearOnglets();
      while (lEnumeration.hasMoreElements()) {
        JRadioButtonMenuItem lItem = (JRadioButtonMenuItem) (lEnumeration.nextElement());
        if (lItem.isSelected()) {
          cConfiguration.setLaf(lItem.getText());
          break;
        }
      }
      fenetrePrincipale.updateTexte();
      // fenetrePrincipale.doSelectionArbre();
    } catch (FichierConfInexistantException e) {
      System.err.println("-----ERREUR GRAVE N°5-----");
    }
  }
Exemplo n.º 3
0
  public void chargerLaf() {
    MD_Laf.removeAll();
    // Groupe
    SC_RadioLaf = new ButtonGroup();

    // Look And Feel
    for (int i = 0; i < UIManager.getInstalledLookAndFeels().length; i++) {
      // Création d'un bouton radio
      JRadioButtonMenuItem OO_LookAndFeel =
          new JRadioButtonMenuItem(UIManager.getInstalledLookAndFeels()[i].getName());
      // Ajout au groupe
      SC_RadioLaf.add(OO_LookAndFeel);
      // Ajout du listener
      OO_LookAndFeel.addActionListener(actionLaf);
      // Si le look and feel courant correspond à l'élément
      if (OO_LookAndFeel.getText().equals(UIManager.getLookAndFeel().getName()))
        OO_LookAndFeel.setSelected(true);
      // Ajout au panel
      MD_Laf.add(OO_LookAndFeel);
    }
  }