package sig.modules.Controller; import java.awt.BorderLayout; import java.awt.Checkbox; import java.awt.Color; import java.awt.Container; import java.awt.Dimension; import java.awt.Graphics; import java.awt.LayoutManager; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import java.awt.geom.Rectangle2D; import java.io.File; import java.io.IOException; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.List; import javax.imageio.ImageIO; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.ButtonGroup; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JLayeredPane; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JTextField; import javax.swing.SwingUtilities; import javax.swing.border.Border; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import sig.ColorPanel; import sig.sigIRC; import sig.modules.ControllerModule; public class ControlConfigurationWindow extends JFrame implements WindowListener{ DialogType dialog; List panels = new ArrayList(); List analog_controller_components = new ArrayList(); List analog_controller_component_labels = new ArrayList(); ControllerModule module; DecimalFormat df = new DecimalFormat("0.000"); PreviewPanel previewpanel; JRadioButton two_axis_button; Container twowayAxis_adjustContainer; Container twowayAxis_adjustOrientationContainer; LinkedTextField twowayAxis_range1,twowayAxis_range2; Color axis_background_col = Color.BLACK; Color axis_indicator_col = Color.WHITE; int axis_width=32,axis_height=32; JButton backgroundColor,indicatorColor; boolean x_invert,y_invert,axis_invert; int orientation=0; //0=Left-to-Right, 1=Right-to-Left, 2=Bottom-to-Top, 3=Top-to-Bottom JCheckBox width_invert,height_invert; java.awt.Component extra_space; ActionListener checkboxListener = new ActionListener(){ @Override public void actionPerformed(ActionEvent ev) { int checkedamt=0; for (JCheckBox cb : analog_controller_component_labels) { checkedamt+=(cb.isSelected())?1:0; } if (previewpanel.twoAxis && checkedamt>1) { UncheckPreviouslyCheckedbox(ev); } else if (!previewpanel.twoAxis && checkedamt>2) { UncheckPreviouslyCheckedbox(ev); } } private void UncheckPreviouslyCheckedbox(ActionEvent ev) { for (int i=0;i ident=new ArrayList(); ident.add(null); ident.add(null); int count=0; for (int i=0;i