public MemoryBreakpointsDialog(java.awt.Frame parent) : base(parent) { memoryBreakpoints = ((DebuggerMemory)Memory.Instance).MemoryBreakpoints; memoryBreakpointsModel = new MemoryBreakpointsModel(this); initComponents(); TableColumn accessType = tblBreakpoints.ColumnModel.getColumn(COL_ACCESSTYPE); JComboBox combo = new JComboBox(); combo.addItem("READ"); combo.addItem("WRITE"); combo.addItem("READWRITE"); accessType.CellEditor = new DefaultCellEditor(combo); tblBreakpoints.ColumnModel.getColumn(COL_STARTADDRESS).CellEditor = new AddressCellEditor(this); tblBreakpoints.ColumnModel.getColumn(COL_ENDADDRESS).CellEditor = new AddressCellEditor(this); tblBreakpoints.SelectionModel.addListSelectionListener(new ListSelectionListenerAnonymousInnerClass(this)); tblBreakpoints.Model.addTableModelListener(new TableModelListenerAnonymousInnerClass(this)); // copy trace settings to UI updateTraceSettings(); }
public MultiProperty(PropertyHolder holder, string name) : base(holder, name) { MultiProperty multiProperty = this; this.comboBox = new JComboBox(); this.cellEditor = new DefaultCellEditor(this.comboBox); this.values = (Map) new HashMap(); this.renderer = (TableCellRenderer) new MultiProperty\u00241(this); }
public PaletteChooserPanel([In] PaletteSample obj0, [In] PaletteSample[] obj1) { base.\u002Ector(); PaletteChooserPanel paletteChooserPanel = this; ((Container) this).setLayout((LayoutManager) new BorderLayout()); this.selector = new JComboBox((object[]) obj1); this.selector.setSelectedItem((object) obj0); JComboBox jcomboBox = this.selector; PaletteSample.__\u003Cclinit\u003E(); PaletteSample paletteSample = new PaletteSample((ColorPalette) new RainbowPalette()); jcomboBox.setRenderer((ListCellRenderer) paletteSample); ((Container) this).add((Component) this.selector); }
public StrokeChooserPanel(StrokeSample current, StrokeSample[] available) { base.\u002Ector(); StrokeChooserPanel strokeChooserPanel = this; ((Container) this).setLayout((LayoutManager) new BorderLayout()); DefaultComboBoxModel defaultComboBoxModel = new DefaultComboBoxModel(); for (int index = 0; index < available.Length; ++index) defaultComboBoxModel.addElement((object) available[index].getStroke()); this.selector = new JComboBox((ComboBoxModel) defaultComboBoxModel); this.selector.setSelectedItem((object) current.getStroke()); this.selector.setRenderer((ListCellRenderer) new StrokeSample((Stroke) null)); ((Container) this).add((Component) this.selector); this.selector.addActionListener((ActionListener) new StrokeChooserPanel\u00241(this)); }
public GyroDisplay() { GyroDisplay gyroDisplay = this; this.compass = new Compass(); this.feedback = new Widget.UneditableNumberField(); string[] strArray = new string[2]; int index1 = 0; string str1 = "Display as Text"; strArray[index1] = str1; int index2 = 1; string str2 = "Display as Compass"; strArray[index2] = str2; this.names = strArray; JComboBox.__\u003Cclinit\u003E(); this.menu = new JComboBox((object[]) this.names); }
public RelayController() { RelayController relayController = this; string[] strArray = new string[3]; int index1 = 0; string str1 = "Forward"; strArray[index1] = str1; int index2 = 1; string str2 = "Off"; strArray[index2] = str2; int index3 = 2; string str3 = "Reverse"; strArray[index3] = str3; this.options = strArray; JComboBox.__\u003Cclinit\u003E(); this.controller = new JComboBox((object[]) this.options); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddOperation)); this.OperationCB = new JHUI.Controls.JComboBox(); this.SuspendLayout(); // // OperationCB // this.OperationCB.BackColor = System.Drawing.Color.White; this.OperationCB.FontSize = JHUI.JComboBoxSize.Small; this.OperationCB.ForeColor = System.Drawing.Color.Black; this.OperationCB.FormattingEnabled = true; this.OperationCB.ItemHeight = 19; this.OperationCB.Location = new System.Drawing.Point(14, 22); this.OperationCB.Name = "OperationCB"; this.OperationCB.Size = new System.Drawing.Size(252, 25); this.OperationCB.Style = JHUI.JColorStyle.Silver; this.OperationCB.TabIndex = 1; this.OperationCB.Theme = JHUI.JThemeStyle.Dark; this.OperationCB.UseSelectable = true; // // AddOperation // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17))))); this.ClientSize = new System.Drawing.Size(279, 65); this.Controls.Add(this.OperationCB); this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ForeColor = System.Drawing.Color.Black; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "AddOperation"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Style = JHUI.JColorStyle.Silver; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.AddOperation_FormClosing); this.ResumeLayout(false); }
public SerialDateChooserPanel(SerialDate date, bool controlPanel, Color dateButtonColor, Color monthButtonColor) { int num = controlPanel ? 1 : 0; base.\u002Ector((LayoutManager) new BorderLayout()); SerialDateChooserPanel dateChooserPanel = this; this.chosenOtherButtonColor = (Color) Color.darkGray; this.firstDayOfWeek = 1; this.yearSelectionRange = 20; this.dateFont = new Font("SansSerif", 0, 10); this.monthSelector = (JComboBox) null; this.yearSelector = (JComboBox) null; this.todayButton = (JButton) null; this.buttons = (JButton[]) null; this.refreshing = false; this.date = date; this.dateButtonColor = dateButtonColor; this.monthButtonColor = monthButtonColor; ((Container) this).add((Component) this.constructSelectionPanel(), (object) "North"); ((Container) this).add((Component) this.getCalendarPanel(), (object) "Center"); if (num == 0) return; ((Container) this).add((Component) this.constructControlPanel(), (object) "South"); }
//-------- //-------- Constructor //-------- /// <summary> /// Constructor a deviceFrame with additional features for the actuator /// </summary> public DeviceFrameActuator(TaggedDevice dev, string logFile) : base(dev, logFile) { // construct the super // create select panel selectPanel = new JPanel(); selectPanel.AlignmentX = Component.LEFT_ALIGNMENT; selectPanel.Border = BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Select Actuator State"); // create combo box actuatorCombo = new JComboBox(((TaggedActuator)dev).Selections); Dimension actuatorComboDimension = new Dimension(170, 23); actuatorCombo.PreferredSize = actuatorComboDimension; actuatorCombo.Editable = false; actuatorCombo.AlignmentX = Component.LEFT_ALIGNMENT; actuatorCombo.addActionListener(this); // add combo box to select panel selectPanel.add(actuatorCombo); // add select panel to the center panel centerPanel.add(selectPanel); }
private JPanel constructSelectionPanel() { JPanel jpanel = new JPanel(); int minimum = this.chosenDate.getMinimum(2); string[] strArray = new string[this.chosenDate.getMaximum(2) - minimum + 1]; ByteCodeHelper.arraycopy_fast((Array) SerialDate.getMonths(), minimum, (Array) strArray, 0, strArray.Length); this.monthSelector = new JComboBox((object[]) strArray); this.monthSelector.addActionListener((ActionListener) this); this.monthSelector.setActionCommand("monthSelectionChanged"); ((Container) jpanel).add((Component) this.monthSelector); JComboBox.__\u003Cclinit\u003E(); this.yearSelector = new JComboBox((object[]) this.getYears(0)); this.yearSelector.addActionListener((ActionListener) this); this.yearSelector.setActionCommand("yearSelectionChanged"); ((Container) jpanel).add((Component) this.yearSelector); return jpanel; }
//-------- //-------- Constructors //-------- /// <summary> /// Constructor a frame to contain the device data. Provide /// the device and the log file name /// </summary> public DeviceFrame(TaggedDevice dev, string logFile) : base(dev.DeviceContainer.AddressAsString) { // construct the frame // init pollDelay = 0; readButtonClick = false; num_format = NumberFormat.Instance; num_format.MaximumFractionDigits = 2; num_format.MinimumFractionDigits = 0; num_format.MinimumIntegerDigits = 2; num_format.GroupingUsed = false; lastReading = "none"; // get ref to the tagged device and log file this.dev = dev; this.logFile = logFile; // set the look and feel to the system look and feel try { UIManager.LookAndFeel = UIManager.SystemLookAndFeelClassName; } catch (Exception e) { Debug.WriteLine(e.ToString()); Debug.Write(e.StackTrace); } // add an event listener to end the aplication when the frame is closed addWindowListener(new WindowAdapterAnonymousInnerClassHelper(this, e)); // create the main panel mainPanel = new JPanel(new GridLayout(3, 1)); // create the sub-panels topPanel = new JPanel(); topPanel.Layout = new BoxLayout(topPanel, BoxLayout.Y_AXIS); topPanel.Border = BorderFactory.createEmptyBorder(10, 10, 10, 10); centerPanel = new JPanel(); centerPanel.Layout = new BoxLayout(centerPanel, BoxLayout.Y_AXIS); centerPanel.Border = BorderFactory.createEmptyBorder(10, 10, 10, 10); centerPanel.Background = Color.white; bottomPanel = new JPanel(); bottomPanel.Layout = new BoxLayout(bottomPanel, BoxLayout.Y_AXIS); bottomPanel.Border = BorderFactory.createEmptyBorder(10, 10, 10, 10); // fill the panels // top clusterLabel = new JLabel("Cluster: " + dev.ClusterName); topPanel.add(clusterLabel); mainLabel = new JLabel(dev.Label); mainLabel.HorizontalAlignment = JLabel.CENTER; mainLabel.Font = new Font("SansSerif", Font.PLAIN, 20); topPanel.add(mainLabel); logCheck = new JCheckBox("Logging Enable", false); logCheck.addActionListener(this); topPanel.add(logCheck); // center timeLabel = new JLabel("Last Reading: none"); timeLabel.HorizontalAlignment = JLabel.CENTER; centerPanel.add(timeLabel); // bottom readButton = new JButton("Read Once"); readButton.AlignmentX = Component.LEFT_ALIGNMENT; readButton.addActionListener(this); bottomPanel.add(readButton); string[] selectionStrings = new string[] { "No Polling", "1 second", "30 seconds", "1 minute", "10 minutes", "1 hour" }; pollCombo = new JComboBox(selectionStrings); pollCombo.Editable = false; pollCombo.AlignmentX = Component.LEFT_ALIGNMENT; pollCombo.addActionListener(this); bottomPanel.add(pollCombo); pathLabel = new JLabel("Path: " + dev.OWPath.ToString()); pathLabel.AlignmentX = Component.LEFT_ALIGNMENT; bottomPanel.add(pathLabel); // add to main mainPanel.add(topPanel); mainPanel.add(centerPanel); mainPanel.add(bottomPanel); // add to frame ContentPane.add(mainPanel); // pack the frame pack(); // resize the window and put in random location Dimension current_sz = Size; Size = new Dimension(current_sz.width * 3 / 2, current_sz.height); Toolkit tool = Toolkit.DefaultToolkit; Dimension mx = tool.ScreenSize; Dimension sz = Size; Random rand = new Random(); setLocation(rand.Next((mx.width - sz.width) / 2), rand.Next((mx.height - sz.height) / 2)); // make visible Visible = true; }
private void initFactEditPanel() { factComponents.clear(); //UPGRADE_ISSUE: Class 'java.awt.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"' //UPGRADE_ISSUE: Constructor 'java.awt.GridBagLayout.GridBagLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagLayout"' GridBagLayout gridbag = new GridBagLayout(); //UPGRADE_ISSUE: Class 'java.awt.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' //UPGRADE_ISSUE: Constructor 'java.awt.GridBagConstraints.GridBagConstraints' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' GridBagConstraints c = new GridBagConstraints(); //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel factEditPanel = new JPanel(new BorderLayout()); JPanel innerPanel = new JPanel(gridbag); factEditPanel.setBorder(BorderFactory.createTitledBorder("Set the Slots for the Fact")); if (templateList.SelectedIndex > - 1) { Module module = engine.WorkingMemory.findModule(System.String.valueOf(moduleList.SelectedValue)); Template tmp = module.getTemplate(System.String.valueOf(templateList.SelectedValue)); //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.weightx = 1.0; Slot[] slots = tmp.AllSlots; for (int i = 0; i < slots.Length; ++i) { //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.gridx = 0; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.gridy = i; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.VERTICAL' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.fill = GridBagConstraints.VERTICAL; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.EAST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.anchor = GridBagConstraints.EAST; JLabel label = new JLabel(slots[i].Name + ": "); gridbag.setConstraints(label, c); innerPanel.add(label); //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.gridx = 1; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.BOTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.fill = GridBagConstraints.BOTH; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.anchor' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.WEST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.anchor = GridBagConstraints.WEST; if (slots[i] is MultiSlot) { MultiSlotEditor multislotEditor = new MultiSlotEditor(this); JScrollPane scrollPane = new JScrollPane(multislotEditor.List); gridbag.setConstraints(scrollPane, c); innerPanel.add(scrollPane); factComponents.put(slots[i], multislotEditor.List); } else if (slots[i].ValueType == Constants.FACT_TYPE) { // TODO Fact-Selector JComboBox factBox = new JComboBox(); factComponents.put(slots[i], factBox); } else { JTextField textField = new JTextField(); gridbag.setConstraints(textField, c); innerPanel.add(textField); factComponents.put(slots[i], textField); } } } //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' factEditPanel.add(new JScrollPane(innerPanel), BorderLayout.CENTER); JPanel dumpAreaPanel = new JPanel(); dumpAreaPanel.setLayout(new BoxLayout(dumpAreaPanel, BoxLayout.Y_AXIS)); dumpAreaPanel.add(new JLabel("Fact Preview:")); dumpAreaPanel.add(new JScrollPane(dumpAreaFact)); reloadButtondumpAreaFact = new JButton("Reload Fact Preview", IconLoader.getImageIcon("arrow_refresh")); reloadButtondumpAreaFact.addActionListener(this); dumpAreaPanel.add(reloadButtondumpAreaFact); //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.weightx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.weightx = 0.0; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridwidth' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.gridwidth = 2; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridy' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.gridy = 1; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.gridx' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.gridx = 0; //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.fill' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' //UPGRADE_ISSUE: Field 'java.awt.GridBagConstraints.BOTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtGridBagConstraints"' c.fill = GridBagConstraints.BOTH; gridbag.setConstraints(dumpAreaPanel, c); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.SOUTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' factEditPanel.add(dumpAreaPanel, BorderLayout.SOUTH); contentPanel.add("factEdit", factEditPanel); }
private void initGUI() { try { setPreferredSize(new Dimension(400, 300)); { generalPanel = new JPanel(); FlowLayout generalPanelLayout = new FlowLayout(); generalPanelLayout.setAlignment(FlowLayout.LEFT); generalPanel.setLayout(generalPanelLayout); this.addTab("General", null, generalPanel, null); { resolutionPanel = new JPanel(); generalPanel.add(resolutionPanel); FlowLayout resolutionPanelLayout = new FlowLayout(); resolutionPanel.setLayout(resolutionPanelLayout); resolutionPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Resolution", TitledBorder.LEADING, TitledBorder.TOP)); { resolutionCheckBox = new JCheckBox(); resolutionPanel.add(resolutionCheckBox); resolutionCheckBox.setText("Override"); } { jLabel1 = new JLabel(); resolutionPanel.add(jLabel1); jLabel1.setText("Image Width:"); } { resolutionXTextField = new JTextField(); resolutionPanel.add(resolutionXTextField); resolutionXTextField.setText("640"); resolutionXTextField.setPreferredSize(new java.awt.Dimension(50, 20)); } { jLabel2 = new JLabel(); resolutionPanel.add(jLabel2); jLabel2.setText("Image Height:"); } { resolutionYTextField = new JTextField(); resolutionPanel.add(resolutionYTextField); resolutionYTextField.setText("480"); resolutionYTextField.setPreferredSize(new java.awt.Dimension(50, 20)); } } { threadsPanel = new JPanel(); generalPanel.add(threadsPanel); threadsPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Threads", TitledBorder.LEADING, TitledBorder.TOP)); { threadCheckBox = new JCheckBox(); threadsPanel.add(threadCheckBox); threadCheckBox.setText("Use All Processors"); } { jLabel3 = new JLabel(); threadsPanel.add(jLabel3); jLabel3.setText("Threads:"); } { threadTextField = new JTextField(); threadsPanel.add(threadTextField); threadTextField.setText("1"); threadTextField.setPreferredSize(new java.awt.Dimension(50, 20)); } } } { rendererPanel = new JPanel(); FlowLayout rendererPanelLayout = new FlowLayout(); rendererPanelLayout.setAlignment(FlowLayout.LEFT); rendererPanel.setLayout(rendererPanelLayout); this.addTab("Renderer", null, rendererPanel, null); { defaultRendererRadioButton = new JRadioButton(); rendererPanel.add(defaultRendererRadioButton); defaultRendererRadioButton.setText("Default Renderer"); } { bucketRendererPanel = new JPanel(); BoxLayout bucketRendererPanelLayout = new BoxLayout(bucketRendererPanel, javax.swing.BoxLayout.Y_AXIS); bucketRendererPanel.setLayout(bucketRendererPanelLayout); rendererPanel.add(bucketRendererPanel); bucketRendererPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED), "Bucket Renderer", TitledBorder.LEADING, TitledBorder.TOP)); { bucketRendererRadioButton = new JRadioButton(); bucketRendererPanel.add(bucketRendererRadioButton); bucketRendererRadioButton.setText("Enable"); } { samplingPanel = new JPanel(); GridLayout samplingPanelLayout = new GridLayout(2, 2); samplingPanelLayout.setColumns(2); samplingPanelLayout.setHgap(5); samplingPanelLayout.setVgap(5); samplingPanelLayout.setRows(2); samplingPanel.setLayout(samplingPanelLayout); bucketRendererPanel.add(samplingPanel); { jLabel5 = new JLabel(); samplingPanel.add(jLabel5); jLabel5.setText("Min:"); } { ComboBoxModel minSamplingComboBoxModel = new DefaultComboBoxModel(new string[] { "Item One", "Item Two" }); minSamplingComboBox = new JComboBox(); samplingPanel.add(minSamplingComboBox); minSamplingComboBox.setModel(minSamplingComboBoxModel); } { jLabel6 = new JLabel(); samplingPanel.add(jLabel6); jLabel6.setText("Max:"); } { ComboBoxModel maxSamplingComboxBoxModel = new DefaultComboBoxModel(new string[] { "Item One", "Item Two" }); maxSamplingComboxBox = new JComboBox(); samplingPanel.add(maxSamplingComboxBox); maxSamplingComboxBox.setModel(maxSamplingComboxBoxModel); } } } } } catch (Exception e) { e.printStackTrace(); } }
private JPanel constructSelectionPanel() { JPanel jpanel = new JPanel(); JComboBox.__\u003Cclinit\u003E(); this.monthSelector = new JComboBox((object[]) SerialDate.getMonths()); this.monthSelector.addActionListener((ActionListener) this); this.monthSelector.setActionCommand("monthSelectionChanged"); ((Container) jpanel).add((Component) this.monthSelector); JComboBox.__\u003Cclinit\u003E(); this.yearSelector = new JComboBox(this.getYears(0)); this.yearSelector.addActionListener((ActionListener) this); this.yearSelector.setActionCommand("yearSelectionChanged"); ((Container) jpanel).add((Component) this.yearSelector); return jpanel; }
public DefaultPlotEditor([In] Plot obj0) { base.\u002Ector(); DefaultPlotEditor defaultPlotEditor = this; this.plotInsets = obj0.getInsets(); PaintSample.__\u003Cclinit\u003E(); this.backgroundPaintSample = new PaintSample(obj0.getBackgroundPaint()); StrokeSample.__\u003Cclinit\u003E(); this.outlineStrokeSample = new StrokeSample(obj0.getOutlineStroke()); PaintSample.__\u003Cclinit\u003E(); this.outlinePaintSample = new PaintSample(obj0.getOutlinePaint()); if (obj0 is CategoryPlot) this.plotOrientation = ((CategoryPlot) obj0).getOrientation(); else if (obj0 is XYPlot) this.plotOrientation = ((XYPlot) obj0).getOrientation(); if (obj0 is CategoryPlot) { CategoryItemRenderer renderer = ((CategoryPlot) obj0).getRenderer(); if (renderer is LineAndShapeRenderer) { LineAndShapeRenderer andShapeRenderer = (LineAndShapeRenderer) renderer; this.drawLines = BooleanUtilities.valueOf(andShapeRenderer.getBaseLinesVisible()); this.drawShapes = BooleanUtilities.valueOf(andShapeRenderer.getBaseShapesVisible()); } } else if (obj0 is XYPlot) { XYItemRenderer renderer = ((XYPlot) obj0).getRenderer(); if (renderer is StandardXYItemRenderer) { StandardXYItemRenderer standardXyItemRenderer = (StandardXYItemRenderer) renderer; this.drawLines = BooleanUtilities.valueOf(standardXyItemRenderer.getPlotLines()); this.drawShapes = BooleanUtilities.valueOf(standardXyItemRenderer.getBaseShapesVisible()); } } ((Container) this).setLayout((LayoutManager) new BorderLayout()); this.availableStrokeSamples = new StrokeSample[4]; this.availableStrokeSamples[0] = new StrokeSample((Stroke) null); StrokeSample[] strokeSampleArray1 = this.availableStrokeSamples; int index1 = 1; StrokeSample.__\u003Cclinit\u003E(); StrokeSample strokeSample1 = new StrokeSample((Stroke) new BasicStroke(1f)); strokeSampleArray1[index1] = strokeSample1; StrokeSample[] strokeSampleArray2 = this.availableStrokeSamples; int index2 = 2; StrokeSample.__\u003Cclinit\u003E(); StrokeSample strokeSample2 = new StrokeSample((Stroke) new BasicStroke(2f)); strokeSampleArray2[index2] = strokeSample2; StrokeSample[] strokeSampleArray3 = this.availableStrokeSamples; int index3 = 3; StrokeSample.__\u003Cclinit\u003E(); StrokeSample strokeSample3 = new StrokeSample((Stroke) new BasicStroke(3f)); strokeSampleArray3[index3] = strokeSample3; JPanel.__\u003Cclinit\u003E(); JPanel jpanel1 = new JPanel((LayoutManager) new BorderLayout()); ((JComponent) jpanel1).setBorder((Border) BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), new StringBuffer().append(obj0.getPlotType()).append(DefaultPlotEditor.localizationResources.getString(":")).toString())); JPanel.__\u003Cclinit\u003E(); JPanel jpanel2 = new JPanel((LayoutManager) new BorderLayout()); ((JComponent) jpanel2).setBorder((Border) BorderFactory.createTitledBorder(DefaultPlotEditor.localizationResources.getString("General"))); JPanel.__\u003Cclinit\u003E(); JPanel jpanel3 = new JPanel((LayoutManager) new LCBLayout(7)); ((JComponent) jpanel3).setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); JPanel jpanel4 = jpanel3; JLabel.__\u003Cclinit\u003E(); JLabel jlabel1 = new JLabel(DefaultPlotEditor.localizationResources.getString("Outline_stroke")); ((Container) jpanel4).add((Component) jlabel1); JButton.__\u003Cclinit\u003E(); JButton jbutton1 = new JButton(DefaultPlotEditor.localizationResources.getString("Select...")); ((AbstractButton) jbutton1).setActionCommand("OutlineStroke"); ((AbstractButton) jbutton1).addActionListener((ActionListener) this); ((Container) jpanel3).add((Component) this.outlineStrokeSample); ((Container) jpanel3).add((Component) jbutton1); JPanel jpanel5 = jpanel3; JLabel.__\u003Cclinit\u003E(); JLabel jlabel2 = new JLabel(DefaultPlotEditor.localizationResources.getString("Outline_Paint")); ((Container) jpanel5).add((Component) jlabel2); JButton.__\u003Cclinit\u003E(); JButton jbutton2 = new JButton(DefaultPlotEditor.localizationResources.getString("Select...")); ((AbstractButton) jbutton2).setActionCommand("OutlinePaint"); ((AbstractButton) jbutton2).addActionListener((ActionListener) this); ((Container) jpanel3).add((Component) this.outlinePaintSample); ((Container) jpanel3).add((Component) jbutton2); JPanel jpanel6 = jpanel3; JLabel.__\u003Cclinit\u003E(); JLabel jlabel3 = new JLabel(DefaultPlotEditor.localizationResources.getString("Background_paint")); ((Container) jpanel6).add((Component) jlabel3); JButton.__\u003Cclinit\u003E(); JButton jbutton3 = new JButton(DefaultPlotEditor.localizationResources.getString("Select...")); ((AbstractButton) jbutton3).setActionCommand("BackgroundPaint"); ((AbstractButton) jbutton3).addActionListener((ActionListener) this); ((Container) jpanel3).add((Component) this.backgroundPaintSample); ((Container) jpanel3).add((Component) jbutton3); if (this.plotOrientation != null) { int num = !this.plotOrientation.equals((object) PlotOrientation.__\u003C\u003EVERTICAL) ? 1 : 0; JPanel jpanel7 = jpanel3; JLabel.__\u003Cclinit\u003E(); JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Orientation")); ((Container) jpanel7).add((Component) jlabel4); JComboBox.__\u003Cclinit\u003E(); this.orientationCombo = new JComboBox((object[]) DefaultPlotEditor.orientationNames); this.orientationCombo.setSelectedIndex(num); this.orientationCombo.setActionCommand("Orientation"); this.orientationCombo.addActionListener((ActionListener) this); ((Container) jpanel3).add((Component) new JPanel()); ((Container) jpanel3).add((Component) this.orientationCombo); } if (this.drawLines != null) { JPanel jpanel7 = jpanel3; JLabel.__\u003Cclinit\u003E(); JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Draw_lines")); ((Container) jpanel7).add((Component) jlabel4); this.drawLinesCheckBox = new JCheckBox(); ((AbstractButton) this.drawLinesCheckBox).setSelected(this.drawLines.booleanValue()); ((AbstractButton) this.drawLinesCheckBox).setActionCommand("DrawLines"); ((AbstractButton) this.drawLinesCheckBox).addActionListener((ActionListener) this); ((Container) jpanel3).add((Component) new JPanel()); ((Container) jpanel3).add((Component) this.drawLinesCheckBox); } if (this.drawShapes != null) { JPanel jpanel7 = jpanel3; JLabel.__\u003Cclinit\u003E(); JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Draw_shapes")); ((Container) jpanel7).add((Component) jlabel4); this.drawShapesCheckBox = new JCheckBox(); ((AbstractButton) this.drawShapesCheckBox).setSelected(this.drawShapes.booleanValue()); ((AbstractButton) this.drawShapesCheckBox).setActionCommand("DrawShapes"); ((AbstractButton) this.drawShapesCheckBox).addActionListener((ActionListener) this); ((Container) jpanel3).add((Component) new JPanel()); ((Container) jpanel3).add((Component) this.drawShapesCheckBox); } ((Container) jpanel2).add((Component) jpanel3, (object) "North"); JPanel.__\u003Cclinit\u003E(); JPanel jpanel8 = new JPanel((LayoutManager) new BorderLayout()); ((JComponent) jpanel8).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); ((Container) jpanel8).add((Component) jpanel2, (object) "North"); JTabbedPane jtabbedPane = new JTabbedPane(); ((JComponent) jtabbedPane).setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); Axis axis = (Axis) null; if (obj0 is CategoryPlot) axis = (Axis) ((CategoryPlot) obj0).getDomainAxis(); else if (obj0 is XYPlot) axis = (Axis) ((XYPlot) obj0).getDomainAxis(); this.domainAxisPropertyPanel = DefaultAxisEditor.getInstance(axis); if (this.domainAxisPropertyPanel != null) { ((JComponent) this.domainAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Domain_Axis"), (Component) this.domainAxisPropertyPanel); } ValueAxis valueAxis = (ValueAxis) null; if (obj0 is CategoryPlot) valueAxis = ((CategoryPlot) obj0).getRangeAxis(); else if (obj0 is XYPlot) valueAxis = ((XYPlot) obj0).getRangeAxis(); this.rangeAxisPropertyPanel = DefaultAxisEditor.getInstance((Axis) valueAxis); if (this.rangeAxisPropertyPanel != null) { ((JComponent) this.rangeAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Range_Axis"), (Component) this.rangeAxisPropertyPanel); } ColorBar colorBar = (ColorBar) null; if (obj0 is ContourPlot) colorBar = ((ContourPlot) obj0).getColorBar(); this.colorBarAxisPropertyPanel = DefaultColorBarEditor.getInstance(colorBar); if (this.colorBarAxisPropertyPanel != null) { ((JComponent) this.colorBarAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Color_Bar"), (Component) this.colorBarAxisPropertyPanel); } jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Appearance"), (Component) jpanel8); ((Container) jpanel1).add((Component) jtabbedPane); ((Container) this).add((Component) jpanel1); }
internal override void setChoices([In] StringArray obj0) { if (this.combo != null) { ((Container) this.panel).remove((Component) this.combo); this.combo.removeItemListener((ItemListener) this); } this.combo = new JComboBox(); lock (Chooser.access\u00241200(this.this\u00240)) { int local_1 = 0; for (int local_2 = 0; local_2 < obj0.size(); ++local_2) { string local_3 = obj0.get(local_2); local_1 |= String.instancehelper_equals(local_3, (object) Chooser.access\u0024200(this.this\u00240)) ? 1 : 0; this.combo.addItem((object) local_3); } if (local_1 == 0) Chooser.access\u0024202(this.this\u00240, (string) null); if (Chooser.access\u00241300(this.this\u00240).containsKey("selected")) Chooser.access\u0024202(this.this\u00240, Chooser.access\u00241400(this.this\u00240).getString("selected")); if (Chooser.access\u0024200(this.this\u00240) != null) { this.combo.setSelectedItem((object) Chooser.access\u0024200(this.this\u00240)); Chooser.access\u00241500(this.this\u00240).putString("selected", Chooser.access\u0024200(this.this\u00240)); } else if (Chooser.access\u00241600(this.this\u00240).containsKey("default")) this.combo.setSelectedItem((object) Chooser.access\u00241700(this.this\u00240).getString("default")); } ((Container) this.panel).add((Component) this.combo); this.combo.addItemListener((ItemListener) this); this.combo.setEnabled(((Boolean) this.this\u00240.__\u003C\u003Eeditable.getValue()).booleanValue()); ((JComponent) this.this\u00240).revalidate(); ((Component) this.this\u00240).repaint(); ((Component) this.this\u00240).setSize(((JComponent) this.this\u00240).getPreferredSize()); }