@Override
  public void actionPerformed(ActionEvent AE) {
    if (AE.getSource() == CheckAll) {
      boolean Selection = CheckAll.isSelected();
      if (Selection) CheckAll.setText("Uncheck all");
      else CheckAll.setText("Check all");
      for (int i = 0; i < NumberOfCourses; i++) My[i].CourseCheckBox.setSelected(Selection);
    }

    if (AE.getSource() == DocButton)
      if (TempControll.ConnectionManagerObject.createConnection()) {

        new File(System.getProperty("user.home") + "/TermResultCalculator/StudentDocs/").mkdirs();
        if (gatherDataForDocument()) {
          if (TempControll.StudentPdfObject.createPDF(
              this.Roll, this.Session, this.Selected, this.Taken, this.Completed, this.GPA))
            JOptionPane.showMessageDialog(
                RPS,
                "Report created successfully at "
                    + System.getProperty("user.home")
                    + "/TermResultCalculator/StudentDocs/",
                "Success",
                JOptionPane.INFORMATION_MESSAGE);
          else
            JOptionPane.showMessageDialog(
                RPS, "Error while creating report.", "Error", JOptionPane.ERROR_MESSAGE);
        } else
          JOptionPane.showMessageDialog(
              RPS,
              "At least one course has to be selected.",
              "Error : No Selection",
              JOptionPane.ERROR_MESSAGE);
      }
  }
Пример #2
0
  public void createButtonsBar(Container content) {
    JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
    content.add(panel, BorderLayout.NORTH);

    buildMapIndex = new JCheckBox();
    buildMapIndex.setText(Messages.getString("OsmExtractionUI.BUILD_MAP")); // $NON-NLS-1$
    panel.add(buildMapIndex);
    buildMapIndex.setSelected(true);

    buildPoiIndex = new JCheckBox();
    buildPoiIndex.setText(Messages.getString("OsmExtractionUI.BUILD_POI")); // $NON-NLS-1$
    panel.add(buildPoiIndex);
    buildPoiIndex.setSelected(true);

    buildAddressIndex = new JCheckBox();
    buildAddressIndex.setText(Messages.getString("OsmExtractionUI.BUILD_ADDRESS")); // $NON-NLS-1$
    panel.add(buildAddressIndex);
    buildAddressIndex.setSelected(true);

    normalizingStreets = new JCheckBox();
    normalizingStreets.setText(
        Messages.getString("OsmExtractionUI.NORMALIZE_STREETS")); // $NON-NLS-1$
    panel.add(normalizingStreets);
    normalizingStreets.setSelected(true);

    buildTransportIndex = new JCheckBox();
    buildTransportIndex.setText(
        Messages.getString("OsmExtractionUI.BUILD_TRANSPORT")); // $NON-NLS-1$
    panel.add(buildTransportIndex);
    buildTransportIndex.setSelected(true);
  }
  private void init() {
    setModal(true);
    setTitle("Text Filter"); // TODO localize
    setPreferredSize(new Dimension(320, 190));

    fCheckIsRegex = UIFactoryMgr.createCheckBox();
    fCheckIsRegex.setText("Filter is a regular expression");

    fCheckIsNegative = UIFactoryMgr.createCheckBox();
    fCheckIsNegative.setText("Negative match");

    fTextFieldFilter = UIFactoryMgr.createTextField();

    fFormPanel = new FormPanel(FormPanel.VERTICAL2);
    fFormPanel.addPairs(
        new String[] {"Pattern", "", ""},
        new Component[] {fTextFieldFilter, fCheckIsRegex, fCheckIsNegative});
    mainPanel = new JPanel(new BorderLayout());
    mainPanel.add(fFormPanel, BorderLayout.NORTH);

    // set focus on the filter text field when
    // the dialog is activated
    addWindowListener(
        new WindowAdapter() {
          public void windowActivated(WindowEvent e) {
            fTextFieldFilter.requestFocusInWindow();
          }
        });

    buildContentPane();
  }
 private void updateLabel() {
   if (myTarget != null) {
     myRunTargetCheckBox.setText("Run Ant target '" + myTarget.getName() + "'");
   } else {
     myRunTargetCheckBox.setText("Run Ant target <none>");
   }
 }
  @Override
  public void setLabels(JointType selectedType) {
    velocitySeries.setKey(selectedType.getName() + " velocity");
    accelerationSeries.setKey(selectedType.getName() + " acceleration");

    velocityCheckbox.setText("Velocity " + selectedType.getName());
    accelerationCheckbox.setText("Acceleration " + selectedType.getName());
  }
