org.controlsfx.control.textfield.CustomTextField Java Examples

The following examples show how to use org.controlsfx.control.textfield.CustomTextField. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NavigationView.java    From PreferencesFX with Apache License 2.0 5 votes vote down vote up
/**
 * Initializes the TextField and sets the search icon.
 */
private void setupTextField() {
  searchFld = new CustomTextField();
  GlyphFont fontAwesome = GlyphFontRegistry.font("FontAwesome");
  Glyph glyph = fontAwesome.create(FontAwesome.Glyph.SEARCH).color(Color.GRAY);
  glyph.setPadding(new Insets(0, 3, 0, 5));
  searchFld.setLeft(glyph);
}
 
Example #2
Source File: SearchControls.java    From VocabHunter with Apache License 2.0 5 votes vote down vote up
public SearchControls(
    final ToolBar barSearch, final CustomTextField fieldSearch, final Label labelMatches,
    final Button buttonCloseSearch, final Button buttonSearchUp, final Button buttonSearchDown) {
    this.barSearch = barSearch;
    this.fieldSearch = fieldSearch;
    this.labelMatches = labelMatches;
    this.buttonCloseSearch = buttonCloseSearch;
    this.buttonSearchUp = buttonSearchUp;
    this.buttonSearchDown = buttonSearchDown;
}
 
Example #3
Source File: NameEditor.java    From OpenLabeler with Apache License 2.0 4 votes vote down vote up
private void setupClearButtonField(CustomTextField customTextField)  throws Exception {
    Method m = TextFields.class.getDeclaredMethod("setupClearButtonField", TextField.class, ObjectProperty.class);
    m.setAccessible(true);
    m.invoke(null, customTextField, customTextField.rightProperty());
}
 
Example #4
Source File: FindReplacePane.java    From markdown-writer-fx with BSD 2-Clause "Simplified" License 4 votes vote down vote up
private void initComponents() {
	// JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
	pane = new MigPane();
	findField = new CustomTextField();
	previousButton = new Button();
	nextButton = new Button();
	matchCaseButton = new ToggleButton();
	regexButton = new ToggleButton();
	findInfoLabel = new Label();
	closeButton = new Button();
	replacePane = new MigPane();
	replaceField = new CustomTextField();
	replaceButton = new Button();
	replaceAllButton = new Button();
	replaceInfoLabel = new Label();
	nOfHitCountLabel = new Label();

	//======== pane ========
	{
		pane.setLayout("insets 0,hidemode 3");
		pane.setCols("[shrink 0,fill][fill]0[fill][pref:n,fill]1px[pref:n,fill][grow,fill][fill]");
		pane.setRows("[fill]0[]");

		//---- findField ----
		findField.setPromptText(Messages.get("FindReplacePane.findField.promptText"));
		findField.setPrefColumnCount(15);
		pane.add(findField, "cell 0 0");

		//---- previousButton ----
		previousButton.setFocusTraversable(false);
		pane.add(previousButton, "cell 1 0");

		//---- nextButton ----
		nextButton.setFocusTraversable(false);
		pane.add(nextButton, "cell 2 0");

		//---- matchCaseButton ----
		matchCaseButton.setText("Aa");
		matchCaseButton.setFocusTraversable(false);
		pane.add(matchCaseButton, "cell 3 0");

		//---- regexButton ----
		regexButton.setText(".*");
		regexButton.setFocusTraversable(false);
		pane.add(regexButton, "cell 4 0");
		pane.add(findInfoLabel, "cell 5 0");

		//---- closeButton ----
		closeButton.setFocusTraversable(false);
		pane.add(closeButton, "cell 6 0");

		//======== replacePane ========
		{
			replacePane.setLayout("insets rel 0 0 0");
			replacePane.setCols("[shrink 0,fill][pref:n,fill][pref:n,fill][grow,fill]");
			replacePane.setRows("[]");

			//---- replaceField ----
			replaceField.setPromptText(Messages.get("FindReplacePane.replaceField.promptText"));
			replaceField.setPrefColumnCount(15);
			replacePane.add(replaceField, "cell 0 0");

			//---- replaceButton ----
			replaceButton.setText(Messages.get("FindReplacePane.replaceButton.text"));
			replaceButton.setFocusTraversable(false);
			replacePane.add(replaceButton, "cell 1 0");

			//---- replaceAllButton ----
			replaceAllButton.setText(Messages.get("FindReplacePane.replaceAllButton.text"));
			replaceAllButton.setFocusTraversable(false);
			replacePane.add(replaceAllButton, "cell 2 0");
			replacePane.add(replaceInfoLabel, "cell 3 0");
		}
		pane.add(replacePane, "cell 0 1 7 1");
	}

	//---- nOfHitCountLabel ----
	nOfHitCountLabel.setText(Messages.get("FindReplacePane.nOfHitCountLabel.text"));
	// JFormDesigner - End of component initialization  //GEN-END:initComponents
}