@Override
  public void updateOptionsList() {
    myIsInSchemeChange = true;

    myLineSpacingField.setText(Float.toString(getLineSpacing()));
    FontPreferences fontPreferences = getFontPreferences();
    List<String> fontFamilies = fontPreferences.getEffectiveFontFamilies();
    myPrimaryCombo.setFontName(fontPreferences.getFontFamily());
    boolean isThereSecondaryFont = fontFamilies.size() > 1;
    myUseSecondaryFontCheckbox.setSelected(isThereSecondaryFont);
    mySecondaryCombo.setFontName(isThereSecondaryFont ? fontFamilies.get(1) : null);
    myEditorFontSizeField.setText(
        String.valueOf(fontPreferences.getSize(fontPreferences.getFontFamily())));

    boolean readOnly = ColorAndFontOptions.isReadOnly(myOptions.getSelectedScheme());
    myPrimaryCombo.setEnabled(!readOnly);
    mySecondaryCombo.setEnabled(isThereSecondaryFont && !readOnly);
    myOnlyMonospacedCheckBox.setEnabled(!readOnly);
    myLineSpacingField.setEnabled(!readOnly);
    myEditorFontSizeField.setEnabled(!readOnly);
    myUseSecondaryFontCheckbox.setEnabled(!readOnly);

    myEnableLigaturesCheckbox.setEnabled(!readOnly);
    myLigaturesInfoLinkLabel.setEnabled(!readOnly);
    myEnableLigaturesCheckbox.setSelected(fontPreferences.useLigatures());

    myIsInSchemeChange = false;
  }
  private void updateControls() {
    if (myCbReplaceWrite != null) {
      if (myCbReplaceAll.isSelected()) {
        myCbReplaceWrite.makeSelectable();
      } else {
        myCbReplaceWrite.makeUnselectable(true);
      }
    }

    if (myCbReplaceAll != null) {
      myTypeSelectorManager.setAllOccurrences(myCbReplaceAll.isSelected());
    } else {
      myTypeSelectorManager.setAllOccurrences(false);
    }

    if (myDeclareFinalIfAll && myCbReplaceAll != null && myCbReplaceAll.isSelected()) {
      myCbFinal.setEnabled(false);
      myCbFinal.setSelected(true);
    } else if (myCbReplaceWrite != null
        && myCbReplaceWrite.isEnabled()
        && myCbReplaceWrite.isSelected()) {
      myCbFinal.setEnabled(false);
      myCbFinal.setSelected(false);
    } else {
      myCbFinal.setEnabled(true);
      myCbFinal.setSelected(myCbFinalState);
    }
  }
  public void reset(CodeStyleSettings settings) {
    myCbUseFQClassNames.setSelected(settings.USE_FQ_CLASS_NAMES);
    myCbUseSingleClassImports.setSelected(settings.USE_SINGLE_CLASS_IMPORTS);
    myCbInsertInnerClassImports.setSelected(settings.INSERT_INNER_CLASS_IMPORTS);
    myClassCountField.setText(Integer.toString(settings.CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND));
    myNamesCountField.setText(Integer.toString(settings.NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND));

    myImportLayoutPanel.getImportLayoutList().copyFrom(settings.IMPORT_LAYOUT_TABLE);
    myPackageList.copyFrom(settings.PACKAGES_TO_USE_IMPORT_ON_DEMAND);
    myFqnInJavadocOption.reset(settings);

    myImportLayoutPanel
        .getCbLayoutStaticImportsSeparately()
        .setSelected(settings.LAYOUT_STATIC_IMPORTS_SEPARATELY);

    final JBTable importLayoutTable = myImportLayoutPanel.getImportLayoutTable();
    AbstractTableModel model = (AbstractTableModel) importLayoutTable.getModel();
    model.fireTableDataChanged();

    model = (AbstractTableModel) myPackageTable.getModel();
    model.fireTableDataChanged();

    if (importLayoutTable.getRowCount() > 0) {
      importLayoutTable.getSelectionModel().setSelectionInterval(0, 0);
    }
    if (myPackageTable.getRowCount() > 0) {
      myPackageTable.getSelectionModel().setSelectionInterval(0, 0);
    }
  }