Пример #6
0
  private void refreshLanguage() {
    hideJunkMessagesCheckBox.setText(language.getString("Options.junk.hideJunkMessages"));
    markJunkIdentityBadCheckBox.setText(language.getString("Options.junk.markJunkIdentityBad"));

    stopBoardUpdatesWhenDosedCheckBox.setText(
        language.getString("Options.junk.stopBoardUpdatesWhenDosed"));
    LinvalidSubsequentMessagesThreshold.setText(
        language.getString("Options.junk.invalidSubsequentMessagesThreshold"));
  }
  @NotNull
  @Override
  public JComponent getComponent(
      @Nullable PropertiesContainer container,
      @Nullable PropertyContext context,
      Object object,
      @Nullable InplaceContext inplaceContext) {
    myComponent = (RadComponent) container;
    myRootComponent =
        context instanceof RadPropertyContext
            ? ((RadPropertyContext) context).getRootComponent()
            : null;

    String value = (String) object;
    JTextField text = getComboText();

    if (text == null) {
      if (StringUtil.isEmpty(value) || value.equals("true") || value.equals("false")) {
        myBooleanResourceValue = null;
      } else {
        myBooleanResourceValue = value;
      }

      try {
        myIgnoreCheckBoxValue = true;
        myCheckBox.setSelected(Boolean.parseBoolean(value));
      } finally {
        myIgnoreCheckBoxValue = false;
      }

      if (inplaceContext == null) {
        myEditor.setBorder(null);
        myCheckBox.setText(null);
      } else {
        myEditor.setBorder(myCheckBoxBorder);
        myCheckBox.setText(myBooleanResourceValue);
      }
    } else {
      text.setText(value);
      if (inplaceContext != null) {
        text.setColumns(0);
        if (inplaceContext.isStartChar()) {
          text.setText(inplaceContext.getText(text.getText()));
        }
      }
    }
    return myEditor;
  }
  @Override
  public void doTranslation() {
    ((TitledBorder) contentSourcePanel.getBorder())
        .setTitle(Internal.I18N.getString("pref.kmlexport.balloon.contentSource.border"));

    includeDescription.setText(
        Internal.I18N.getString("pref.kmlexport.balloon.label.includeDescription"));
    genAttribRadioButton.setText(Internal.I18N.getString("pref.kmlexport.balloon.label.genAttrib"));
    fileRadioButton.setText(Internal.I18N.getString("pref.kmlexport.balloon.label.file"));
    genAttribAndFileRadioButton.setText(
        Internal.I18N.getString("pref.kmlexport.balloon.label.genAttribAndFile"));
    browseButton.setText(Internal.I18N.getString("common.button.browse"));
    contentInSeparateFile.setText(
        Internal.I18N.getString("pref.kmlexport.balloon.label.contentInSeparateFile"));
    warningLabel.setText(Internal.I18N.getString("pref.kmlexport.balloon.label.warningLabel"));
  }
  /**
   * This function takes the given customer or waiter object and changes the information panel to
   * hold that person's info.
   *
   * @param person customer or waiter object
   */
  public void updateInfoPanel(Object person) {
    stateCB.setVisible(true);
    changeOrder.setVisible(false);
    currentPerson = person;

    if (person instanceof CustomerAgent) {
      CustomerAgent customer = (CustomerAgent) person;
      stateCB.setText("Hungry?");
      changeOrder.setVisible(true);
      // changeOrder.setText("Change Order?");
      // changeOrder.setSelected(customer.waiter.requestingChange(customer));
      // changeOrder.setEnabled(!customer.waiter.requestingChange(customer));
      stateCB.setSelected(customer.isHungry());
      stateCB.setEnabled(!customer.isHungry());
      infoLabel.setText("<html><pre>     Name: " + customer.getName() + " </pre></html>");

    } else if (person instanceof WaiterAgent) {
      WaiterAgent waiter = (WaiterAgent) person;
      // stateCB.setText("On Break?");
      // stateCB.setSelected(waiter.isOnBreak());
      // stateCB.setEnabled(true);
      requestBreak.setVisible(true);
      stateCB.setVisible(false);
      changeOrder.setVisible(false);
      infoLabel.setText("<html><pre>     Name: " + waiter.getName() + " </html>");
    }

    infoPanel.validate();
  }
