Search in sources :

Example 46 with TextField

use of javafx.scene.control.TextField in project Gargoyle by callakrsos.

the class SqlPane method showTableInputDialog.

public Optional<Pair<String, String[]>> showTableInputDialog(Function<K, String> stringConverter) {
    final List<String> schemaList = getSchemaTree().getRoot().getChildren().stream().map(v -> {
        return stringConverter.apply(v.getValue());
    }).collect(Collectors.toList());
    String defaultSchema = "";
    try (Connection con = connectionSupplier.get()) {
        //
        //			String catalog = con.getCatalog();
        //			String schema = con.getSchema();
        //			ResultSet schemas = con.getMetaData().getCatalogs();
        //			if (schemas.next()) {
        //				String string = schemas.getString(1);
        //				System.out.println(string);
        //			}
        Map<String, Object> findOne = DbUtil.findOne(con, "select current_schema() as currentschema");
        if (findOne != null && !findOne.isEmpty()) {
            defaultSchema = ValueUtil.decode(findOne.get("currentschema"), "").toString();
        }
    } catch (Exception e4) {
        LOGGER.error(ValueUtil.toString(e4));
    }
    final String _defaultSchema = defaultSchema;
    if (tbResult.getItems().isEmpty())
        return Optional.empty();
    return DialogUtil.showInputCustomDialog(tbResult.getScene().getWindow(), "table Name", "테이블명을 입력하세요.", new CustomInputDialogAction<GridPane, String[]>() {

        TextField txtSchema;

        TextField txtTable;

        @Override
        public GridPane getNode() {
            GridPane gridPane = new GridPane();
            txtSchema = new TextField();
            txtTable = new TextField();
            FxUtil.installAutoTextFieldBinding(txtSchema, () -> {
                return schemaList;
            });
            FxUtil.installAutoTextFieldBinding(txtTable, () -> {
                return searchPattern(txtSchema.getText(), txtTable.getText()).stream().map(v -> stringConverter.apply(v.getValue())).collect(Collectors.toList());
            });
            txtSchema.setText(_defaultSchema);
            // Default TableName
            TreeItem<K> selectedItem = getSchemaTree().getSelectionModel().getSelectedItem();
            if (null != selectedItem) {
                K value = selectedItem.getValue();
                if (value instanceof TableItemTree) {
                    txtTable.setText(stringConverter.apply(value));
                }
            }
            Label label = new Label("Schema : ");
            Label label2 = new Label("Table : ");
            gridPane.add(label, 0, 0);
            gridPane.add(label2, 1, 0);
            gridPane.add(txtSchema, 0, 1);
            gridPane.add(txtTable, 1, 1);
            return gridPane;
        }

        @Override
        public String[] okClickValue() {
            String schema = txtSchema.getText().trim();
            String table = txtTable.getText().trim();
            String[] okValue = new String[2];
            okValue[0] = schema;
            okValue[1] = table;
            return okValue;
        }

        @Override
        public String[] cancelClickValue() {
            return null;
        }
    });
}
Also used : SystemLayoutViewController(com.kyj.fx.voeditor.visual.main.layout.SystemLayoutViewController) Arrays(java.util.Arrays) CheckComboBox(org.controlsfx.control.CheckComboBox) Application(javafx.application.Application) TabPane(javafx.scene.control.TabPane) ListChangeListener(javafx.collections.ListChangeListener) MacroControl(com.kyj.fx.voeditor.visual.component.macro.MacroControl) Map(java.util.Map) SQLPaneMotionable(com.kyj.fx.voeditor.visual.component.sql.functions.SQLPaneMotionable) SimpleIntegerProperty(javafx.beans.property.SimpleIntegerProperty) VariableMappingView(com.kyj.fx.voeditor.visual.component.popup.VariableMappingView) DockPane(com.kyj.fx.voeditor.visual.component.dock.pane.DockPane) SystemUtils(org.apache.commons.lang.SystemUtils) Strings(com.sun.btrace.BTraceUtils.Strings) ColumnExpression(com.kyj.fx.voeditor.visual.component.grid.EditableTableView.ColumnExpression) SplitPane(javafx.scene.control.SplitPane) Pair(javafx.util.Pair) EditableTableViewComposite(com.kyj.fx.voeditor.visual.component.grid.EditableTableViewComposite) KeyEvent(javafx.scene.input.KeyEvent) ValueExpression(com.kyj.fx.voeditor.visual.component.grid.EditableTableView.ValueExpression) FxUtil(com.kyj.fx.voeditor.visual.util.FxUtil) ResourceLoader(com.kyj.fx.voeditor.visual.momory.ResourceLoader) CustomInputDialogAction(com.kyj.fx.voeditor.visual.util.DialogUtil.CustomInputDialogAction) ObservableList(javafx.collections.ObservableList) BorderPane(javafx.scene.layout.BorderPane) TitledBorderPane(com.kyj.fx.voeditor.visual.component.TitledBorderPane) TableViewSelectionModel(javafx.scene.control.TableView.TableViewSelectionModel) MouseButton(javafx.scene.input.MouseButton) ASTSqlCodeAreaHelper(com.kyj.fx.voeditor.visual.component.text.ASTSqlCodeAreaHelper) TreeItem(javafx.scene.control.TreeItem) FXCollections(javafx.collections.FXCollections) GagoyleTabProxy(com.kyj.fx.voeditor.visual.main.layout.GagoyleTabProxy) DialogUtil(com.kyj.fx.voeditor.visual.util.DialogUtil) Supplier(java.util.function.Supplier) IntegerProperty(javafx.beans.property.IntegerProperty) ArrayList(java.util.ArrayList) TableItemTree(com.kyj.fx.voeditor.visual.component.sql.dbtree.commons.TableItemTree) Color(javafx.scene.paint.Color) Node(javafx.scene.Node) TableOpenResourceView(com.kyj.fx.voeditor.visual.component.popup.TableOpenResourceView) StringConverter(javafx.util.StringConverter) SchoolMgrerSpreadSheetView(com.kyj.fx.voeditor.visual.main.layout.SchoolMgrerSpreadSheetView) GridPane(jfxtras.scene.layout.GridPane) File(java.io.File) SqlTabPane(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTabPane) Menu(javafx.scene.control.Menu) KeyCodeCombination(javafx.scene.input.KeyCodeCombination) SelectionMode(javafx.scene.control.SelectionMode) TreeMap(java.util.TreeMap) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Tab(javafx.scene.control.Tab) ResultDialog(com.kyj.fx.voeditor.visual.component.ResultDialog) Button(javafx.scene.control.Button) Connection(java.sql.Connection) DbUtil(com.kyj.fx.voeditor.visual.util.DbUtil) LoggerFactory(org.slf4j.LoggerFactory) ToExcelFileFunction(com.kyj.fx.voeditor.visual.functions.ToExcelFileFunction) EncrypUtil(com.kyj.fx.voeditor.visual.util.EncrypUtil) ContextMenu(javafx.scene.control.ContextMenu) WindowEvent(javafx.stage.WindowEvent) TableView(javafx.scene.control.TableView) SqlKeywords(com.kyj.fx.voeditor.visual.component.text.SqlKeywords) Orientation(javafx.geometry.Orientation) HBox(javafx.scene.layout.HBox) TextField(javafx.scene.control.TextField) Main(com.kyj.fx.voeditor.visual.main.Main) MenuItem(javafx.scene.control.MenuItem) SimpleTextView(com.kyj.fx.voeditor.visual.component.text.SimpleTextView) ConfigResourceLoader(com.kyj.fx.voeditor.visual.momory.ConfigResourceLoader) Collectors(java.util.stream.Collectors) TreeView(javafx.scene.control.TreeView) ISchemaTreeItem(com.kyj.fx.voeditor.visual.component.sql.functions.ISchemaTreeItem) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) List(java.util.List) SqlTab(com.kyj.fx.voeditor.visual.component.sql.tab.SqlTab) Entry(java.util.Map.Entry) RowMapper(org.springframework.jdbc.core.RowMapper) Optional(java.util.Optional) DateUtil(com.kyj.fx.voeditor.visual.util.DateUtil) MouseEvent(javafx.scene.input.MouseEvent) HashMap(java.util.HashMap) TextFieldTableCell(javafx.scene.control.cell.TextFieldTableCell) Function(java.util.function.Function) BigDataDVO(com.kyj.fx.voeditor.visual.framework.BigDataDVO) TableColumn(javafx.scene.control.TableColumn) Insets(javafx.geometry.Insets) FxCollectors(com.kyj.fx.voeditor.visual.util.FxCollectors) Tooltip(javafx.scene.control.Tooltip) KeyCode(javafx.scene.input.KeyCode) ObjectProperty(javafx.beans.property.ObjectProperty) Modality(javafx.stage.Modality) Logger(org.slf4j.Logger) Label(javafx.scene.control.Label) Iterator(java.util.Iterator) ValueUtil(com.kyj.fx.voeditor.visual.util.ValueUtil) Consumer(java.util.function.Consumer) ActionEvent(javafx.event.ActionEvent) Stage(javafx.stage.Stage) ExtensionFilter(javafx.stage.FileChooser.ExtensionFilter) Collections(java.util.Collections) SharedMemory(com.kyj.fx.voeditor.visual.momory.SharedMemory) TableItemTree(com.kyj.fx.voeditor.visual.component.sql.dbtree.commons.TableItemTree) GridPane(jfxtras.scene.layout.GridPane) TreeItem(javafx.scene.control.TreeItem) ISchemaTreeItem(com.kyj.fx.voeditor.visual.component.sql.functions.ISchemaTreeItem) Connection(java.sql.Connection) Label(javafx.scene.control.Label) TextField(javafx.scene.control.TextField)