Esempio n. 4
0
  public void setOptions(BeautiOptions options) {
    this.options = options;

    chainLengthField.setValue(options.chainLength);
    echoEveryField.setValue(options.echoEvery);
    logEveryField.setValue(options.logEvery);

    if (options.fileNameStem != null) {
      fileNameStemField.setText(options.fileNameStem);
    } else {
      fileNameStemField.setText(DEFAULT_FILE_NAME_STEM);
      fileNameStemField.setEnabled(false);
    }

    operatorAnalaysisCheck.setSelected(options.operatorAnalysis);

    updateOtherFileNames(options);

    if (options.contains(Microsatellite.INSTANCE)) {
      samplePriorCheckBox.setSelected(false);
      samplePriorCheckBox.setVisible(false);
    } else {
      samplePriorCheckBox.setVisible(true);
      samplePriorCheckBox.setSelected(options.samplePriorOnly);
    }

    optionsPanel.validate();
    optionsPanel.repaint();
  }
  private JPanel buildCheckboxPanel() {
    JPanel tp = new JPanel();

    tp.setBorder(BorderFactory.createTitledBorder("Webserver Options"));
    tp.setLayout(new GridLayout(1, 2));
    String doLocalServer = JConfig.queryConfiguration("server.enabled", "false");
    String doAllowSyndication = JConfig.queryConfiguration("allow.syndication", "true");

    localServerBrowseBox = new JCheckBox("Use internal web server");
    localServerBrowseBox.setToolTipText(
        "<html><body>Turning this on enables JBidwatchers internal web server; 'Show in Browser' will go through JBidwatcher<br>first, in order to allow it to show old/deleted auctions,and to avoid the need to log in regularly.<br>The internal web server is password protected with your auction server username/password.</body></html>");
    // localServerBrowseBox.setToolTipText("Turning this on enables JBidwatchers internal web
    // server; 'Show in Browser' will go through JBidwatcher first, in order to allow it to show
    // old/deleted auctions, and to avoid the need to log in regularly.  The internal web server is
    // password protected with your auction server username/password.");
    localServerBrowseBox.setSelected(doLocalServer.equals("true"));
    tp.add(localServerBrowseBox);

    openSyndication = new JCheckBox("Allow syndication to bypass authentication");
    openSyndication.setToolTipText(
        "Allows syndication requests and thumbnail requests to be resolved without requiring a username/password.");
    openSyndication.setSelected(doAllowSyndication.equals("true"));
    tp.add(openSyndication);

    return tp;
  }
  @Override
  public void reset(@NotNull HttpConfigurable settings) {
    myNoProxyRb.setSelected(true); // default
    myAutoDetectProxyRb.setSelected(settings.USE_PROXY_PAC);
    myPacUrlCheckBox.setSelected(settings.USE_PAC_URL);
    myPacUrlTextField.setText(settings.PAC_URL);
    myUseHTTPProxyRb.setSelected(settings.USE_HTTP_PROXY);
    myProxyAuthCheckBox.setSelected(settings.PROXY_AUTHENTICATION);

    enableProxy(settings.USE_HTTP_PROXY);

    myProxyLoginTextField.setText(settings.getProxyLogin());
    myProxyPasswordTextField.setText(settings.getPlainProxyPassword());

    myProxyPortTextField.setNumber(settings.PROXY_PORT);
    myProxyHostTextField.setText(settings.PROXY_HOST);
    myProxyExceptions.setText(StringUtil.notNullize(settings.PROXY_EXCEPTIONS));

    myRememberProxyPasswordCheckBox.setSelected(settings.KEEP_PROXY_PASSWORD);
    mySocks.setSelected(settings.PROXY_TYPE_IS_SOCKS);
    myHTTP.setSelected(!settings.PROXY_TYPE_IS_SOCKS);

    boolean showError = !StringUtil.isEmptyOrSpaces(settings.LAST_ERROR);
    myErrorLabel.setVisible(showError);
    myErrorLabel.setText(showError ? errorText(settings.LAST_ERROR) : null);

    final String oldStyleText =
        CommonProxy.getMessageFromProps(CommonProxy.getOldStyleProperties());
    myOtherWarning.setVisible(oldStyleText != null);
    if (oldStyleText != null) {
      myOtherWarning.setText(oldStyleText);
      myOtherWarning.setIcon(Messages.getWarningIcon());
    }
  }
 public void updateFrom(CvsApplicationLevelConfiguration config) {
   myPServerSettingsPanel.updateFrom(config);
   myCharset.setSelectedItem(config.ENCODING);
   myUseGZIPCompression.setSelected(config.USE_GZIP);
   myLogOutput.setSelected(config.DO_OUTPUT);
   mySendEnvironment.setSelected(config.SEND_ENVIRONMENT_VARIABLES_TO_SERVER);
 }
  public void updateValues() {
    String doLocalServer = JConfig.queryConfiguration("server.enabled", "false");
    String doAllowSyndication = JConfig.queryConfiguration("allow.syndication", "true");

    localServerBrowseBox.setSelected(doLocalServer.equals("true"));
    openSyndication.setSelected(doAllowSyndication.equals("true"));
  }
  /** Loads the default settings from Preferences to set up the dialog. */
  public void legacyLoadDefaults() {
    String defaultsString = Preferences.getDialogDefaults(getDialogName());

    if ((defaultsString != null) && (newImage != null)) {

      try {
        StringTokenizer st = new StringTokenizer(defaultsString, ",");

        textSearchWindowSide.setText("" + MipavUtil.getInt(st));
        textSimilarityWindowSide.setText("" + MipavUtil.getInt(st));
        textNoiseStandardDeviation.setText("" + MipavUtil.getFloat(st));
        textDegree.setText("" + MipavUtil.getFloat(st));
        doRician = MipavUtil.getBoolean(st);
        doRicianCheckBox.setSelected(doRician);
        textDegree.setEnabled(doRician);
        labelDegree.setEnabled(doRician);
        image25DCheckBox.setSelected(MipavUtil.getBoolean(st));

        if (MipavUtil.getBoolean(st)) {
          newImage.setSelected(true);
        } else {
          replaceImage.setSelected(true);
        }

      } catch (Exception ex) {

        // since there was a problem parsing the defaults string, start over with the original
        // defaults
        Preferences.debug("Resetting defaults for dialog: " + getDialogName());
        Preferences.removeProperty(getDialogName());
      }
    }
  }
  public void reset() {
    myNoProxyRb.setSelected(true); // default
    HttpConfigurable httpConfigurable = myHttpConfigurable;
    myAutoDetectProxyRb.setSelected(httpConfigurable.USE_PROXY_PAC);
    myPacUrlCheckBox.setSelected(httpConfigurable.USE_PAC_URL);
    myPacUrlTextField.setText(httpConfigurable.PAC_URL);
    myUseHTTPProxyRb.setSelected(httpConfigurable.USE_HTTP_PROXY);
    myProxyAuthCheckBox.setSelected(httpConfigurable.PROXY_AUTHENTICATION);

    enableProxy(httpConfigurable.USE_HTTP_PROXY);

    myProxyLoginTextField.setText(httpConfigurable.PROXY_LOGIN);
    myProxyPasswordTextField.setText(httpConfigurable.getPlainProxyPassword());

    myProxyPortTextField.setText(Integer.toString(httpConfigurable.PROXY_PORT));
    myProxyHostTextField.setText(httpConfigurable.PROXY_HOST);
    myProxyExceptions.setText(httpConfigurable.PROXY_EXCEPTIONS);

    myRememberProxyPasswordCheckBox.setSelected(httpConfigurable.KEEP_PROXY_PASSWORD);
    mySocks.setSelected(httpConfigurable.PROXY_TYPE_IS_SOCKS);
    myHTTP.setSelected(!httpConfigurable.PROXY_TYPE_IS_SOCKS);

    final boolean showError = !StringUtil.isEmptyOrSpaces(httpConfigurable.LAST_ERROR);
    myErrorLabel.setVisible(showError);
    myErrorLabel.setText(showError ? errorText(httpConfigurable.LAST_ERROR) : "");

    final String oldStyleText =
        CommonProxy.getMessageFromProps(CommonProxy.getOldStyleProperties());
    myOtherWarning.setVisible(oldStyleText != null);
    if (oldStyleText != null) {
      myOtherWarning.setText(oldStyleText);
      myOtherWarning.setUI(new MultiLineLabelUI());
      myOtherWarning.setIcon(Messages.getWarningIcon());
    }
  }
