1 /*******************************************************************************
2 * Copyhacked (H) 2012-2025.
3 * This program and the accompanying materials
4 * are made available under no term at all, use it like
5 * you want, but share and discuss it
6 * every time possible with every body.
7 *
8 * Contributors:
9 * ron190 at ymail dot com - initial implementation
10 *******************************************************************************/
11 package com.jsql.view.swing.text;
12
13 import javax.swing.*;
14
15 /**
16 * A JTextField decorated with popup menu and border.
17 */
18 public class JPopupTextField extends JPopupTextComponent<JTextField> implements DecoratorJComponent<JTextField> {
19
20 public JPopupTextField(String placeholder) {
21 this(new JTextFieldPlaceholder(placeholder));
22 }
23
24 /**
25 * Build new instance of JTextField to decorate with default text.
26 * @param value Text to display
27 */
28 public JPopupTextField(String placeholder, String value) {
29 this(new JTextFieldPlaceholder(placeholder, value));
30 }
31
32 /**
33 * Decorate a provided JTextField.
34 * @param proxy The JTextField to decorate
35 */
36 public JPopupTextField(JTextField proxy) {
37 super(proxy);
38 }
39 }