@Override public void actionPerformed(ActionEvent event) { jl_font.setSelectedValue(Font.DIALOG, true); jl_fontSize.setSelectedValue("12", true); } });
@Override public boolean revertOptions() { Font f = ServiceLocator.getInstance(RESTViewImpl.class).getTextAreaFont(); jl_font.setSelectedValue(f.getFamily(), true); jl_fontSize.setSelectedValue(String.valueOf(f.getSize()), true); return true; }
@Override public void initOptions() { Font f = null; String fontName = ServiceLocator.getInstance(IGlobalOptions.class).getProperty(PROP_PREFIX + "font"); String fontSizeStr = ServiceLocator.getInstance(IGlobalOptions.class).getProperty(PROP_PREFIX + "fontSize"); int fontSize = 12; if(fontSizeStr != null){ try{ fontSize = Integer.parseInt(fontSizeStr); } catch(NumberFormatException ex){ // leave the default font size of 12 } } // else leave default font size of 12 if(fontName == null){ LOG.info("Font configuration not available in configuration. Reverting to default font."); f = new Font(Font.DIALOG, Font.PLAIN, 12); } else{ f = new Font(fontName, Font.PLAIN, fontSize); } jl_font.setSelectedValue(f.getFamily(), true); jl_fontSize.setSelectedValue(String.valueOf(f.getSize()), true); ServiceLocator.getInstance(RESTViewImpl.class).setTextAreaFont(f); }
fontList.setSelectedValue(settings.getFontName(), true); fontSizeSpinner.setValue(new Integer(settings.getFontSize())); boldCheckBox.setSelected(settings.isBold());
fontList.setSelectedValue(settings.getFontName(), true); fontSizeSpinner.setValue(new Integer(settings.getFontSize())); boldCheckBox.setSelected(settings.isBold());
renderingBackgroundColor = new Color(backgroundColor.getRed() / 255f, backgroundColor.getGreen() / 255f, backgroundColor.getBlue() / 255f, 1); fontList.setSelectedValue(prefs.get("system.font", "Arial"), true); fontFileText.setText(prefs.get("font.file", ""));
renderingBackgroundColor = new Color(backgroundColor.getRed() / 255f, backgroundColor.getGreen() / 255f, backgroundColor.getBlue() / 255f, 1); fontList.setSelectedValue(prefs.get("system.font", "Arial"), true); fontFileText.setText(prefs.get("font.file", ""));
@Override public void setValue( Object value ) { _list.setSelectedValue( value, true ); }
/** */ public void setSelectedItem(final Object selectedItem) { elementaryConditionList.setSelectedValue(selectedItem, true); }
public void setValue(String value) { list.clearSelection(); list.setSelectedValue(value, true); input.setText(value); }
/** * Chooses the specified value in the text field and list. * @param value the value to be set */ public void setValue(final String value) { list.setSelectedValue(value, true); text.setText(value); }
private void scrollToValue(String value) { list.setSelectedValue(value, true); list.clearSelection(); }
private void init(Font font) { selectedFont = font; String[] fontFamilies = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); this.fontList.setListData(fontFamilies); String family = font.getFamily(); fontList.setSelectedValue(font.getFamily(), true); sizeComboBox.setSelectedItem(String.valueOf(font.getSize())); exampleLabel.setFont(font); }
public void actionPerformed(ActionEvent e) { int i = languageList.getSelectedIndex(); Object o = languageListModel.getElementAt(i); languageListModel.removeElementAt(i); userListModel.addElement(o); userList.setSelectedValue(o, true); } }
private void moveUp() { int selectedIndex = list.getSelectedIndex(); if (selectedIndex > 0) { swap(selectedIndex, selectedIndex -1); list.setSelectedValue(data.get(selectedIndex - 1), true); } }
private void moveDown() { int selectedIndex = list.getSelectedIndex(); if (selectedIndex > -1 && selectedIndex < data.size() - 1) { swap(selectedIndex, selectedIndex + 1); list.setSelectedValue(data.get(selectedIndex + 1), true); } }
/** * Move up a selected item. * * @param item the selected item * @since 2.5.26 */ public void moveUpSelected(O item) { ui.getModel().moveUpSelected(item); ui.getSelectedList().setSelectedValue(item, true); }
private void addGemPathActionPerformed(java.awt.event.ActionEvent evt) { File repo = GemPanel.chooseGemRepository(this); if (repo != null) { String absPath = repo.getAbsolutePath(); if (!getGemPathListModel().getPaths().contains(absPath)) { getGemPathListModel().addPath(repo); refreshPlatform(); gemPathList.requestFocus(); gemPathList.setSelectedValue(absPath, true); } } }
public void actionPerformed(final ActionEvent e) { final int index = _animList.getSelectedIndex(); final AnimationEntry entry = _animList.getSelectedValue(); getEdittedParticles().getTexAnimation().removeEntry(entry); getEdittedParticles().getTexAnimation().addEntry(index + 1, entry); updateAnimModel(); _animList.setSelectedValue(entry, true); } });
private void OnAddTestCase() { if(currentRule == null) return; final TestCase newCase = new TestCase( new TestCaseInputString(""), new TestCaseOutputResult(true)); this.currentRule.addTestCase(newCase); setCurrentTestCase(newCase); this.listCases.setSelectedValue(newCase, true); this.listCases.updateUI(); this.OnTestCaseSelected(newCase); this.onTestCaseNumberChange.actionPerformed(null); }