Esempio n. 11
0
 public SISCFrame(AppContext ctx) {
   setLayout(new BorderLayout());
   SchemePanel.SchemeDocument d = new SchemePanel.SchemeDocument();
   sp = new SchemePanel(ctx, d, new JTextPane(d));
   input = new JTextArea(4, 70);
   input.setText("; Enter s-expressions here");
   JSplitPane split = new JSplitPane(JSplitPane.VERTICAL_SPLIT, sp, input);
   JPanel execPanel = new JPanel();
   execPanel.setLayout(new BoxLayout(execPanel, BoxLayout.X_AXIS));
   execPanel.add(Box.createHorizontalGlue());
   eval = new JButton("Evaluate");
   clear = new JButton("Clear");
   autoClear = new JCheckBox("Auto-Clear");
   submitOnEnter = new JCheckBox("Evaluate on Enter");
   autoClear.setSelected(true);
   submitOnEnter.setSelected(true);
   execPanel.add(submitOnEnter);
   execPanel.add(autoClear);
   execPanel.add(clear);
   execPanel.add(eval);
   add(split, BorderLayout.CENTER);
   add(execPanel, BorderLayout.SOUTH);
   eval.addActionListener(this);
   clear.addActionListener(this);
   input.addKeyListener(this);
   /*	addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
   System.exit(0);
         }
         });*/
 }
    private OptionsPanel() {
      super(new GridBagLayout());

      GridBagConstraints gc = new GridBagConstraints();
      gc.fill = GridBagConstraints.HORIZONTAL;
      gc.weightx = 1;
      gc.weighty = 0;
      gc.anchor = GridBagConstraints.NORTHWEST;

      myPackageLocalForMembersCheckbox =
          new JCheckBox(InspectionsBundle.message("inspection.visibility.option"));
      myPackageLocalForMembersCheckbox.setSelected(SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS);
      myPackageLocalForMembersCheckbox
          .getModel()
          .addChangeListener(
              new ChangeListener() {
                @Override
                public void stateChanged(ChangeEvent e) {
                  SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS = myPackageLocalForMembersCheckbox.isSelected();
                }
              });

      gc.gridy = 0;
      add(myPackageLocalForMembersCheckbox, gc);

      myPackageLocalForTopClassesCheckbox =
          new JCheckBox(InspectionsBundle.message("inspection.visibility.option1"));
      myPackageLocalForTopClassesCheckbox.setSelected(SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES);
      myPackageLocalForTopClassesCheckbox
          .getModel()
          .addChangeListener(
              new ChangeListener() {
                @Override
                public void stateChanged(ChangeEvent e) {
                  SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES =
                      myPackageLocalForTopClassesCheckbox.isSelected();
                }
              });

      gc.gridy = 1;
      add(myPackageLocalForTopClassesCheckbox, gc);

      myPrivateForInnersCheckbox =
          new JCheckBox(InspectionsBundle.message("inspection.visibility.option2"));
      myPrivateForInnersCheckbox.setSelected(SUGGEST_PRIVATE_FOR_INNERS);
      myPrivateForInnersCheckbox
          .getModel()
          .addChangeListener(
              new ChangeListener() {
                @Override
                public void stateChanged(ChangeEvent e) {
                  SUGGEST_PRIVATE_FOR_INNERS = myPrivateForInnersCheckbox.isSelected();
                }
              });

      gc.gridy = 2;
      gc.weighty = 1;
      add(myPrivateForInnersCheckbox, gc);
    }
  public void reset() {
    myEnabledCheckBox.setSelected(myManager.isEnabled());
    myTabsEnabledCheckBox.setSelected(myManager.isEnabledForTabs());
    myProjectViewEnabledCheckBox.setSelected(myManager.isEnabledForProjectView());

    if (myLocalTable.isModified()) myLocalTable.reset();
    if (mySharedTable.isModified()) mySharedTable.reset();
  }