Пример #10
0
  /*
   * Initialise Components
   */
  private void initComponents() {
    selectionCheckBox = new JCheckBox();

    selectionCheckBox.setText(settop.getHostMacAddress());

    selectionCheckBox.setFocusable(false);

    // selectionCheckBox.setEnabled( false );

    selectionCheckBox.setName("selectionCheckBox");

    closeButton = new IconButton(CLOSE_ICON);

    closeButton.setToolTipText("Close Video");

    playStopButton = new IconButton(STOP_ICON);

    showStopStreamingButton();

    lockUnlockButton = new IconButton(UNLOCK_ICON);

    lockUnlockButton.setSize(new Dimension(25, 25));

    showUnLockButton();

    closeButton.setBorder(BorderFactory.createRaisedBevelBorder());

    setToolTipText(getSettopInfoToolTipText((SettopInfo) settop));
  }
 /**
  * This method initializes jCheckBoxSezgin
  *
  * @return javax.swing.JCheckBox
  */
 private JCheckBox getJCheckBoxSezgin() {
   if (jCheckBoxSezgin == null) {
     jCheckBoxSezgin = new JCheckBox();
     jCheckBoxSezgin.setText("sezgin algorithm  "); // Generated
   }
   return jCheckBoxSezgin;
 }
 /**
  * This method initializes jCheckBoxHybird
  *
  * @return javax.swing.JCheckBox
  */
 private JCheckBox getJCheckBoxHybird() {
   if (jCheckBoxHybird == null) {
     jCheckBoxHybird = new JCheckBox();
     jCheckBoxHybird.setText(" hybird of all            "); // Generated
   }
   return jCheckBoxHybird;
 }
 /**
  * This method initializes jCheckBoxPolygonSwarm
  *
  * @return javax.swing.JCheckBox
  */
 private JCheckBox getJCheckBoxPolygonSwarm() {
   if (jCheckBoxPolygonSwarm == null) {
     jCheckBoxPolygonSwarm = new JCheckBox();
     jCheckBoxPolygonSwarm.setText("Use polygon swram"); // Generated
   }
   return jCheckBoxPolygonSwarm;
 }
 /**
  * This method initializes jCheckBoxDivideSwarm
  *
  * @return javax.swing.JCheckBox
  */
 private JCheckBox getJCheckBoxDivideSwarm() {
   if (jCheckBoxDivideSwarm == null) {
     jCheckBoxDivideSwarm = new JCheckBox();
     jCheckBoxDivideSwarm.setText("Use Divide Curve swarm"); // Generated
   }
   return jCheckBoxDivideSwarm;
 }
 /**
  * This method initializes jCheckBoxOnlineCalculations
  *
  * @return javax.swing.JCheckBox
  */
 private JCheckBox getJCheckBoxOnlineCalculations() {
   if (jCheckBoxOnlineCalculations == null) {
     jCheckBoxOnlineCalculations = new JCheckBox();
     jCheckBoxOnlineCalculations.setText("Online Calculations"); // Generated
   }
   return jCheckBoxOnlineCalculations;
 }
 /**
  * This method initializes jCheckBoxDisplay
  *
  * @return javax.swing.JCheckBox
  */
 private JCheckBox getJCheckBoxDisplay() {
   if (jCheckBoxDisplay == null) {
     jCheckBoxDisplay = new JCheckBox();
     jCheckBoxDisplay.setText(" Display sketch ouput ");
   }
   return jCheckBoxDisplay;
 }
