Package org.openpnp.gui.components
Class ComponentDecorators
- java.lang.Object
-
- org.openpnp.gui.components.ComponentDecorators
-
public class ComponentDecorators extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ComponentDecorators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
decorateWithAutoSelect(javax.swing.JTextField textField)
Adds an auto selection decoration to the JTextField.static void
decorateWithAutoSelectAndLengthConversion(javax.swing.JTextField textField)
static void
decorateWithLengthConversion(javax.swing.JTextField textField)
static void
decorateWithLengthConversion(javax.swing.JTextField textField, java.lang.String format)
Adds a length conversion decoration to the JTextField.
-
-
-
Method Detail
-
decorateWithAutoSelect
public static void decorateWithAutoSelect(javax.swing.JTextField textField)
Adds an auto selection decoration to the JTextField. Whenever the JTextField gains focus the text in it will be selected.- Parameters:
textField
-
-
decorateWithLengthConversion
public static void decorateWithLengthConversion(javax.swing.JTextField textField)
-
decorateWithLengthConversion
public static void decorateWithLengthConversion(javax.swing.JTextField textField, java.lang.String format)
Adds a length conversion decoration to the JTextField. When the JTextField loses focus or has it's action triggered the text will be converted to a Length value in the system units and then have it's text replaced with the value.- Parameters:
textField
-
-
decorateWithAutoSelectAndLengthConversion
public static void decorateWithAutoSelectAndLengthConversion(javax.swing.JTextField textField)
-
-