Esempio n. 14
0
  @SuppressWarnings({"unchecked"})
  public SimulationPanel(final MainFrame frame, final PartitionDataList dataList) {

    this.frame = frame;
    this.dataList = dataList;

    optionPanel = new OptionsPanel(12, 12, SwingConstants.CENTER);

    simulationsNumberField = new WholeNumberField(1, Integer.MAX_VALUE);
    simulationsNumberField.setColumns(10);
    simulationsNumberField.setValue(dataList.simulationsCount);
    optionPanel.addComponentWithLabel("Number of simulations:", simulationsNumberField);

    setSeed = new JCheckBox();
    setSeed.addItemListener(new SetSeedCheckBoxListener());
    setSeed.setSelected(dataList.setSeed);
    optionPanel.addComponentWithLabel("Set seed:", setSeed);

    startingSeedNumberField = new WholeNumberField(1, Long.MAX_VALUE);
    startingSeedNumberField.setColumns(10);
    startingSeedNumberField.setValue(dataList.startingSeed);
    startingSeedNumberField.setEnabled(dataList.setSeed);
    optionPanel.addComponentWithLabel("Starting seed:", startingSeedNumberField);

    outputFormat = new JComboBox();
    optionPanel.addComponentWithLabel("Output format:", outputFormat);
    outputFormatModel = new DefaultComboBoxModel(SimpleAlignment.OutputType.values());
    outputFormat.setModel(outputFormatModel);

    outputAncestralSequences = new JCheckBox();
    outputAncestralSequences.addItemListener(new outputAncestralSequencesCheckBoxListener());
    outputAncestralSequences.setSelected(dataList.useParallel);
    optionPanel.addComponentWithLabel("Output ancestral sequences:", outputAncestralSequences);

    useParallel = new JCheckBox();
    useParallel.addItemListener(new UseParallelCheckBoxListener());
    useParallel.setSelected(dataList.useParallel);
    optionPanel.addComponentWithLabel("Use parallel implementation:", useParallel);

    // Buttons holder
    JPanel buttonsHolder = new JPanel();
    buttonsHolder.setOpaque(false);

    // simulate button
    simulate = new JButton("Simulate", Utils.createImageIcon(Utils.BIOHAZARD_ICON));
    simulate.addActionListener(new ListenSimulate());
    buttonsHolder.add(simulate);

    generateXML = new JButton("Generate XML", Utils.createImageIcon(Utils.HAMMER_ICON));
    generateXML.addActionListener(new ListenGenerateXML());
    buttonsHolder.add(generateXML);

    setOpaque(false);
    setLayout(new BorderLayout());
    add(optionPanel, BorderLayout.NORTH);
    add(buttonsHolder, BorderLayout.SOUTH);
  } // END: SimulationPanel
 public void setup(boolean doPlay, boolean doPb, boolean doAt) {
   play.setSelected(doPlay);
   this.doPlay = doPlay;
   pb.setSelected(doPb);
   this.doPb = doPb;
   at.setSelected(doAt);
   this.doAt = doAt;
   configure();
 }