Example 47 with TextField

use of javafx.scene.control.TextField in project Gargoyle by callakrsos.

the class SystemLayoutViewController method createNewTreeViewMenuItems.

/**
	 * 트리뷰의 메뉴컨텍스트를 새로 생성ㅎ한다.
	 *
	 * @Date 2015. 10. 17.
	 * @User KYJ
	 */
private void createNewTreeViewMenuItems() {
    fileTreeContextMenu = new ContextMenu();
    MenuItem openFileMenuItem = new MenuItem("Open");
    Menu menuOpenWidth = new Menu("Open With ");
    /***********************************************************************************/
    // 조건에 따라 보여주는 아이템. [start]
    /***********************************************************************************/
    // FXML선택한경우에만 보여주는 조건처리.
    final MenuItem menuItemOpenWithSceneBuilder = new MenuItem("SceneBuilder");
    final MenuItem menuItemSCMGraphs = new MenuItem("SCM Graphs");
    menuItemSCMGraphs.setDisable(true);
    menuItemSCMGraphs.setOnAction(this::menuItemSCMGraphsOnAction);
    menuItemOpenWithSceneBuilder.setOnAction(this::menuItemOpenWithSceneBuilderOnAction);
    menuOpenWidth.setOnShowing(event -> {
        String sceneBuilderLocation = ResourceLoader.getInstance().get(ResourceLoader.SCENEBUILDER_LOCATION);
        TreeItem<FileWrapper> selectedTreeItem = this.treeProjectFile.getSelectionModel().getSelectedItem();
        boolean isRemoveOpenWidthSceneBuilderMenuItem = true;
        if (selectedTreeItem != null) {
            FileWrapper fileWrapper = selectedTreeItem.getValue();
            File selectedTree = fileWrapper.getFile();
            if (FileUtil.isFXML(selectedTree)) {
                if (!menuOpenWidth.getItems().contains(menuItemOpenWithSceneBuilder)) {
                    menuOpenWidth.getItems().add(menuItemOpenWithSceneBuilder);
                }
                isRemoveOpenWidthSceneBuilderMenuItem = false;
                File file = new File(sceneBuilderLocation);
                if (file.exists()) {
                    menuItemOpenWithSceneBuilder.setDisable(false);
                } else {
                    menuItemOpenWithSceneBuilder.setDisable(true);
                }
            }
        }
        if (isRemoveOpenWidthSceneBuilderMenuItem)
            menuOpenWidth.getItems().remove(menuItemOpenWithSceneBuilder);
    });
    Menu menuRunAs = new Menu("Run As");
    Menu menuPMD = new Menu("PMD");
    fileTreeContextMenu.setOnShowing(ev -> {
        TreeItem<FileWrapper> selectedTreeItem = this.treeProjectFile.getSelectionModel().getSelectedItem();
        boolean isDisableSCMGraphsMenuItem = true;
        if (selectedTreeItem != null) {
            menuRunAs.getItems().clear();
            menuPMD.getItems().clear();
            FileWrapper fileWrapper = selectedTreeItem.getValue();
            File file = fileWrapper.getFile();
            if (fileWrapper.isSVNConnected())
                isDisableSCMGraphsMenuItem = false;
            if (fileWrapper.isJavaProjectFile()) {
                LOGGER.debug("isJavaProjectFile true");
                menuRunAs.getItems().add(new MenuItem("Java Application"));
            }
            if (selectedTreeItem instanceof JavaProjectMemberFileTreeItem) {
                LOGGER.debug("projectFile Member true");
                if (FileUtil.isJavaFile(file)) {
                    MenuItem runJavaApp = new MenuItem("Java Application");
                    runJavaApp.setOnAction(this::miRunJavaAppOnAction);
                    menuRunAs.getItems().add(runJavaApp);
                }
            }
            if (PMDUtil.isSupportedLanguageVersions(file)) {
                MenuItem menuRunPmd = new MenuItem("Run PMD");
                menuRunPmd.setUserData(file);
                menuRunPmd.setOnAction(this::menuRunPmdOnAction);
                menuPMD.getItems().add(menuRunPmd);
            }
            if (file.isDirectory()) {
                MenuItem menuRunAllPmd = new MenuItem("Run All PMD");
                menuRunAllPmd.setUserData(file);
                menuRunAllPmd.setOnAction(this::menuRunPmdOnAction);
                menuPMD.getItems().add(menuRunAllPmd);
            }
            menuRunAs.getItems().add(new SeparatorMenuItem());
            menuRunAs.getItems().add(new MenuItem("Run Configurations"));
        }
        menuItemSCMGraphs.setDisable(isDisableSCMGraphsMenuItem);
    });
    /***********************************************************************************/
    // 조건에 따라 보여주는 아이템. [end]
    /***********************************************************************************/
    {
        MenuItem openSystemExplorerMenuItem = new MenuItem("Open Sys. Explorer");
        openSystemExplorerMenuItem.setOnAction(this::openSystemExplorerMenuItemOnAction);
        menuOpenWidth.getItems().add(openSystemExplorerMenuItem);
    }
    Menu newFileMenuItem = new Menu("New");
    MenuItem newDir = new MenuItem("Dir");
    newDir.setOnAction(this::newDirOnAction);
    newFileMenuItem.getItems().add(newDir);
    MenuItem deleteFileMenuItem = new MenuItem("Delete");
    KeyCodeCombination value = new KeyCodeCombination(KeyCode.DELETE);
    deleteFileMenuItem.setAccelerator(value);
    deleteFileMenuItem.setOnAction(this::deleteFileMenuItemOnAction);
    // 선택한 파일아이템을 VoEditor에서 조회시 사용
    // MenuItem voEditorMenuItem = new MenuItem("Show VO Editor");
    // //선택한 파일아이템을 DaoWizard에서 조회시 사용
    // MenuItem daoWizardMenuItem = new MenuItem("Show DAO Wizard");
    // 선택한 파일경로를 Vo Editor Location에 바인딩함.
    // MenuItem setVoEditorMenuItem = new MenuItem("SET Vo Editor
    // Directory");
    // 선택한 파일경로를 Vo Editor Location에 바인딩함.
    MenuItem voEditorMenuItem = new MenuItem("Vo Editor");
    // 선택한 파일경로를 DaoWizard Location에 바인딩함.
    MenuItem setDaoWizardMenuItem = new MenuItem("SET DAO Wizard Directory");
    // 경로 리프레쉬
    MenuItem refleshMenuItem = new MenuItem("Reflesh");
    // 코드분석
    MenuItem chodeAnalysisMenuItem = new MenuItem("자바 코드 분석");
    // 사양서 생성
    MenuItem makeProgramSpecMenuItem = new MenuItem("Gen. Program Spec.");
    // 파일 속성 조회
    MenuItem menuProperties = new MenuItem("Properties");
    menuProperties.setOnAction(this::menuPropertiesOnAction);
    chodeAnalysisMenuItem.setOnAction(this::menuItemCodeAnalysisMenuItemOnAction);
    fileTreeContextMenu.getItems().addAll(openFileMenuItem, menuOpenWidth, newFileMenuItem, deleteFileMenuItem, /* voEditorMenuItem, daoWizardMenuItem, */
    voEditorMenuItem, /* setVoEditorMenuItem, */
    setDaoWizardMenuItem, chodeAnalysisMenuItem, makeProgramSpecMenuItem, menuItemSCMGraphs, new SeparatorMenuItem(), refleshMenuItem, new SeparatorMenuItem(), menuPMD, new SeparatorMenuItem(), menuRunAs, new SeparatorMenuItem(), menuProperties);
    // daoWizardMenuItem.addEventHandler(ActionEvent.ACTION,
    // this::daoWizardMenuItemOnActionEvent);
    // Vo Editor
    // setVoEditorMenuItem.addEventHandler(ActionEvent.ACTION, event -> {
    // Node lookup = borderPaneMain.lookup("#txtLocation");
    // if (lookup != null && tmpSelectFileWrapper != null) {
    // TextField txtLocation = (TextField) lookup;
    // File file = tmpSelectFileWrapper.getFile();
    // if (file.isDirectory()) {
    // String absolutePath = file.getAbsolutePath();
    // ResourceLoader.getInstance().put(ResourceLoader.USER_SELECT_LOCATION_PATH,
    // absolutePath);
    // txtLocation.setText(absolutePath);
    // } else {
    // DialogUtil.showMessageDialog("Only Directory.");
    // }
    // }
    // tmpSelectFileWrapper = null;
    // });
    voEditorMenuItem.addEventHandler(ActionEvent.ACTION, this::voEditorMenuItemOnAction);
    // Dao Wizard
    setDaoWizardMenuItem.addEventHandler(ActionEvent.ACTION, event -> {
        Node lookup = borderPaneMain.lookup("#txtDaoLocation");
        if (lookup != null && tmpSelectFileWrapper != null) {
            TextField txtLocation = (TextField) lookup;
            File file = tmpSelectFileWrapper.getFile();
            if (file.exists() && file.isDirectory()) {
                ResourceLoader.getInstance().put(ResourceLoader.USER_SELECT_LOCATION_PATH, file.getAbsolutePath());
                Path relativize = FileUtil.toRelativizeForGagoyle(file);
                txtLocation.setText(File.separator + relativize.toString());
            } else {
                DialogUtil.showMessageDialog("Only Directory.");
            }
        }
        tmpSelectFileWrapper = null;
    });
    refleshMenuItem.setOnAction(event -> {
        TreeItem<FileWrapper> selectedItem = treeProjectFile.getSelectionModel().getSelectedItem();
        refleshWorkspaceTreeItem(selectedItem);
    });
    //함수위치로 이동
    //		deleteFileMenuItem.setOnAction(event -> {
    //			TreeItem<FileWrapper> selectedItem = treeProjectFile.getSelectionModel().getSelectedItem();
    //			if (selectedItem != null) {
    //				File file = selectedItem.getValue().getFile();
    //				if (file != null && file.exists()) {
    //					Optional<Pair<String, String>> showYesOrNoDialog = DialogUtil.showYesOrNoDialog("파일삭제.",
    //							file.getName() + " 정말 삭제하시겠습니까? \n[휴지통에 보관되지않음.]");
    //					showYesOrNoDialog.ifPresent(pair -> {
    //						if ("Y".equals(pair.getValue())) {
    //							TreeItem<FileWrapper> root = treeProjectFile.getRoot();
    //							root.getChildren().remove(selectedItem);
    //							file.delete();
    //						}
    //					});
    //				}
    //			}
    //		});
    makeProgramSpecMenuItem.setOnAction(event -> {
        TreeItem<FileWrapper> selectedItem = treeProjectFile.getSelectionModel().getSelectedItem();
        if (selectedItem != null) {
            File sourceFile = selectedItem.getValue().getFile();
            if (sourceFile != null && sourceFile.exists()) {
                try {
                    if (FileUtil.isJavaFile(sourceFile)) {
                        File targetFile = DialogUtil.showFileSaveCheckDialog(SharedMemory.getPrimaryStage(), chooser -> {
                            chooser.setInitialFileName(DateUtil.getCurrentDateString(DateUtil.SYSTEM_DATEFORMAT_YYYYMMDDHHMMSS));
                            chooser.getExtensionFilters().add(new ExtensionFilter(GargoyleExtensionFilters.DOCX_NAME, GargoyleExtensionFilters.DOCX));
                            chooser.setTitle("Save Program Spec. Doc");
                            chooser.setInitialDirectory(new File(SystemUtils.USER_HOME));
                        });
                        if (targetFile != null) {
                            boolean createDefault = ProgramSpecUtil.createDefault(sourceFile, targetFile);
                            if (createDefault)
                                FileUtil.openFile(targetFile);
                        }
                    } else {
                        DialogUtil.showMessageDialog("사양서 작성 가능한 유형이 아닙니다.");
                    }
                } catch (Exception e) {
                    DialogUtil.showExceptionDailog(e);
                }
            }
        }
    });
}
Also used : Path(java.nio.file.Path) JavaProjectMemberFileTreeItem(com.kyj.fx.voeditor.visual.component.JavaProjectMemberFileTreeItem) Node(javafx.scene.Node) ContextMenu(javafx.scene.control.ContextMenu) MenuItem(javafx.scene.control.MenuItem) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) KeyCodeCombination(javafx.scene.input.KeyCodeCombination) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) IOException(java.io.IOException) GargoyleException(com.kyj.fx.voeditor.visual.exceptions.GargoyleException) ExtensionFilter(javafx.stage.FileChooser.ExtensionFilter) FileWrapper(com.kyj.fx.voeditor.visual.component.FileWrapper) TextField(javafx.scene.control.TextField) Menu(javafx.scene.control.Menu) ContextMenu(javafx.scene.control.ContextMenu) File(java.io.File)

