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 DefaultNumberAxisEditor([In] NumberAxis obj0) : base((Axis) obj0) { DefaultNumberAxisEditor numberAxisEditor = this; this.autoRange = obj0.isAutoRange(); this.minimumValue = obj0.getLowerBound(); this.maximumValue = obj0.getUpperBound(); PaintSample.__\u003Cclinit\u003E(); this.gridPaintSample = new PaintSample((Paint) Color.blue); StrokeSample.__\u003Cclinit\u003E(); this.gridStrokeSample = new StrokeSample((Stroke) new BasicStroke(1f)); this.availableStrokeSamples = new StrokeSample[3]; StrokeSample[] strokeSampleArray1 = this.availableStrokeSamples; int index1 = 0; StrokeSample.__\u003Cclinit\u003E(); StrokeSample strokeSample1 = new StrokeSample((Stroke) new BasicStroke(1f)); strokeSampleArray1[index1] = strokeSample1; StrokeSample[] strokeSampleArray2 = this.availableStrokeSamples; int index2 = 1; StrokeSample.__\u003Cclinit\u003E(); StrokeSample strokeSample2 = new StrokeSample((Stroke) new BasicStroke(2f)); strokeSampleArray2[index2] = strokeSample2; StrokeSample[] strokeSampleArray3 = this.availableStrokeSamples; int index3 = 2; StrokeSample.__\u003Cclinit\u003E(); StrokeSample strokeSample3 = new StrokeSample((Stroke) new BasicStroke(3f)); strokeSampleArray3[index3] = strokeSample3; JTabbedPane otherTabs = this.getOtherTabs(); JPanel.__\u003Cclinit\u003E(); JPanel jpanel1 = new JPanel((LayoutManager) new LCBLayout(3)); ((JComponent) jpanel1).setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); ((Container) jpanel1).add((Component) new JPanel()); JCheckBox.__\u003Cclinit\u003E(); this.autoRangeCheckBox = new JCheckBox(DefaultNumberAxisEditor.localizationResources.getString("Auto-adjust_range"), this.autoRange); ((AbstractButton) this.autoRangeCheckBox).setActionCommand("AutoRangeOnOff"); ((AbstractButton) this.autoRangeCheckBox).addActionListener((ActionListener) this); ((Container) jpanel1).add((Component) this.autoRangeCheckBox); ((Container) jpanel1).add((Component) new JPanel()); JPanel jpanel2 = jpanel1; JLabel.__\u003Cclinit\u003E(); JLabel jlabel1 = new JLabel(DefaultNumberAxisEditor.localizationResources.getString("Minimum_range_value")); ((Container) jpanel2).add((Component) jlabel1); JTextField.__\u003Cclinit\u003E(); this.minimumRangeValue = new JTextField(Double.toString(this.minimumValue)); ((JComponent) this.minimumRangeValue).setEnabled(!this.autoRange); this.minimumRangeValue.setActionCommand("MinimumRange"); this.minimumRangeValue.addActionListener((ActionListener) this); ((Component) this.minimumRangeValue).addFocusListener((FocusListener) this); ((Container) jpanel1).add((Component) this.minimumRangeValue); ((Container) jpanel1).add((Component) new JPanel()); JPanel jpanel3 = jpanel1; JLabel.__\u003Cclinit\u003E(); JLabel jlabel2 = new JLabel(DefaultNumberAxisEditor.localizationResources.getString("Maximum_range_value")); ((Container) jpanel3).add((Component) jlabel2); JTextField.__\u003Cclinit\u003E(); this.maximumRangeValue = new JTextField(Double.toString(this.maximumValue)); ((JComponent) this.maximumRangeValue).setEnabled(!this.autoRange); this.maximumRangeValue.setActionCommand("MaximumRange"); this.maximumRangeValue.addActionListener((ActionListener) this); ((Component) this.maximumRangeValue).addFocusListener((FocusListener) this); ((Container) jpanel1).add((Component) this.maximumRangeValue); ((Container) jpanel1).add((Component) new JPanel()); otherTabs.add(DefaultNumberAxisEditor.localizationResources.getString("Range"), (Component) jpanel1); }
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); }