Пример #17
0
 /**
  * This method initializes cb_inSearch
  *
  * @return javax.swing.JCheckBox
  */
 private JCheckBox getCb_inSearch() {
   if (cb_inSearch == null) {
     cb_inSearch = new JCheckBox();
     cb_inSearch.setText("결과 내 검색");
   }
   return cb_inSearch;
 }
Пример #18
0
  public EditorOptionsPanel() {
    if (SystemInfo.isMac) {
      myCbEnableWheelFontChange.setText(
          ApplicationBundle.message("checkbox.enable.ctrl.mousewheel.changes.font.size.macos"));
    }

    myStripTrailingSpacesCombo.addItem(STRIP_CHANGED);
    myStripTrailingSpacesCombo.addItem(STRIP_ALL);
    myStripTrailingSpacesCombo.addItem(STRIP_NONE);

    myHighlightSettingsPanel.setLayout(new BorderLayout());
    myHighlightSettingsPanel.add(myErrorHighlightingPanel.getPanel(), BorderLayout.CENTER);

    myRichCopyColorSchemeComboBox.setRenderer(
        new ListCellRendererWrapper<String>() {
          @Override
          public void customize(
              JList list, String value, int index, boolean selected, boolean hasFocus) {
            final String textToUse;
            if (RichCopySettings.ACTIVE_GLOBAL_SCHEME_MARKER.equals(value)) {
              textToUse = ACTIVE_COLOR_SCHEME;
            } else {
              textToUse = value;
            }
            setText(textToUse);
          }
        });

    myConfigurable = new MyConfigurable();
    initQuickDocProcessing();
    initSoftWrapsSettingsProcessing();
  }
Пример #19
0
 private JCheckBox getRootCheckBox() {
   if (RootCheckBox == null) {
     RootCheckBox = new JCheckBox();
     RootCheckBox.setText("is root");
   }
   return RootCheckBox;
 }
Пример #20
0
 /** Indicates that the file has been sent. */
 public void markAsSent() {
   if (errorBox != null) {
     errorBox.setEnabled(false);
     errorBox.setText("Sent");
     repaint();
   }
 }
Пример #21
0
 private void updateLabels(Locale locale) {
   setTitle(I18n.trl("Change Language", locale));
   okayAction.putValue(Action.NAME, I18n.trl("OK", locale));
   cancelAction.putValue(Action.NAME, I18n.trl("Cancel", locale));
   helpTranslateLabel.setText(I18n.trl("Help Translate LimeWire", locale));
   showLanguageCheckbox.setText(I18n.trl("Show Language in status bar", locale));
 }
 private JCheckBox buildOnDatabaseCheckBox() {
   JCheckBox checkBox = new JCheckBox();
   checkBox.setModel(buildOnDatabaseCheckBoxModel());
   checkBox.setText(resourceRepository().getString("onDatabase"));
   checkBox.setMnemonic(resourceRepository().getMnemonic("onDatabase"));
   return checkBox;
 }
  public void setLabels() {

    // TODO --- finish set labels

    // tab titles
    tabbedPane.setTitleAt(0, app.getMenu("Properties.Basic"));
    tabbedPane.setTitleAt(1, app.getPlain("xAxis"));
    tabbedPane.setTitleAt(2, app.getPlain("yAxis"));
    tabbedPane.setTitleAt(3, app.getMenu("Grid"));

    // window dimension panel
    dimLabel[0].setText("X " + app.getPlain("min") + ":");
    dimLabel[1].setText("X " + app.getPlain("max") + ":");
    dimLabel[2].setText("Y " + app.getPlain("min") + ":");
    dimLabel[3].setText("Y " + app.getPlain("max") + ":");
    axesRatioLabel.setText(app.getPlain("xAxis") + " : " + app.getPlain("yAxis") + " = ");
    //	dimPanelTitle = "ttt";

    cbView.removeActionListener(this);
    cbView.removeAllItems();
    cbView.addItem(app.getPlain("DrawingPad"));
    cbView.addItem(app.getPlain("DrawingPad2"));
    cbView.removeActionListener(this);

    cbShowMouseCoords.setText(app.getMenu("ShowMouseCoordinates"));
  }
    @Override
    public Component getTreeCellRendererComponent(
        JTree tree,
        Object value,
        boolean sel,
        boolean expanded,
        boolean leaf,
        int row,
        boolean hasFocus) {
      super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);

      if (!(value instanceof File)) {
        labelRenderer.getTreeCellRendererComponent(tree, value, sel, expanded, false, row, false);
        labelRenderer.setIcon(null);
        return labelRenderer;
      }

      File file = (File) value;
      checkBox.setText(RecursiveLibraryDirectoryPanel.this.getText(file));
      // setColors(compTemp, tree, tree.getPathForRow(row), checkBox, sel);
      checkBox.setBackground(this.getBackground());
      checkBox.setForeground(this.getForeground());

      if (isExcluded(file)) {
        checkBox.setSelected(false);
        checkBox.setIcon(null);
      } else if (isFullyIncluded(file)) {
        checkBox.setSelected(true);
        checkBox.setIcon(null);
      } else {
        checkBox.setSelected(true);
        checkBox.setIcon(partiallyIncludedIcon);
      }
      return checkBox;
    }
