public Options(Browser b) { // combo boxing ypicker.getItems().addAll("No CSV file selected"); xpicker.getItems().addAll("No CSV file selected"); colorpicker.getItems().addAll("No CSV file selected"); typepicker.getItems().addAll("Regular Scatter", "Voronoi Tesselation", "Centroids"); ypicker.setPromptText("Assert Y Axis"); xpicker.setPromptText("Assert X Axis"); colorpicker.setPromptText("Assert Color Scale"); typepicker.setPromptText("Type of visualization"); getChildren().addAll(xpicker, ypicker, colorpicker, typepicker, btn); btn.setOnAction( new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { b.xAxisInput = xpicker.getValue(); b.yAxisInput = ypicker.getValue(); b.type = typepicker.getValue(); b.color = colorpicker.getValue(); b.refresh(); } }); }
/** Sets the CharacterSetComboBox Values corresponding to the allowed Values for this device. */ private void setUpSelectCharacterSetCharacterSet() { selectCharacterSet_characterSet.getItems().clear(); try { for (int i = 0; i < ((RemoteOrderDisplay) service).getCharacterSetList().split(",").length; i++) { selectCharacterSet_characterSet .getItems() .add( Integer.parseInt( (((RemoteOrderDisplay) service).getCharacterSetList().split(","))[i])); if (i == 0) { selectCharacterSet_characterSet.setValue( Integer.parseInt( (((RemoteOrderDisplay) service).getCharacterSetList().split(","))[i])); } } } catch (JposException e) { e.printStackTrace(); JOptionPane.showMessageDialog( null, "Error occured when getting the CharacterSetList", "Error occured!", JOptionPane.WARNING_MESSAGE); } }
public void resetOptions(String[] options) { xpicker.getItems().addAll(options); ypicker.getItems().addAll(options); colorpicker.getItems().addAll(options); System.out.println("asdfasd"); }
private void loadWorkflowProcessesComboBox() { workflowProcessesComboBox.getItems().clear(); // workflowProcessesComboBox.getItems().add(WorkflowProcess.PROMPT); workflowProcessesComboBox.getItems().add(WorkflowProcess.REVIEW3); workflowProcessesComboBox.getItems().add(WorkflowProcess.DUAL_REVIEW); workflowProcessesComboBox.getSelectionModel().select(null); }
private void setUpCheckHealthLevel() { checkHealth_level.getItems().clear(); checkHealth_level.getItems().add(CommonConstantMapper.JPOS_CH_INTERNAL.getConstant()); checkHealth_level.getItems().add(CommonConstantMapper.JPOS_CH_EXTERNAL.getConstant()); checkHealth_level.getItems().add(CommonConstantMapper.JPOS_CH_INTERACTIVE.getConstant()); checkHealth_level.setValue(CommonConstantMapper.JPOS_CH_INTERNAL.getConstant()); }
public void initProviders() throws DataBaseException { providers = dao.getProviders(); selectProviderCb.getItems().clear(); for (Provider provider : providers) { selectProviderCb.getItems().add(provider.getName()); } selectProviderCb.setValue(providers.get(0).getName()); }
@Override public void handle(final ActionEvent event) { operationList.getItems().removeAll(); for (String st : SoapUIUtil.getOperationName(wsdrlUrlTextField.getText().trim(), wireMockOptions)) { operationList.getItems().add(st); } for (String st : SoapUIUtil.getEndPoint(wsdrlUrlTextField.getText(), wireMockOptions)) { serviceEndPointUrl.setText(st); } }
private void setUpDrawBoxBorderType() { drawBox_borderType.getItems().clear(); drawBox_borderType .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_BDR_SINGLE.getConstant()); drawBox_borderType .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_BDR_DOUBLE.getConstant()); drawBox_borderType.getItems().add(RemoteOrderDisplayConstantMapper.ROD_BDR_SOLID.getConstant()); drawBox_borderType.setValue(RemoteOrderDisplayConstantMapper.ROD_BDR_SINGLE.getConstant()); }
private void setUpTransactionDisplayFunction() { transactionDisplay_function.getItems().clear(); transactionDisplay_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_TD_TRANSACTION.getConstant()); transactionDisplay_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_TD_NORMAL.getConstant()); transactionDisplay_function.setValue( RemoteOrderDisplayConstantMapper.ROD_TD_TRANSACTION.getConstant()); }
private void setUpControlClockMode() { controlClock_mode.getItems().clear(); controlClock_mode.getItems().add(RemoteOrderDisplayConstantMapper.ROD_CLK_SHORT.getConstant()); controlClock_mode.getItems().add(RemoteOrderDisplayConstantMapper.ROD_CLK_NORMAL.getConstant()); controlClock_mode .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_CLK_12_LONG.getConstant()); controlClock_mode .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_CLK_24_LONG.getConstant()); controlClock_mode.setValue(RemoteOrderDisplayConstantMapper.ROD_CLK_SHORT.getConstant()); }
public void init() { /* Image img1 = new Image(TermProjectMain.class.getResourceAsStream("bkash.png")); bkash.setImage(img1); Image img2 = new Image(TermProjectMain.class.getResourceAsStream("sure cash.png")); sureCash.setImage(img2); Image img3 = new Image(TermProjectMain.class.getResourceAsStream("dutch bangla.png")); DBBL.setImage(img3); Image img4 = new Image(TermProjectMain.class.getResourceAsStream("mastercard.png")); masterCard.setImage(img4); Image img5 = new Image(TermProjectMain.class.getResourceAsStream("visa.png")); visa.setImage(img5); */ // fromBoxList.setAll(options); // toBoxList.setAll(options); // fromComboBox.getItems().addAll(fromBoxList); c = new clientInfo(); fromComboBox.getItems().addAll(options); // toComboBox.getItems().addAll(toBoxList); toComboBox.getItems().addAll(options); fromComboBox.setVisibleRowCount(4); toComboBox.setVisibleRowCount(4); // the code fragment below ensures that no day before today is selected from the datePicker by // disabling the selecting option for those days and marking them in pink color final Callback<DatePicker, DateCell> dayCellFactory = new Callback<DatePicker, DateCell>() { @Override public DateCell call(final DatePicker datePicker) { return new DateCell() { @Override public void updateItem(LocalDate item, boolean empty) { super.updateItem(item, empty); if (item.isBefore(LocalDate.now())) { setDisable(true); setStyle("-fx-background-color: #ffc0cb;"); } } }; } }; datePick.setDayCellFactory(dayCellFactory); datePick.setEditable(false); final ToggleGroup group = new ToggleGroup(); ACradioButton.setToggleGroup(group); nonACradioButton.setToggleGroup(group); }
public void updateUnidades(Map<Integer, String> items) { unidades.getItems().clear(); unidades.getItems().add(new ComboboxItem(0, "Selecione")); unidades.getSelectionModel().select(0); for (Map.Entry<Integer, String> entry : items.entrySet()) { ComboboxItem item = new ComboboxItem(entry.getKey(), entry.getValue()); unidades.getItems().add(item); if (entry.getKey().equals(unidadeAtual)) { unidades.getSelectionModel().select(item); updateServicos(main.getService().buscarServicos(entry.getKey())); } } }
private void setUpUpdateVideoRegionAttributeFunction() { updateVideoRegionAttribute_function.getItems().clear(); updateVideoRegionAttribute_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_UA_SET.getConstant()); updateVideoRegionAttribute_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_UA_INTENSITY_ON.getConstant()); updateVideoRegionAttribute_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_UA_INTENSITY_OFF.getConstant()); updateVideoRegionAttribute_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_UA_REVERSE_ON.getConstant()); updateVideoRegionAttribute_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_UA_REVERSE_OFF.getConstant()); updateVideoRegionAttribute_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_UA_BLINK_ON.getConstant()); updateVideoRegionAttribute_function .getItems() .add(RemoteOrderDisplayConstantMapper.ROD_UA_BLINK_OFF.getConstant()); updateVideoRegionAttribute_function.setValue( RemoteOrderDisplayConstantMapper.ROD_UA_SET.getConstant()); }
@Override public void start(Stage primaryStage) throws Exception { BorderPane outerPane = new BorderPane(); HBox topBox = new HBox(20); HBox bottomBox = new HBox(20); outerPane.setCenter(newText); fontChoice.setValue("Times New Roman"); sizeChoice.setValue(12); topBox.setPadding(new Insets(20, 20, 20, 20)); bottomBox.setPadding(new Insets(20, 20, 20, 20)); List<String> items = Font.getFamilies(); fontChoice.getItems().addAll(items); for (int i = 1; i <= 100; i++) sizeChoice.getItems().add(i); topBox.getChildren().addAll(fontName, fontChoice, fontSize, sizeChoice); bottomBox.getChildren().addAll(bold, italic); topBox.setAlignment(Pos.CENTER); bottomBox.setAlignment(Pos.CENTER); outerPane.setTop(topBox); outerPane.setCenter(newText); outerPane.setBottom(bottomBox); fontChoice.setOnAction( e -> { setFont(); }); sizeChoice.setOnAction( e -> { setFont(); }); bold.setOnAction( e -> { setFont(); }); italic.setOnAction( e -> { setFont(); }); Scene scene = new Scene(outerPane, X, Y); primaryStage.setScene(scene); primaryStage.show(); }
@Override public void initialize(URL url, ResourceBundle rb) { backButton.setCancelButton(true); Config.getInstance().playerList = new Player[Config.getInstance().maxPlayers]; adjustPlayerCount(); assert raceCombo != null : "fx:id=\"myChoices\" was not injected: check your FXML file 'foo.fxml'."; raceCombo.setItems(FXCollections.observableArrayList()); raceCombo.getItems().add("FOLD"); raceCombo.getItems().add("FAULT-BLOCK"); raceCombo.getItems().add("DOME"); raceCombo.getItems().add("VOLCANIC"); raceCombo.getItems().add("PLATEAU"); updateValues(); }
private void initSettingsPane() { trainTroopsSlider.setMin(0); trainTroopsSlider.setMax(Settings.MAX_TRAIN_TROOPS); trainTroopsSlider.setBlockIncrement(1); trainTroopsSlider .valueProperty() .addListener( (observable, oldValue, newValue) -> { trainTroopsSliderPreview.setText( String.format("%d", MainController.toInt(newValue.doubleValue()))); }); final Troop[] availableTroops = model.getAvailableTroops(); rax1ComboBox.getItems().addAll(availableTroops); rax2ComboBox.getItems().addAll(availableTroops); rax3ComboBox.getItems().addAll(availableTroops); rax4ComboBox.getItems().addAll(availableTroops); rax5ComboBox.getItems().addAll(availableTroops); rax6ComboBox.getItems().addAll(availableTroops); autoAttackComboBox.getItems().addAll(Attack.noStrategy()); autoAttackComboBox.getItems().addAll(Attack.getAvailableStrategies()); autoAttackComboBox.setValue(autoAttackComboBox.getItems().get(0)); final ChangeListener<String> intFieldListener = (observable, oldValue, newValue) -> { try { if (!newValue.isEmpty()) { Integer.parseInt(newValue); } } catch (final NumberFormatException e) { ((TextField) ((StringProperty) observable).getBean()).setText(oldValue); } }; goldField.textProperty().addListener(intFieldListener); elixirField.textProperty().addListener(intFieldListener); deField.textProperty().addListener(intFieldListener); maxThField.textProperty().addListener(intFieldListener); logLevelComboBox .getItems() .addAll( Level.FINEST, Level.FINER, Level.FINE, Level.CONFIG, Level.INFO, Level.WARNING, Level.SEVERE); logLevelComboBox.setValue(logLevelComboBox.getItems().get(1)); updateUI(); }
@FXML public void initialize(URL location, ResourceBundle resources) { for (String s : Main.settings.getSkins()) { skin.getItems().add(s); } skin.setValue(Main.settings.getSkin()); skin.setOnAction( event -> { Main.settings.setSkin(skin.getSelectionModel().getSelectedItem()); save(); }); for (String list : Main.settings.getLists().keySet()) { TextField k = new TextField(list); k.setId(list); String listName = Main.settings.getLists().get(list); TextField v = new TextField(listName); v.setId("V" + list); Button deleteButton = new Button(); deleteButton.setText("Delete"); addListListener(k, v, deleteButton); lists.getChildren().add(k); listsName.getChildren().add(v); deleteButtons.getChildren().add(deleteButton); } }
/** Initializes the controller class. */ @Override public void initialize(URL url, ResourceBundle rb) { Config config = new ConfigLoader().load(); generateLengthComboBox.getItems().clear(); for (int i = 1; i < config.getMaxCharacterLength() + 1; i++) { generateLengthComboBox.getItems().add(i); } generateLengthComboBox .getSelectionModel() .select(Integer.valueOf(config.getDefaultCharacterLength())); generateCharacterTypeComboBox.getItems().clear(); generateCharacterTypeComboBox.getItems().addAll(CharacterType.allTextValues()); generateCharacterTypeComboBox.getSelectionModel().select(CharacterType.ALPHA_NUMERIC.text); }
@Override protected void activate() { currencyComboBox.setItems(model.getTradeCurrencies()); currencyComboBox.getSelectionModel().select(model.getTradeCurrency()); currencyComboBox.setVisibleRowCount(Math.min(currencyComboBox.getItems().size(), 25)); currencyComboBox.setOnAction( e -> { model.onSetTradeCurrency(currencyComboBox.getSelectionModel().getSelectedItem()); updateChartData(); }); model.getOfferBookListItems().addListener(changeListener); tradeCurrencySubscriber = EasyBind.subscribe( model.tradeCurrency, newValue -> { String code = newValue.getCode(); areaChart.setTitle("Offer book for " + newValue.getName()); priceColumnLabel.set("Price (" + code + "/BTC)"); volumeColumnLabel.set("Volume (" + code + ")"); xAxis.setLabel(priceColumnLabel.get()); xAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(xAxis, "", "")); }); buyOfferTableView.setItems(model.getBuyOfferList()); sellOfferTableView.setItems(model.getSellOfferList()); updateChartData(); }
private void gettars() throws IOException { tars.clear(); int num = FromServer.readInt(); for (int i = 0; i < num; i++) tars.add(FromServer.readUTF()); cbbackups.getItems().clear(); cbbackups.getItems().addAll(tars); }
private void getusers() throws IOException { users.clear(); int num = FromServer.readInt(); for (int i = 0; i < num; i++) users.add(FromServer.readUTF()); cbselectuser.getItems().clear(); cbselectuser.getItems().addAll(users); }
private void getgroupe() throws IOException { groups.clear(); int num = FromServer.readInt(); for (int i = 0; i < num; i++) groups.add(FromServer.readUTF()); cbgroup.getItems().clear(); cbgroup.getItems().addAll(groups); }
/** * Dump Java Class Histogram to CSV. * * @param isSelected If this value is true, this method dumps data which is selected in class * filter, otherwise this method dumps all snapshot data. */ public void dumpClassHistogramToCSV(boolean isSelected) { FileChooser dialog = new FileChooser(); ResourceBundle resource = ResourceBundle.getBundle("snapshotResources", new Locale(HeapStatsUtils.getLanguage())); dialog.setTitle(resource.getString("dialog.csvchooser.title")); dialog.setInitialDirectory(new File(HeapStatsUtils.getDefaultDirectory())); dialog .getExtensionFilters() .addAll( new ExtensionFilter("CSV file (*.csv)", "*.csv"), new ExtensionFilter("All files", "*.*")); File csvFile = dialog.showSaveDialog(WindowController.getInstance().getOwner()); if (csvFile != null) { Predicate<? super ObjectData> filter = histogramController.getFilter(); TaskAdapter<CSVDumpHeap> task = new TaskAdapter<>( new CSVDumpHeap( csvFile, isSelected ? currentTarget.get() : startCombo.getItems(), isSelected ? filter : null, HeapStatsUtils.getReplaceClassName())); super.bindTask(task); Thread parseThread = new Thread(task); parseThread.start(); } }
public void setupBindings() { populateProdFreqValues(); populateProdTypeValues(); populateBillCategoryValues(); refreshProdSpecialPriceTable(); checkItems(); dowTF .getItems() .addAll("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"); nameTF.setText(productRow.getName()); typeTF.getSelectionModel().select(productRow.getType()); priceTF.setText("" + productRow.getPrice()); mondayTF.setText("" + productRow.getMonday()); tuesdayTF.setText("" + productRow.getTuesday()); wednesdayTF.setText("" + productRow.getWednesday()); thursdayTF.setText("" + productRow.getThursday()); fridayTF.setText("" + productRow.getFriday()); saturdayTF.setText("" + productRow.getSaturday()); sundayTF.setText("" + productRow.getSunday()); codeTF.setText(productRow.getCode()); dowTF.getSelectionModel().select(productRow.getDow()); firstDeliveryDate.setValue(productRow.getFirstDeliveryDate()); issueDate.setValue(productRow.getIssueDate()); billCategoryTF.getSelectionModel().select(productRow.getBillCategory()); }
private void setUpControlClockClockID() { controlClock_clockID.getItems().clear(); try { for (int i = 0; i < ((RemoteOrderDisplay) service).getClocks(); i++) { controlClock_clockID.getItems().add(i); } } catch (JposException e) { e.printStackTrace(); JOptionPane.showMessageDialog( null, "Error occured when getting the ClockList", "Error occured!", JOptionPane.WARNING_MESSAGE); } controlClock_clockID.setValue(1); }
public void iniciarCategorias() { cruds = new CRUDArticulos(); categorias = cruds.traerCategorias(); for (int i = 0; i < categorias.size(); i++) { cmbCategorias.getItems().add(categorias.get(i).getNombre()); } }
@Override public void refresh() { getRoot() .getScene() .addEventFilter( KeyEvent.KEY_PRESSED, new EventHandler<KeyEvent>() { @Override public void handle(KeyEvent event) { if (event.getCode().equals(KeyCode.ESCAPE)) { cancel(); } else if (event.getCode().equals(KeyCode.ENTER)) { save(); } } }); languages.getItems().clear(); languages.getItems().addAll(ResourceUtil.LOCALES); languages.setConverter( new StringConverter<Locale>() { @Override public Locale fromString(String string) { return null; } @Override public String toString(Locale object) { return object.getDisplayLanguage(); } }); languages.getSelectionModel().select(getPresenter().getLanguage()); }
private void setUpRestoreVideoRegionBufferID() { restoreVideoRegion_bufferID.getItems().clear(); try { for (int i = 0; i < ((RemoteOrderDisplay) service).getVideoSaveBuffers(); i++) { restoreVideoRegion_bufferID.getItems().add(i); } } catch (JposException e) { e.printStackTrace(); JOptionPane.showMessageDialog( null, "Error occured when getting the BufferIDList", "Error occured!", JOptionPane.WARNING_MESSAGE); } restoreVideoRegion_bufferID.setValue(1); }
public void populateProdTypeValues() { try { Connection con = Main.dbConnection; if (!con.isValid(0)) { con = Main.reconnect(); } productTypeValues.clear(); PreparedStatement stmt = con.prepareStatement( "select value, code, seq, lov_lookup_id from lov_lookup where code='PRODUCT_TYPE' order by seq"); ResultSet rs = stmt.executeQuery(); while (rs.next()) { productTypeValues.add(rs.getString(1)); } typeTF.getItems().addAll(productTypeValues); } catch (SQLException e) { Main._logger.debug("Error :", e); e.printStackTrace(); } catch (Exception e) { Main._logger.debug("Error :", e); e.printStackTrace(); } }
private ComboBox<String> generateVariableSelector() { Set vars = new TreeSet<>(); actions.stream().map(Action::getVariableNames).forEach(vars::addAll); ComboBox<String> box = new ComboBox<>(); vars.add(DONT_USE); box.getItems().addAll(vars); return box; }