17 package com.generalrobotix.ui.view.graph;
19 import java.awt.BorderLayout;
20 import java.awt.Component;
21 import java.awt.event.ActionEvent;
22 import java.awt.event.ActionListener;
23 import java.awt.event.FocusEvent;
24 import java.awt.event.FocusListener;
26 import javax.swing.JPanel;
27 import javax.swing.JTextField;
43 text_ =
new JTextField();
44 text_.addActionListener(
45 new ActionListener() {
46 public void actionPerformed(ActionEvent e) {
51 text_.addFocusListener(
53 public void focusGained(FocusEvent e) {
55 public void focusLost(FocusEvent e) {
61 setLayout(
new BorderLayout());
62 add(BorderLayout.CENTER,text_);
63 add(BorderLayout.EAST,spin);
98 public boolean isOk(
double v) {
99 return (min_ <= v && v<=max_);
103 super.setEnabled(flag);
104 Component[] cmps = getComponents();
105 for (
int i = 0;
i < cmps.length;
i++) {
106 cmps[
i].setEnabled(flag);
static int min(int a, int b)
void setValue(Object value)
void setEnabled(boolean flag)
SEDoubleTextWithSpin(double min, double max, double step)
png_infop png_uint_32 flag
static int max(int a, int b)