public class DecimalInput extends java.lang.Object
JPanel
which used GridBagLayout
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DOUBLE_FORMAT |
static java.lang.String |
FLOAT_FORMAT |
static java.lang.String |
INTEGER_FORMAT |
Constructor and Description |
---|
DecimalInput(java.lang.String labelText,
javax.swing.JPanel panel,
int x,
int y,
java.lang.String format) |
DecimalInput(java.lang.String labelText,
javax.swing.JPanel panel,
int x,
int y,
java.lang.String format,
boolean showSlider) |
DecimalInput(java.lang.String labelText,
javax.swing.JPanel panel,
int y,
java.lang.String format) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Hashtable<java.lang.Integer,javax.swing.JLabel> |
createLabelTable(int sliderMax,
int sliderStep,
double valueMax) |
SwingChangeMonitor |
getChangeMonitor() |
java.text.DecimalFormat |
getDecimalFormat() |
javax.swing.JLabel |
getLabel() |
javax.swing.JFormattedTextField |
getTextField() |
double |
parseDouble()
Parses the current value of the text field.
|
float |
parseFloat()
Parses the current value of the text field.
|
int |
parseInt()
Parses the current value as an
int . |
long |
parseLong()
Parses the current value as an
long . |
void |
setDecimalFormatStr(java.lang.String format) |
void |
setEnabled(boolean enabled) |
void |
setValue(double value) |
void |
setValue(float value) |
void |
setValue(int value) |
void |
setValue(long value) |
public static final java.lang.String DOUBLE_FORMAT
public static final java.lang.String FLOAT_FORMAT
public static final java.lang.String INTEGER_FORMAT
public DecimalInput(java.lang.String labelText, javax.swing.JPanel panel, int y, java.lang.String format)
public DecimalInput(java.lang.String labelText, javax.swing.JPanel panel, int x, int y, java.lang.String format)
public DecimalInput(java.lang.String labelText, javax.swing.JPanel panel, int x, int y, java.lang.String format, boolean showSlider)
public javax.swing.JLabel getLabel()
public javax.swing.JFormattedTextField getTextField()
public SwingChangeMonitor getChangeMonitor()
public void setEnabled(boolean enabled)
public java.text.DecimalFormat getDecimalFormat()
public void setDecimalFormatStr(java.lang.String format)
public float parseFloat()
public double parseDouble()
public int parseInt()
int
.public long parseLong()
long
.protected java.util.Hashtable<java.lang.Integer,javax.swing.JLabel> createLabelTable(int sliderMax, int sliderStep, double valueMax)
public void setValue(float value)
public void setValue(double value)
public void setValue(int value)
public void setValue(long value)