private JPanel createGraphSelectionSubPane() { Font font = new Font("SansSerif", Font.PLAIN, 10); // Search field JPanel searchPanel = new JPanel(); searchPanel.setLayout(new BoxLayout(searchPanel, BoxLayout.X_AXIS)); searchPanel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0)); searchPanel.add(columnSelection); columnMatchLabel.setEnabled(false); applyFilterBtn.setEnabled(false); caseChkBox.setEnabled(false); regexpChkBox.setEnabled(false); columnSelection.addActionListener(this); searchPanel.add(columnMatchLabel); searchPanel.add(Box.createRigidArea(new Dimension(5, 0))); // Button applyFilterBtn.setFont(font); applyFilterBtn.addActionListener(this); searchPanel.add(applyFilterBtn); // checkboxes caseChkBox.setFont(font); searchPanel.add(caseChkBox); regexpChkBox.setFont(font); searchPanel.add(regexpChkBox); return searchPanel; }
@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); } }
BindToNewBeanStep(@NotNull final WizardData data) { myData = data; myTableModel = new MyTableModel(); myTable.setModel(myTableModel); myTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); myScrollPane.getViewport().setBackground(myTable.getBackground()); myTable.setSurrendersFocusOnKeystroke(true); // Customize "Form Property" column { final TableColumn column = myTable.getColumnModel().getColumn(0 /*Form Property*/); column.setCellRenderer(new FormPropertyTableCellRenderer(myData.myProject)); } // Customize "Bean Property" column { final TableColumn column = myTable.getColumnModel().getColumn(1 /*Bean Property*/); column.setCellRenderer(new BeanPropertyTableCellRenderer()); column.setCellEditor(new BeanPropertyTableCellEditor()); final DefaultCellEditor editor = (DefaultCellEditor) myTable.getDefaultEditor(Object.class); editor.setClickCountToStart(1); } myChkGetData.setSelected(true); myChkGetData.setEnabled(false); myChkSetData.setSelected(true); myChkSetData.setEnabled(false); myChkIsModified.setSelected(myData.myGenerateIsModified); }
public SimpleOpenTaskDialog(@NotNull final Project project, @NotNull final Task task) { super(project, false); myProject = project; myTask = task; TaskManagerImpl taskManager = (TaskManagerImpl) TaskManager.getManager(myProject); setTitle("Open Task"); myTaskNameLabel.setText(TaskUtil.getTrimmedSummary(task)); TaskManagerImpl manager = (TaskManagerImpl) TaskManager.getManager(project); ControlBinder binder = new ControlBinder(manager.getState()); binder.bindAnnotations(this); binder.reset(); TaskRepository repository = task.getRepository(); if (repository == null || !repository .getRepositoryType() .getPossibleTaskStates() .contains(TaskState.IN_PROGRESS)) { myMarkAsInProgressBox.setVisible(false); } myClearContext.setSelected(taskManager.getState().clearContext); if (!manager.isVcsEnabled()) { myCreateChangelist.setEnabled(false); myCreateChangelist.setSelected(false); } else { myCreateChangelist.setSelected(taskManager.getState().createChangelist); myCreateChangelist.setEnabled(true); } init(); getPreferredFocusedComponent(); }
protected void updateButtons(boolean enabled) { saveTrackButton.setEnabled(enabled); loadNameAll.setEnabled(enabled); loadNameInclude.setEnabled(enabled); loadNameExclude.setEnabled(enabled); loadAndTypeCheckBox.setEnabled(enabled); boolean en = enabled && (_track.isAddCustomLoadsAnyStagingTrackEnabled() || _track.isAddCustomLoadsAnySpurEnabled() || _track.isAddCustomLoadsEnabled()); shipLoadNameAll.setEnabled(en); shipLoadNameInclude.setEnabled(en); shipLoadNameExclude.setEnabled(en); shipLoadAndTypeCheckBox.setEnabled(en); addShipLoadButton.setEnabled(en); deleteShipLoadButton.setEnabled(en); deleteAllShipLoadsButton.setEnabled(en); comboBoxShipLoads.setEnabled(en); comboBoxShipTypes.setEnabled(en); }
private void updateSoftWrapSettingsRepresentation() { boolean softWrapsEnabled = myCbUseSoftWrapsAtEditor.isSelected(); myCbUseCustomSoftWrapIndent.setEnabled(softWrapsEnabled); myCustomSoftWrapIndent.setEnabled( myCbUseCustomSoftWrapIndent.isEnabled() && myCbUseCustomSoftWrapIndent.isSelected()); myCustomSoftWrapIndentLabel.setEnabled(myCustomSoftWrapIndent.isEnabled()); myCbShowSoftWrapsOnlyOnCaretLine.setEnabled(softWrapsEnabled); }
public void setRootCheckBox(boolean isChecked) { RootCheckBox.setSelected(isChecked); if (!AdminCheckBox.isSelected()) { RootCheckBox.setEnabled(false); } else { RootCheckBox.setEnabled(true); } }
public void initUI() { scrollingToBottomCheckbox.setSelected(applicationPreferences.isScrollingToBottom()); coloringWholeRowCheckbox.setSelected(applicationPreferences.isColoringWholeRow()); showFullCallstackCheckbox.setSelected(applicationPreferences.isShowingFullCallstack()); showStackTraceCheckbox.setSelected(applicationPreferences.isShowingStackTrace()); usingWrappedExceptionStyleCheckbox.setSelected( applicationPreferences.isUsingWrappedExceptionStyle()); // look and feel { ArrayList<String> lookAndFeels = new ArrayList<>(); for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { lookAndFeels.add(info.getName()); } Collections.sort(lookAndFeels); int selectedIndex = 0; String lookAndFeel = applicationPreferences.getLookAndFeel(); if (lookAndFeel == null || "".equals(lookAndFeel)) { lookAndFeel = UIManager.getLookAndFeel().getName(); } int idx = lookAndFeels.indexOf(lookAndFeel); if (idx > -1) { selectedIndex = idx; } else { idx = lookAndFeels.indexOf(ApplicationPreferences.STARTUP_LOOK_AND_FEEL); if (idx > -1) { selectedIndex = idx; } } lookAndFeelCombo.setModel( new DefaultComboBoxModel<>(lookAndFeels.toArray(new String[lookAndFeels.size()]))); lookAndFeelCombo.setSelectedIndex(selectedIndex); } // default condition name { List<String> conditionNames = applicationPreferences.retrieveAllConditions(); String defaultName = applicationPreferences.getDefaultConditionName(); int idx = conditionNames.indexOf(defaultName); if (idx < 0) { idx = 0; } defaultConditionCombo.setModel( new DefaultComboBoxModel<>(conditionNames.toArray(new String[conditionNames.size()]))); defaultConditionCombo.setSelectedIndex(idx); } String appPath = applicationPreferences.getApplicationPath().getAbsolutePath(); appPathTextField.setText(appPath); appPathTextField.setToolTipText(appPath); globalLoggingEnabledCheckbox.setSelected(applicationPreferences.isGlobalLoggingEnabled()); loggingStatsEnabledCheckbox.setSelected(applicationPreferences.isLoggingStatisticEnabled()); trayActiveCheckbox.setSelected(applicationPreferences.isTrayActive()); trayActiveCheckbox.setEnabled(TraySupport.isAvailable()); hidingOnCloseCheckbox.setSelected(applicationPreferences.isHidingOnClose()); hidingOnCloseCheckbox.setEnabled(TraySupport.isAvailable()); }
public void enableRunAndImport(boolean enable) { chkExec.setEnabled(enable); lblFileRpt.setEnabled(enable); txtFileRpt.setEnabled(enable); btnFileRpt.setEnabled(enable); chkImport.setEnabled(enable); lblResultName.setEnabled(enable); txtResultName.setEnabled(enable); }
void checkAllStates() { if (!isAll()) { all.setSelected(false); all.setEnabled(true); } else { all.setSelected(true); all.setEnabled(false); } }
/** Update button enable/disable state according enableCheckBox. */ private void updateButtonsState() { sipProtocolCheckBox.setEnabled(enableCheckBox.isSelected()); jabberProtocolCheckBox.setEnabled(enableCheckBox.isSelected()); rtpProtocolCheckBox.setEnabled(enableCheckBox.isSelected()); ice4jProtocolCheckBox.setEnabled(enableCheckBox.isSelected()); fileCountField.setEnabled(enableCheckBox.isSelected()); fileSizeField.setEnabled(enableCheckBox.isSelected()); fileSizeLabel.setEnabled(enableCheckBox.isSelected()); fileCountLabel.setEnabled(enableCheckBox.isSelected()); }
public void setEnabled(boolean enabled) { productNameLabel.setEnabled(enabled); productNameTextField.setEnabled(enabled); saveToFileCheckBox.setEnabled(enabled); productDirLabel.setEnabled(enabled); productDirTextField.setEnabled(enabled); productDirChooserButton.setEnabled(enabled); formatNameComboBox.setEnabled(enabled); openInAppCheckBox.setEnabled(enabled); }
/** Update state dialog depending on the current state of the fields */ private void updateDialogState() { String branch = myBranchTextField.getText(); if (branch.length() != 0) { setOKButtonText(GitBundle.getString("unstash.button.branch")); myPopStashCheckBox.setEnabled(false); myPopStashCheckBox.setSelected(true); myReinstateIndexCheckBox.setEnabled(false); myReinstateIndexCheckBox.setSelected(true); if (!GitBranchNameValidator.INSTANCE.checkInput(branch)) { setErrorText(GitBundle.getString("unstash.error.invalid.branch.name")); setOKActionEnabled(false); return; } if (myBranches.contains(branch)) { setErrorText(GitBundle.getString("unstash.error.branch.exists")); setOKActionEnabled(false); return; } } else { if (!myPopStashCheckBox.isEnabled()) { myPopStashCheckBox.setSelected(false); } myPopStashCheckBox.setEnabled(true); setOKButtonText( myPopStashCheckBox.isSelected() ? GitBundle.getString("unstash.button.pop") : GitBundle.getString("unstash.button.apply")); if (!myReinstateIndexCheckBox.isEnabled()) { myReinstateIndexCheckBox.setSelected(false); } myReinstateIndexCheckBox.setEnabled(true); } if (myStashList.getModel().getSize() == 0) { myViewButton.setEnabled(false); myDropButton.setEnabled(false); myClearButton.setEnabled(false); setErrorText(null); setOKActionEnabled(false); return; } else { myClearButton.setEnabled(true); } if (myStashList.getSelectedIndex() == -1) { myViewButton.setEnabled(false); myDropButton.setEnabled(false); setErrorText(null); setOKActionEnabled(false); return; } else { myViewButton.setEnabled(true); myDropButton.setEnabled(true); } setErrorText(null); setOKActionEnabled(true); }
public void yearlyRepeatRB_actionPerformed(ActionEvent e) { disableElements(); enableExceptionElements(); startDate.setEnabled(true); setStartDateB.setEnabled(true); lblSince.setEnabled(true); enableEndDateCB.setEnabled(true); workingDaysOnlyCB.setEnabled(true); startDate.getModel().setValue(startCalFrame.cal.get().getCalendar().getTime()); }
private void enableBatch(boolean enable) { tfDirPath.setEditable(enable); combobProblem.setEnabled(!enable); if (enable == true) { cbDebug.setSelected(false); cbTreeFrame.setSelected(false); } cbDebug.setEnabled(!enable); cbTreeFrame.setEnabled(!enable); labelBatCounter.setEnabled(enable); spinnerRepeatTimes.setEnabled(enable); }
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); } }
private static void setDisableComponents() { tfNumberOfMeasurements.setEnabled(false); tfNumberOfGraphs.setEnabled(false); chkBoxBruteForceAlgorithm.setEnabled(false); chkBoxLayerAlgorithm.setEnabled(false); chkBoxComputeComplexity.setEnabled(false); spinnerVertexFrom.setEnabled(false); spinnerVertextTo.setEnabled(false); rbRandomWeight.setEnabled(false); rbStateWeight.setEnabled(false); sliderDensityGraph.setEnabled(false); chkBoxComputeMemory.setEnabled(false); rdbtnWagiLosoweZ.setEnabled(false); }
private void setupDialog() { myReplaceAll.setMnemonic(KeyEvent.VK_A); myNameLabel.setLabelFor(myNameComboBox); // Replace occurrences check box setup if (myOccurrencesCount > 1) { myReplaceAll.setSelected(false); myReplaceAll.setEnabled(true); myReplaceAll.setText(myReplaceAll.getText() + " (" + myOccurrencesCount + " occurrences)"); } else { myReplaceAll.setSelected(false); myReplaceAll.setEnabled(false); } }
private void updateState() { myCbIncludeSubdirs.setEnabled(myRbDirectory.isSelected()); myCbOptimizeImports.setEnabled( !myRbSelectedText.isSelected() && !(myFile != null && LanguageImportStatements.INSTANCE.forFile(myFile).isEmpty() && myRbFile.isSelected())); myCbArrangeEntries.setEnabled( myFile != null && Rearranger.EXTENSION.forLanguage(myFile.getLanguage()) != null); myCbOnlyVcsChangedRegions.setEnabled(canTargetVcsRegions()); myDoNotAskMeCheckBox.setEnabled(!myRbDirectory.isSelected()); myRbDirectory.setEnabled(!myDoNotAskMeCheckBox.isSelected()); }
/** Povolení HW akcelerace. */ public final synchronized void setUseHWAcceleration(boolean useHWAcceleration) { guiUseHWAcceleration.setSelected(useHWAcceleration); // při HW akceleraci nelze ručně volit počet kroků vykreslení if (useHWAcceleration) { setSteps(0); guiStepsAuto.setEnabled(false); } else { guiStepsAuto.setEnabled(true); } this.useHWAcceleration = useHWAcceleration; for (ObjectListener l : listeners) { l.eventSpecificPropertiesChanged(this); } }
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); }
private void updateUIState() { if (model.isSaveToFileSelected()) { openInAppCheckBox.setEnabled(canReadOutputFormat(model.getFormatName())); formatNameComboBox.setEnabled(true); productDirLabel.setEnabled(true); productDirTextField.setEnabled(true); productDirChooserButton.setEnabled(true); } else { openInAppCheckBox.setEnabled(false); formatNameComboBox.setEnabled(false); productDirTextField.setEnabled(false); productDirTextField.setEnabled(false); productDirChooserButton.setEnabled(false); } }
@Override public void setEnabled(boolean b) { populationLabel.setEnabled(b); populationSpinner.setEnabled(b); elitismLabel.setEnabled(b); elitismSpinner.setEnabled(b); generationsLabel.setEnabled(b); generationsSpinner.setEnabled(b); selectionLabel.setEnabled(b); selectionCombo.setEnabled(b); crossoverCheckbox.setEnabled(b); mutationCheckbox.setEnabled(b); distributedCheckbox.setEnabled(b); super.setEnabled(b); }
public void setEditable(boolean isEditable) { isEditable_ = isEditable; if (inputType_.equals("ALPHA") || inputType_.equals("KANJI") || inputType_.equals("NUMERIC")) { ((JTextField) component).setEditable(isEditable_); ((JTextField) component).setFocusable(isEditable_); } if (inputType_.equals("DATE")) { ((XFDateField) component).setEditable(isEditable_); ((XFDateField) component).setFocusable(isEditable_); int fieldWidth = XFUtility.getWidthOfDateValue(dialog_.getSession().getDateFormat(), 14); if (isEditable_) { this.setBounds( this.getBounds().x, this.getBounds().y, 150 + fieldWidth, XFUtility.FIELD_UNIT_HEIGHT); } else { this.setBounds( this.getBounds().x, this.getBounds().y, 124 + fieldWidth, XFUtility.FIELD_UNIT_HEIGHT); } } if (inputType_.equals("LISTBOX")) { ((JComboBox) component).setEditable(isEditable_); ((JComboBox) component).setFocusable(isEditable_); } if (inputType_.equals("CHECKBOX")) { ((JCheckBox) component).setEnabled(isEditable_); ((JCheckBox) component).setFocusable(isEditable_); } }
public Component getTableCellRendererComponent( JTable tabl, Object value, boolean isSelected, boolean hasFocus, int row, int column) { // if(value==null)return new JLabel("EMPTY"); // if(tabl==null)return new JLabel("EMPTY2"); // if(super==null)return new JLabel("EMPTY3"); Component c = super.getTableCellRendererComponent( tabl, value.toString(), isSelected, hasFocus, row, column); if (value instanceof Component) { return (Component) value; } if (value instanceof Boolean) { JCheckBox jc = new JCheckBox(); jc.setEnabled((Boolean) value); jc.setHorizontalAlignment(SwingConstants.CENTER); jc.setBackground(c.getBackground()); return jc; } return super.getTableCellRendererComponent( tabl, value.toString(), isSelected, hasFocus, row, column); }
@Override public JComponent createForm() { JComponent component = super.createForm(); annotationComboBox.setRenderer( new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (value != null) { Annotation annotation = (Annotation) value; this.setText(annotation.getBrief()); } else { this.setText("-- select annotation --"); } return this; } }); component.setLayout(new FormLayout("right:p, 4dlu, left:p", "p, 4dlu, p, 4dlu, p, 4dlu, p")); CellConstraints cc = new CellConstraints(); component.add(getLabel("annotationLabel"), cc.xy(1, 1)); component.add(annotationComboBox, cc.xy(3, 1)); component.add(getLabel("patternLabel"), cc.xy(1, 3)); component.add(patternField, cc.xy(3, 3)); component.add(getLabel("ciLabel"), cc.xy(1, 5)); component.add(caseInsensitive, cc.xy(3, 5)); component.add(getLabel("remove"), cc.xy(1, 7)); component.add(removeMatched, cc.xy(3, 7)); patternField.setEnabled(false); caseInsensitive.setSelected(true); caseInsensitive.setEnabled(false); // action listener will fill out a suggested pattern for selected annotation types annotationComboBox.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { Object obj = annotationComboBox.getSelectedItem(); if (obj == null) { patternField.setEnabled(false); caseInsensitive.setEnabled(false); setEnabled(false); } else { patternField.setEnabled(true); caseInsensitive.setEnabled(true); patternField.setText(getDefault(obj.getClass())); patternField.setCaretPosition(0); setEnabled(true); } } }); return component; }
public void updateLastCustomer() { if (currentCustomer != null) { customerStateCheckBox.setSelected(currentCustomer.getGui().isHungry()); customerStateCheckBox.setEnabled(!currentCustomer.getGui().isHungry()); customerInformationPanel.validate(); } }
private void initController() { BindingBuilder builder = new BindingBuilder(eventController.getApplication().getBindingFactory(), this); builder.bindToStateChange(dbEntity, "dbEntityFilter").updateView(); builder.bindToStateChange(objEntity, "objEntityFilter").updateView(); builder.bindToStateChange(embeddable, "embeddableFilter").updateView(); builder.bindToStateChange(procedure, "procedureFilter").updateView(); builder.bindToStateChange(query, "queryFilter").updateView(); builder.bindToStateChange(all, "allFilter").updateView(); dbEntity.addActionListener(new CheckListener("dbEntity")); objEntity.addActionListener(new CheckListener("objEntity")); embeddable.addActionListener(new CheckListener("embeddable")); procedure.addActionListener(new CheckListener("procedure")); query.addActionListener(new CheckListener("query")); all.setEnabled(false); all.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dbEntity.setSelected(true); objEntity.setSelected(true); embeddable.setSelected(true); procedure.setSelected(true); query.setSelected(true); all.setEnabled(false); filterController.getTreeModel().setFiltered(filterController.getFilterMap()); filterController.getTree().updateUI(); } }); }
/** * Message sent from a customer gui to enable that customer's "I'm hungry" checkbox. * * @param c reference to the customer */ public void setCustomerEnabled(Customer c) { Customer cust = currentCustomer; if (c.equals(cust)) { customerStateCheckBox.setEnabled(true); customerStateCheckBox.setSelected(false); } }