Example 48 with TextField

use of javafx.scene.control.TextField in project bitsquare by bitsquare.

the class ChaseQuickPayForm method addFormForDisplayAccount.

@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addLabelTextField(gridPane, gridRow, "Account name:", chaseQuickPayAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(chaseQuickPayAccount.getPaymentMethod().getId()));
    addLabelTextField(gridPane, ++gridRow, "Account holder name:", chaseQuickPayAccount.getHolderName());
    TextField field = addLabelTextField(gridPane, ++gridRow, "Email:", chaseQuickPayAccount.getEmail()).second;
    field.setMouseTransparent(false);
    addLabelTextField(gridPane, ++gridRow, "Currency:", chaseQuickPayAccount.getSingleTradeCurrency().getNameAndCode());
    addAllowedPeriod();
}
Also used : FormBuilder.addLabelInputTextField(io.bitsquare.gui.util.FormBuilder.addLabelInputTextField) InputTextField(io.bitsquare.gui.components.InputTextField) TextField(javafx.scene.control.TextField) FormBuilder.addLabelTextField(io.bitsquare.gui.util.FormBuilder.addLabelTextField)

Example 49 with TextField

use of javafx.scene.control.TextField in project bitsquare by bitsquare.

the class ClearXchangeForm method addFormForDisplayAccount.