Пример #25
0
  public void initComponents() {
    stopTaskButton = new StopTaskButton(workerManager);

    JPanel initLayoutPanel = new JPanel(new BorderLayout());
    initLayoutPanel.add(initialLayoutTextField, BorderLayout.CENTER);
    initLayoutPanel.add(chooseInitialLayoutButton, BorderLayout.EAST);

    JPanel controlPanel = new JPanel();
    controlPanel.add(randomLayoutButton);
    controlPanel.add(startMinimizerButton);
    controlPanel.add(stopTaskButton);

    JPanel paramsPanel = new JPanel();
    paramsPanel.setLayout(new GridBagLayout());
    addOptionControls(paramsPanel, "Weighted edges?", weightedCheckbox);
    addOptionControls(paramsPanel, "Animation during layouting?", animationCheckBox);
    addOptionControls(paramsPanel, "Attraction exponent:", attractionExponentTextField);
    addOptionControls(paramsPanel, "Repulsion exponent:", repulsionExponentTextField);
    addOptionControls(paramsPanel, "Repulsion type:", repulsionTypeTextField);
    addOptionControls(paramsPanel, "Gravitation:", gravitationTextField);
    addOptionControls(paramsPanel, "Initial layout:", initLayoutPanel);
    addOptionControls(paramsPanel, "Dimensions:", dimensionsSpinner);
    addOptionControls(paramsPanel, "Scale factor:", scaleTextField);
    addOptionControls(paramsPanel, "Number of iterations:", numOfIterationsSpinner);
    addOptionControls(paramsPanel, "Stop iterating on energy minimum?", autoStopIteratingCheckBox);

    this.setLayout(new BorderLayout());
    this.add(paramsPanel, BorderLayout.CENTER);
    this.add(controlPanel, BorderLayout.SOUTH);

    animationCheckBox.setText("Yes");
    repulsionTypeTextField.setModel(
        new DefaultComboBoxModel<String>(new String[] {"Edge repulsion", "Vertex repulsion"}));
    chooseInitialLayoutButton.setText("Choose...");
    weightedCheckbox.setText("Yes");

    setActionOnEnter(attractionExponentTextField);
    setActionOnEnter(repulsionExponentTextField);
    setActionOnEnter(gravitationTextField);
    setActionOnEnter(scaleTextField);
    setActionOnEnter(initialLayoutTextField);
    setActionOnEnter(dimensionsSpinner);
    setActionOnEnter(numOfIterationsSpinner);

    setMnemonics();
    registerListeners();
  }
  private void affectLibelle() {
    setTitle(ConcoursJeunes.ajrLibelle.getResourceString("criterion.titre"));

    jlCode.setText(ConcoursJeunes.ajrLibelle.getResourceString("criterion.code"));
    jlLibelle.setText(ConcoursJeunes.ajrLibelle.getResourceString("criterion.libelle"));
    jlSortOrder.setText(ConcoursJeunes.ajrLibelle.getResourceString("criterion.ordretri"));
    jcbSortOrder.removeAllItems();
    jcbSortOrder.addItem(ConcoursJeunes.ajrLibelle.getResourceString("criterion.ordretri.asc"));
    jcbSortOrder.addItem(ConcoursJeunes.ajrLibelle.getResourceString("criterion.ordretri.desc"));
    jcbPlacementCriterion.setText(
        ConcoursJeunes.ajrLibelle.getResourceString("criterion.placement"));
    jcbClassementCriterion.setText(
        ConcoursJeunes.ajrLibelle.getResourceString("criterion.classement"));

    jbValider.setText(ConcoursJeunes.ajrLibelle.getResourceString("bouton.valider"));
    jbAnnuler.setText(ConcoursJeunes.ajrLibelle.getResourceString("bouton.annuler"));
  }