Esempio n. 16
0
  public MainPanel() {
    super(new BorderLayout());
    vcheck.setSelected(true);
    echeck.setSelected(true);
    tcheck.setSelected(true);

    JTabbedPane tab = new JTabbedPane();
    tab.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    button.addHierarchyListener(
        new HierarchyListener() {
          @Override
          public void hierarchyChanged(HierarchyEvent e) {
            if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0) {
              printInfo("SHOWING_CHANGED");
            }
            if ((e.getChangeFlags() & HierarchyEvent.DISPLAYABILITY_CHANGED) != 0) {
              printInfo("DISPLAYABILITY_CHANGED");
            }
          }
        });

    printInfo("after: new JButton, before: add(button); frame.setVisible(true)");

    JPanel panel = new JPanel();
    panel.add(button);
    for (int i = 0; i < 5; i++) {
      panel.add(new JLabel("<html>asfasfdasdfasdfsa<br>asfdd134123fgh"));
    }
    tab.addTab("Main", new JScrollPane(panel));
    tab.addTab("JTree", new JScrollPane(new JTree()));
    tab.addTab("JLabel", new JLabel("Test"));

    JPanel p1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
    p1.add(new JLabel("JButton:"));
    p1.add(vcheck);
    p1.add(echeck);
    JPanel p2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
    p2.add(new JLabel("Timer:"));
    p2.add(tcheck);

    JPanel p = new JPanel(new GridLayout(2, 1));
    p.add(p1);
    p.add(p2);
    add(p, BorderLayout.NORTH);
    add(tab);
    timer =
        new Timer(
            4000,
            new ActionListener() {
              @Override
              public void actionPerformed(ActionEvent e) {
                printInfo(new Date().toString());
              }
            });
    timer.start();
    setPreferredSize(new Dimension(320, 240));
  }