@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addLabelTextField(gridPane, gridRow, "Account name:", clearXchangeAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(clearXchangeAccount.getPaymentMethod().getId()));
    addLabelTextField(gridPane, ++gridRow, "Account holder name:", clearXchangeAccount.getHolderName());
    TextField field = addLabelTextField(gridPane, ++gridRow, "Email or mobile no.:", clearXchangeAccount.getEmailOrMobileNr()).second;
    field.setMouseTransparent(false);
    addLabelTextField(gridPane, ++gridRow, "Currency:", clearXchangeAccount.getSingleTradeCurrency().getNameAndCode());
    addAllowedPeriod();
}
Also used : InputTextField(io.bitsquare.gui.components.InputTextField) TextField(javafx.scene.control.TextField)

Example 50 with TextField

use of javafx.scene.control.TextField in project bitsquare by bitsquare.

the class CryptoCurrencyForm method addFormForDisplayAccount.

@Override
public void addFormForDisplayAccount() {
    gridRowFrom = gridRow;
    addLabelTextField(gridPane, gridRow, "Account name:", cryptoCurrencyAccount.getAccountName(), Layout.FIRST_ROW_AND_GROUP_DISTANCE);
    addLabelTextField(gridPane, ++gridRow, "Payment method:", BSResources.get(cryptoCurrencyAccount.getPaymentMethod().getId()));
    Tuple2<Label, TextField> tuple2 = addLabelTextField(gridPane, ++gridRow, "Altcoin address:", cryptoCurrencyAccount.getAddress());
    addressLabel = tuple2.first;
    TextField field = tuple2.second;
    field.setMouseTransparent(false);
    addLabelTextField(gridPane, ++gridRow, "Altcoin:", cryptoCurrencyAccount.getSingleTradeCurrency().getNameAndCode());
    addAllowedPeriod();
}
Also used : Label(javafx.scene.control.Label) InputTextField(io.bitsquare.gui.components.InputTextField) TextField(javafx.scene.control.TextField)

Aggregations

TextField (javafx.scene.control.TextField)64 Label (javafx.scene.control.Label)24 Button (javafx.scene.control.Button)16 Scene (javafx.scene.Scene)15 InputTextField (io.bitsquare.gui.components.InputTextField)13 Insets (javafx.geometry.Insets)11 GridPane (javafx.scene.layout.GridPane)11 Tooltip (javafx.scene.control.Tooltip)8 Pair (javafx.util.Pair)8 BorderPane (javafx.scene.layout.BorderPane)7 VBox (javafx.scene.layout.VBox)7 ArrayList (java.util.ArrayList)5 List (java.util.List)5 Dialog (javafx.scene.control.Dialog)5 Color (javafx.scene.paint.Color)5 Stage (javafx.stage.Stage)5 FormBuilder.addLabelInputTextField (io.bitsquare.gui.util.FormBuilder.addLabelInputTextField)4 FormBuilder.addLabelTextField (io.bitsquare.gui.util.FormBuilder.addLabelTextField)4 File (java.io.File)4 ObjectProperty (javafx.beans.property.ObjectProperty)4