Пример #27
0
 /**
  * Gets the chk proxy only.
  *
  * @return the chk proxy only
  */
 private JCheckBox getChkProxyOnly() {
   if (proxyOnlyCheckbox == null) {
     proxyOnlyCheckbox = new JCheckBox();
     proxyOnlyCheckbox.setText(
         Constant.messages.getString("httpsessions.options.label.proxyOnly"));
   }
   return proxyOnlyCheckbox;
 }
Пример #28
0
 private JCheckBox getAdminCheckBox() {
   if (AdminCheckBox == null) {
     AdminCheckBox = new JCheckBox();
     AdminCheckBox.setText("is admin");
     AdminCheckBox.setEnabled(false);
   }
   return AdminCheckBox;
 }
  protected void createOccurrencesCb(
      GridBagConstraints gbConstraints, JPanel panel, final int occurenceNumber) {
    myCbReplaceAllOccurences = new NonFocusableCheckBox();
    myCbReplaceAllOccurences.setText(
        RefactoringBundle.message("replace.all.occurences", occurenceNumber));

    panel.add(myCbReplaceAllOccurences, gbConstraints);
    myCbReplaceAllOccurences.setSelected(false);
  }
Пример #30
0
  public void guisetup() {
    frame = new JFrame("Screenshot Gatherer");
    // frame.setFocusable(false);

    frame.setLayout(null);
    frame.setSize(1000, 600);
    // frame.setVisible(true);

    matchCount = new JLabel();
    matchCount.setLocation(0, 0);
    matchCount.setSize(150, 30);

    picLabel = new JLabel();
    picLabel.setLocation(0, 30);
    picLabel.setSize(600, 550);
    frame.add(picLabel);

    // picLabel.repaint();

    frame.add(matchCount);

    updateMatchCount();

    textArea = new JTextPane();
    textArea.setLocation(0, 0);
    textArea.setSize(200, 600);

    JScrollPane scrollable = new JScrollPane(textArea);
    scrollable.setLocation(600, 0);
    scrollable.setSize(200, 600);
    scrollable.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    frame.add(scrollable);

    textAreaSeen = new JTextPane();
    textAreaSeen.setLocation(0, 0);
    textAreaSeen.setSize(200, 600);

    JScrollPane scrollable2 = new JScrollPane(textAreaSeen);
    scrollable2.setLocation(800, 0);
    scrollable2.setSize(200, 600);
    scrollable2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);

    // frame.add(textArea);
    frame.add(scrollable2);

    recordingCheckbox = new JCheckBox();
    recordingCheckbox.setLocation(150, 0);
    recordingCheckbox.setSize(270, 30);
    recordingCheckbox.setText("Automatically Save Screenshots");
    frame.add(recordingCheckbox);

    saveScreenshotButton = new JButton();
    saveScreenshotButton.setLocation(420, 0);
    saveScreenshotButton.setSize(180, 30);
    saveScreenshotButton.setText("Save Screenshot");
    frame.add(saveScreenshotButton);
  }