Esempio n. 17
0
  private void updateOtherFileNames(BeautiOptions options) {
    if (options.fileNameStem != null) {
      //            fileNameStemField.setText(options.fileNameStem);

      options.logFileName = options.fileNameStem + ".log";
      if (addTxt.isSelected()) options.logFileName = options.logFileName + ".txt";
      logFileNameField.setText(options.logFileName);

      //            if (options.mapTreeFileName == null) {
      //			    mapTreeFileNameField.setText(options.fileNameStem + ".MAP.tree");
      //            } else {
      //                mapTreeFileNameField.setText(options.mapTreeFileName);
      //            }

      updateTreeFileNameList();
      treeFileNameField.setText(displayTreeList(options.treeFileName));

      if (options.substTreeLog) {
        substTreeFileNameField.setText(displayTreeList(options.substTreeFileName));
      } else {
        substTreeFileNameField.setText("");
      }

      options.operatorAnalysisFileName = options.fileNameStem + ".ops";
      if (addTxt.isSelected()) {
        options.operatorAnalysisFileName = options.operatorAnalysisFileName + ".txt";
      }
      operatorAnalaysisFileNameField.setEnabled(options.operatorAnalysis);
      if (options.operatorAnalysis) {
        operatorAnalaysisFileNameField.setText(options.operatorAnalysisFileName);
      } else {
        operatorAnalaysisFileNameField.setText("");
      }

      //            mapTreeLogCheck.setEnabled(true);
      //            mapTreeLogCheck.setSelected(options.mapTreeLog);
      //            mapTreeFileNameField.setEnabled(options.mapTreeLog);

      substTreeLogCheck.setEnabled(true);
      substTreeLogCheck.setSelected(options.substTreeLog);

    } else {
      //            fileNameStemField.setText(fileNameStem);
      //            fileNameStemField.setEnabled(false);
      logFileNameField.setText(DEFAULT_FILE_NAME_STEM + ".log");
      treeFileNameField.setText(DEFAULT_FILE_NAME_STEM + "." + STARBEASTOptions.TREE_FILE_NAME);
      //            mapTreeLogCheck.setEnabled(false);
      //            mapTreeFileNameField.setEnabled(false);
      //            mapTreeFileNameField.setText("untitled");
      substTreeLogCheck.setSelected(false);
      substTreeFileNameField.setEnabled(false);
      substTreeFileNameField.setText("");
      operatorAnalaysisCheck.setSelected(false);
      operatorAnalaysisFileNameField.setText("");
    }
  }
Esempio n. 18
0
    private OptionsPanel() {
      super(new GridBagLayout());

      GridBagConstraints gc = new GridBagConstraints();
      gc.weighty = 0;
      gc.weightx = 1;
      gc.fill = GridBagConstraints.HORIZONTAL;
      gc.anchor = GridBagConstraints.NORTHWEST;

      myReportClassesCheckbox =
          new JCheckBox(InspectionsBundle.message("inspection.can.be.final.option"));
      myReportClassesCheckbox.setSelected(REPORT_CLASSES);
      myReportClassesCheckbox
          .getModel()
          .addChangeListener(
              new ChangeListener() {
                @Override
                public void stateChanged(ChangeEvent e) {
                  REPORT_CLASSES = myReportClassesCheckbox.isSelected();
                }
              });
      gc.gridy = 0;
      add(myReportClassesCheckbox, gc);

      myReportMethodsCheckbox =
          new JCheckBox(InspectionsBundle.message("inspection.can.be.final.option1"));
      myReportMethodsCheckbox.setSelected(REPORT_METHODS);
      myReportMethodsCheckbox
          .getModel()
          .addChangeListener(
              new ChangeListener() {
                @Override
                public void stateChanged(ChangeEvent e) {
                  REPORT_METHODS = myReportMethodsCheckbox.isSelected();
                }
              });
      gc.gridy++;
      add(myReportMethodsCheckbox, gc);

      myReportFieldsCheckbox =
          new JCheckBox(InspectionsBundle.message("inspection.can.be.final.option2"));
      myReportFieldsCheckbox.setSelected(REPORT_FIELDS);
      myReportFieldsCheckbox
          .getModel()
          .addChangeListener(
              new ChangeListener() {
                @Override
                public void stateChanged(ChangeEvent e) {
                  REPORT_FIELDS = myReportFieldsCheckbox.isSelected();
                }
              });

      gc.weighty = 1;
      gc.gridy++;
      add(myReportFieldsCheckbox, gc);
    }
Esempio n. 19
0
 /** Load the settings of this panel */
 private void loadSettings() {
   hideJunkMessagesCheckBox.setSelected(
       settings.getBoolValue(SettingsClass.JUNK_HIDE_JUNK_MESSAGES));
   markJunkIdentityBadCheckBox.setSelected(
       settings.getBoolValue(SettingsClass.JUNK_MARK_JUNK_IDENTITY_BAD));
   stopBoardUpdatesWhenDosedCheckBox.setSelected(
       settings.getBoolValue(SettingsClass.DOS_STOP_BOARD_UPDATES_WHEN_DOSED));
   TfInvalidSubsequentMessagesThreshold.setText(
       "" + settings.getIntValue(SettingsClass.DOS_INVALID_SUBSEQUENT_MSGS_THRESHOLD));
 }
Esempio n. 20
0
 private void gcChanged() {
   GCWrapper wrap = (GCWrapper) gcSelection.getSelectedItem();
   // assert wrap != null;
   GraphicsConfiguration gc = wrap.getGC();
   // assert gc != null;
   // Image Caps
   ImageCapabilities imageCaps = gc.getImageCapabilities();
   imageAccelerated.setSelected(imageCaps.isAccelerated());
   imageTrueVolatile.setSelected(imageCaps.isTrueVolatile());
   // Buffer Caps
   BufferCapabilities bufferCaps = gc.getBufferCapabilities();
   flipping.setSelected(bufferCaps.isPageFlipping());
   flippingMethod.setText(getFlipText(bufferCaps.getFlipContents()));
   fullScreen.setSelected(bufferCaps.isFullScreenRequired());
   multiBuffer.setSelected(bufferCaps.isMultiBufferAvailable());
   // Front buffer caps
   imageCaps = bufferCaps.getFrontBufferCapabilities();
   fbAccelerated.setSelected(imageCaps.isAccelerated());
   fbTrueVolatile.setSelected(imageCaps.isTrueVolatile());
   imageCaps = bufferCaps.getFrontBufferCapabilities();
   // Back buffer caps
   imageCaps = bufferCaps.getBackBufferCapabilities();
   bbAccelerated.setSelected(imageCaps.isAccelerated());
   bbTrueVolatile.setSelected(imageCaps.isTrueVolatile());
 }
 protected void customizeOptionsPanel() {
   if (myInsertOverrideAnnotationCheckbox != null && myIsInsertOverrideVisible) {
     CodeStyleSettings styleSettings =
         CodeStyleSettingsManager.getInstance(myProject).getCurrentSettings();
     myInsertOverrideAnnotationCheckbox.setSelected(styleSettings.INSERT_OVERRIDE_ANNOTATION);
   }
   if (myCopyJavadocCheckbox != null) {
     myCopyJavadocCheckbox.setSelected(
         PropertiesComponent.getInstance().isTrueValue(PROP_COPYJAVADOC));
   }
 }
 private void updateState() {
   if (yearCheckBox.isSelected()) {
     monthCheckBox.setEnabled(true);
   } else {
     monthCheckBox.setSelected(false);
     monthCheckBox.setEnabled(false);
   }
   if (monthCheckBox.isSelected()) {
     dayCheckBox.setEnabled(true);
   } else {
     dayCheckBox.setSelected(false);
     dayCheckBox.setEnabled(false);
   }
 }
Esempio n. 23
0
  @Override
  public void chatLinkClicked(URI url) {
    String action = url.getPath();
    if (action.equals("/SHOWPREVIEW")) {
      enableReplacement.setSelected(cfg.getBoolean(ReplacementProperty.REPLACEMENT_ENABLE, true));
      enableReplacementProposal.setSelected(
          cfg.getBoolean(ReplacementProperty.REPLACEMENT_PROPOSAL, true));

      currentMessageID = url.getQuery();
      currentLinkPosition = url.getFragment();

      this.setVisible(true);
      this.setLocationRelativeTo(chatPanel);
    }
  }
 private void updateFields() {
   int index = myRulesList.getSelectedIndex();
   if (index >= 0 && index != myLastSelected) {
     final LibraryBundlificationRule rule = myRulesModel.getElementAt(index);
     myLibraryRegex.setText(rule.getRuleRegex());
     UIUtil.invokeLaterIfNeeded(() -> myManifestEditor.setText(rule.getAdditionalProperties()));
     myNeverBundle.setSelected(rule.isDoNotBundle());
     myStopAfterThisRule.setSelected(rule.isStopAfterThisRule());
     myLastSelected = index;
   }
   myLibraryRegex.setEnabled(index >= 0);
   myManifestEditor.setEnabled(index >= 0);
   myNeverBundle.setEnabled(index >= 0);
   myStopAfterThisRule.setEnabled(index >= 0);
 }
  public void reset() {
    myEnableCompileServer.setSelected(mySettings.COMPILE_SERVER_ENABLED);
    myCompilationServerPort.setText(mySettings.COMPILE_SERVER_PORT);

    Sdk sdk =
        mySettings.COMPILE_SERVER_SDK == null
            ? null
            : ProjectJdkTable.getInstance().findJdk(mySettings.COMPILE_SERVER_SDK);
    myCompilationServerSdk.setSelectedJdk(sdk);

    myCompilationServerMaximumHeapSize.setText(mySettings.COMPILE_SERVER_MAXIMUM_HEAP_SIZE);
    myCompilationServerJvmParameters.setText(mySettings.COMPILE_SERVER_JVM_PARAMETERS);
    showTypeInfoOnCheckBox.setSelected(mySettings.SHOW_TYPE_TOOLTIP_ON_MOUSE_HOVER);
    delaySpinner.setValue(mySettings.SHOW_TYPE_TOOLTIP_DELAY);
  }
Esempio n. 26
0
  /** Loading the values stored into configuration form */
  private void loadValues() {
    PacketLoggingService packetLogging = LoggingUtilsActivator.getPacketLoggingService();
    PacketLoggingConfiguration cfg = packetLogging.getConfiguration();

    enableCheckBox.setSelected(cfg.isGlobalLoggingEnabled());

    sipProtocolCheckBox.setSelected(cfg.isSipLoggingEnabled());
    jabberProtocolCheckBox.setSelected(cfg.isJabberLoggingEnabled());
    rtpProtocolCheckBox.setSelected(cfg.isRTPLoggingEnabled());
    ice4jProtocolCheckBox.setSelected(cfg.isIce4JLoggingEnabled());
    fileCountField.setText(String.valueOf(cfg.getLogfileCount()));
    fileSizeField.setText(String.valueOf(cfg.getLimit() / 1000));

    updateButtonsState();
  }
Esempio n. 27
0
 /**
  * Creates a checkbox and sets it's value.
  *
  * @param strText either 'yes' or 'no' if yes then set the checkbox selected.
  */
 protected JCheckBox createChkBox(String strText, JPanel pnlDisplay) {
   JCheckBox chkField = new JCheckBox();
   boolean bSelected = (strText.equalsIgnoreCase("yes")) ? true : false;
   chkField.setSelected(bSelected);
   pnlDisplay.add(chkField);
   return chkField;
 }
 @Override
 public void reset() {
   VcsContentAnnotationSettings settings = VcsContentAnnotationSettings.getInstance(myProject);
   myHighlightRecentlyChanged.setSelected(settings.isShow());
   myHighlightInterval.setValue(settings.getLimitDays());
   myHighlightInterval.setEnabled(myHighlightRecentlyChanged.isSelected());
 }
  /*
   * The following method resets the window to its original status.
   */
  public void init() {
    sampleField.setText(new String("Big Java"));
    textField.setText(new String("Big Java"));

    facenameCombo.setSelectedIndex(0);
    sizeCombo.setSelectedIndex(2);

    italicCheckBox.setSelected(false);
    boldCheckBox.setSelected(false);

    //            largeButton.setSelected(true);

    fontColor = Color.BLACK;

    setSampleFont();
  } // end init method
Esempio n. 30
0
 @Override
 protected void load(ExploreSetting setting) {
   maze2.setSelected(setting.isMaze2());
   maze3.setSelected(setting.isMaze3());
   maze4.setSelected(setting.isMaze4());
   maze5.setSelected(setting.isMaze5());
   maze6.setSelected(setting.isMaze6());
   maze7.setSelected(setting.isMaze7());
   maze8.setSelected(setting.isMaze8());
   noChip.setSelected(setting.isNoChip());
   noThief.setSelected(setting.isNoThief());
   energyTf.setIntegerValue(setting.getEnergy());
   hour.setIntegerValue(setting.getHour());
   minute.setIntegerValue(setting.getMinute());
   auto.setSelected(setting.isAuto());
 }