org.jfree.ui.StrokeSample Java Examples
The following examples show how to use
org.jfree.ui.StrokeSample.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RankingGraph.java From moa with GNU General Public License v3.0 | 5 votes |
private void strokeSelection(StrokeSample str) { StrokeChooserPanel panel = new StrokeChooserPanel( str, availableStrokeSamples); int result = JOptionPane.showConfirmDialog(this, panel, "Stroke Selection", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); if (result == JOptionPane.OK_OPTION) { str.setStroke(panel.getSelectedStroke()); } }
Example #2
Source File: DefaultValueAxisEditor.java From openstock with GNU General Public License v3.0 | 4 votes |
/** * Standard constructor: builds a property panel for the specified axis. * * @param axis the axis, which should be changed. */ public DefaultValueAxisEditor(ValueAxis axis) { super(axis); this.autoRange = axis.isAutoRange(); this.minimumValue = axis.getLowerBound(); this.maximumValue = axis.getUpperBound(); this.autoTickUnitSelection = axis.isAutoTickUnitSelection(); this.gridPaintSample = new PaintSample(Color.blue); this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples = new StrokeSample[3]; this.availableStrokeSamples[0] = new StrokeSample( new BasicStroke(1.0f)); this.availableStrokeSamples[1] = new StrokeSample( new BasicStroke(2.0f)); this.availableStrokeSamples[2] = new StrokeSample( new BasicStroke(3.0f)); JTabbedPane other = getOtherTabs(); JPanel range = new JPanel(new LCBLayout(3)); range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); range.add(new JPanel()); this.autoRangeCheckBox = new JCheckBox(localizationResources.getString( "Auto-adjust_range"), this.autoRange); this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff"); this.autoRangeCheckBox.addActionListener(this); range.add(this.autoRangeCheckBox); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Minimum_range_value"))); this.minimumRangeValue = new JTextField(Double.toString( this.minimumValue)); this.minimumRangeValue.setEnabled(!this.autoRange); this.minimumRangeValue.setActionCommand("MinimumRange"); this.minimumRangeValue.addActionListener(this); this.minimumRangeValue.addFocusListener(this); range.add(this.minimumRangeValue); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Maximum_range_value"))); this.maximumRangeValue = new JTextField(Double.toString( this.maximumValue)); this.maximumRangeValue.setEnabled(!this.autoRange); this.maximumRangeValue.setActionCommand("MaximumRange"); this.maximumRangeValue.addActionListener(this); this.maximumRangeValue.addFocusListener(this); range.add(this.maximumRangeValue); range.add(new JPanel()); other.add(localizationResources.getString("Range"), range); other.add(localizationResources.getString("TickUnit"), createTickUnitPanel()); }
Example #3
Source File: DefaultValueAxisEditor.java From ccu-historian with GNU General Public License v3.0 | 4 votes |
/** * Standard constructor: builds a property panel for the specified axis. * * @param axis the axis, which should be changed. */ public DefaultValueAxisEditor(ValueAxis axis) { super(axis); this.autoRange = axis.isAutoRange(); this.minimumValue = axis.getLowerBound(); this.maximumValue = axis.getUpperBound(); this.autoTickUnitSelection = axis.isAutoTickUnitSelection(); this.gridPaintSample = new PaintSample(Color.blue); this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples = new StrokeSample[3]; this.availableStrokeSamples[0] = new StrokeSample( new BasicStroke(1.0f)); this.availableStrokeSamples[1] = new StrokeSample( new BasicStroke(2.0f)); this.availableStrokeSamples[2] = new StrokeSample( new BasicStroke(3.0f)); JTabbedPane other = getOtherTabs(); JPanel range = new JPanel(new LCBLayout(3)); range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); range.add(new JPanel()); this.autoRangeCheckBox = new JCheckBox(localizationResources.getString( "Auto-adjust_range"), this.autoRange); this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff"); this.autoRangeCheckBox.addActionListener(this); range.add(this.autoRangeCheckBox); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Minimum_range_value"))); this.minimumRangeValue = new JTextField(Double.toString( this.minimumValue)); this.minimumRangeValue.setEnabled(!this.autoRange); this.minimumRangeValue.setActionCommand("MinimumRange"); this.minimumRangeValue.addActionListener(this); this.minimumRangeValue.addFocusListener(this); range.add(this.minimumRangeValue); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Maximum_range_value"))); this.maximumRangeValue = new JTextField(Double.toString( this.maximumValue)); this.maximumRangeValue.setEnabled(!this.autoRange); this.maximumRangeValue.setActionCommand("MaximumRange"); this.maximumRangeValue.addActionListener(this); this.maximumRangeValue.addFocusListener(this); range.add(this.maximumRangeValue); range.add(new JPanel()); other.add(localizationResources.getString("Range"), range); other.add(localizationResources.getString("TickUnit"), createTickUnitPanel()); }
Example #4
Source File: DefaultValueAxisEditor.java From SIMVA-SoS with Apache License 2.0 | 4 votes |
/** * Standard constructor: builds a property panel for the specified axis. * * @param axis the axis, which should be changed. */ public DefaultValueAxisEditor(ValueAxis axis) { super(axis); this.autoRange = axis.isAutoRange(); this.minimumValue = axis.getLowerBound(); this.maximumValue = axis.getUpperBound(); this.autoTickUnitSelection = axis.isAutoTickUnitSelection(); this.gridPaintSample = new PaintSample(Color.blue); this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples = new StrokeSample[3]; this.availableStrokeSamples[0] = new StrokeSample( new BasicStroke(1.0f)); this.availableStrokeSamples[1] = new StrokeSample( new BasicStroke(2.0f)); this.availableStrokeSamples[2] = new StrokeSample( new BasicStroke(3.0f)); JTabbedPane other = getOtherTabs(); JPanel range = new JPanel(new LCBLayout(3)); range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); range.add(new JPanel()); this.autoRangeCheckBox = new JCheckBox(localizationResources.getString( "Auto-adjust_range"), this.autoRange); this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff"); this.autoRangeCheckBox.addActionListener(this); range.add(this.autoRangeCheckBox); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Minimum_range_value"))); this.minimumRangeValue = new JTextField(Double.toString( this.minimumValue)); this.minimumRangeValue.setEnabled(!this.autoRange); this.minimumRangeValue.setActionCommand("MinimumRange"); this.minimumRangeValue.addActionListener(this); this.minimumRangeValue.addFocusListener(this); range.add(this.minimumRangeValue); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Maximum_range_value"))); this.maximumRangeValue = new JTextField(Double.toString( this.maximumValue)); this.maximumRangeValue.setEnabled(!this.autoRange); this.maximumRangeValue.setActionCommand("MaximumRange"); this.maximumRangeValue.addActionListener(this); this.maximumRangeValue.addFocusListener(this); range.add(this.maximumRangeValue); range.add(new JPanel()); other.add(localizationResources.getString("Range"), range); other.add(localizationResources.getString("TickUnit"), createTickUnitPanel()); }
Example #5
Source File: DefaultValueAxisEditor.java From ECG-Viewer with GNU General Public License v2.0 | 4 votes |
/** * Standard constructor: builds a property panel for the specified axis. * * @param axis the axis, which should be changed. */ public DefaultValueAxisEditor(ValueAxis axis) { super(axis); this.autoRange = axis.isAutoRange(); this.minimumValue = axis.getLowerBound(); this.maximumValue = axis.getUpperBound(); this.autoTickUnitSelection = axis.isAutoTickUnitSelection(); this.gridPaintSample = new PaintSample(Color.blue); this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples = new StrokeSample[3]; this.availableStrokeSamples[0] = new StrokeSample( new BasicStroke(1.0f)); this.availableStrokeSamples[1] = new StrokeSample( new BasicStroke(2.0f)); this.availableStrokeSamples[2] = new StrokeSample( new BasicStroke(3.0f)); JTabbedPane other = getOtherTabs(); JPanel range = new JPanel(new LCBLayout(3)); range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); range.add(new JPanel()); this.autoRangeCheckBox = new JCheckBox(localizationResources.getString( "Auto-adjust_range"), this.autoRange); this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff"); this.autoRangeCheckBox.addActionListener(this); range.add(this.autoRangeCheckBox); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Minimum_range_value"))); this.minimumRangeValue = new JTextField(Double.toString( this.minimumValue)); this.minimumRangeValue.setEnabled(!this.autoRange); this.minimumRangeValue.setActionCommand("MinimumRange"); this.minimumRangeValue.addActionListener(this); this.minimumRangeValue.addFocusListener(this); range.add(this.minimumRangeValue); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Maximum_range_value"))); this.maximumRangeValue = new JTextField(Double.toString( this.maximumValue)); this.maximumRangeValue.setEnabled(!this.autoRange); this.maximumRangeValue.setActionCommand("MaximumRange"); this.maximumRangeValue.addActionListener(this); this.maximumRangeValue.addFocusListener(this); range.add(this.maximumRangeValue); range.add(new JPanel()); other.add(localizationResources.getString("Range"), range); other.add(localizationResources.getString("TickUnit"), createTickUnitPanel()); }
Example #6
Source File: DefaultNumberAxisEditor.java From opensim-gui with Apache License 2.0 | 4 votes |
/** * Standard constructor: builds a property panel for the specified axis. * * @param axis the axis, which should be changed. */ public DefaultNumberAxisEditor(NumberAxis axis) { super(axis); this.autoRange = axis.isAutoRange(); this.minimumValue = axis.getLowerBound(); this.maximumValue = axis.getUpperBound(); this.gridPaintSample = new PaintSample(Color.blue); this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples = new StrokeSample[3]; this.availableStrokeSamples[0] = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples[1] = new StrokeSample(new BasicStroke(2.0f)); this.availableStrokeSamples[2] = new StrokeSample(new BasicStroke(3.0f)); JTabbedPane other = getOtherTabs(); JPanel range = new JPanel(new LCBLayout(3)); range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); range.add(new JPanel()); this.autoRangeCheckBox = new JCheckBox( localizationResources.getString("Auto-adjust_range"), this.autoRange ); this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff"); this.autoRangeCheckBox.addActionListener(this); range.add(this.autoRangeCheckBox); range.add(new JPanel()); range.add( new JLabel(localizationResources.getString("Minimum_range_value")) ); this.minimumRangeValue = new JTextField( Double.toString(this.minimumValue) ); this.minimumRangeValue.setEnabled(!this.autoRange); this.minimumRangeValue.setActionCommand("MinimumRange"); this.minimumRangeValue.addActionListener(this); this.minimumRangeValue.addFocusListener(this); range.add(this.minimumRangeValue); range.add(new JPanel()); range.add( new JLabel(localizationResources.getString("Maximum_range_value")) ); this.maximumRangeValue = new JTextField( Double.toString(this.maximumValue) ); this.maximumRangeValue.setEnabled(!this.autoRange); this.maximumRangeValue.setActionCommand("MaximumRange"); this.maximumRangeValue.addActionListener(this); this.maximumRangeValue.addFocusListener(this); range.add(this.maximumRangeValue); range.add(new JPanel()); other.add(localizationResources.getString("Range"), range); }
Example #7
Source File: RankingGraph.java From moa with GNU General Public License v3.0 | 4 votes |
private void initComponents() { Container container = getContentPane(); width = getSize().width - 10; height = 70 * getSize().height / 100; graphPanel = new Graph(); zoomPanel = new SliderPanel(); controlPanel = new JPanel(); imgOptionsPanel = new JPanel(); exportPanel = new JPanel(); btnSave = new JButton("Save"); btnLineStroke = new JButton("Line 1 Stroke"); btnFont = new JButton("Text Font"); btnLineDifStronke = new JButton("Line 2 Stroke"); btnDir = new JButton("Save as"); graphPanelDisplay.setLayout(new BorderLayout()); graphPanelDisplay.add(graphPanel, BorderLayout.CENTER); TitledBorder titleborder; titleborder = BorderFactory.createTitledBorder(" Zoom"); zoomPanel.setBorder(titleborder); //titleborder = BorderFactory.createTitledBorder("Options"); //controlPanel.setBorder(titleborder); titleborder = BorderFactory.createTitledBorder("Properties"); imgOptionsPanel.setBorder(titleborder); titleborder = BorderFactory.createTitledBorder("Export"); exportPanel.setBorder(titleborder); graphPanelDisplay.setPreferredSize(new Dimension(width, height)); controlPanel.setPreferredSize(new Dimension(60 * width / 100, 20 * getSize().height / 100)); zoomPanel.setPreferredSize(new Dimension(30 * width / 100, 20 * getSize().height / 100)); EventControl evt = new EventControl(); btnFont.addActionListener(evt); btnLineDifStronke.addActionListener(evt); btnLineStroke.addActionListener(evt); btnSave.addActionListener(evt); btnDir.addActionListener(evt); imgOptionsPanel.add(btnFont); imgOptionsPanel.add(btnLineStroke); imgOptionsPanel.add(btnLineDifStronke); exportPanel.setLayout(new BorderLayout()); JPanel panel = new JPanel(); //panel.add(new JLabel("Export as ")); // panel.add(imgType); // panel.add(btnSave); JPanel panelName = new JPanel(); //panelName.add(new JLabel("File name ")); // panelName.add(JtextFieldimgName); panelName.add(btnDir); exportPanel.add(panelName, BorderLayout.CENTER); exportPanel.add(panel, BorderLayout.SOUTH); controlPanel.setLayout(new BorderLayout()); controlPanel.add(imgOptionsPanel, BorderLayout.CENTER); controlPanel.add(exportPanel, BorderLayout.EAST); controlPanelDisplay.setLayout(new BorderLayout(1, 1)); controlPanelDisplay.add(controlPanel, BorderLayout.CENTER); controlPanelDisplay.add(zoomPanel, BorderLayout.EAST); container.setLayout(new BorderLayout(1, 1)); container.add("Center", graphPanelDisplay); container.add("South", controlPanelDisplay); xScale = 20; yScale = 20; x0 = width / 2; y0 = height / 5; this.availableStrokeSamples = new StrokeSample[4]; this.availableStrokeSamples[0] = new StrokeSample(new BasicStroke(1.5f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 10.0f, dash1, 0.0f)); this.availableStrokeSamples[1] = new StrokeSample( new BasicStroke(1.0f)); this.availableStrokeSamples[2] = new StrokeSample( new BasicStroke(2.0f)); this.availableStrokeSamples[3] = new StrokeSample( new BasicStroke(3.0f)); addWindowStateListener((WindowEvent arg0) -> { width = getSize().width - 10; height = 70 * getSize().height / 100; x0 = width / 2; y0 = height / 5; xScale = 20; yScale = 20; xSlider.setValue(50); ySlider.setValue(20); }); }
Example #8
Source File: DefaultValueAxisEditor.java From buffer_bci with GNU General Public License v3.0 | 4 votes |
/** * Standard constructor: builds a property panel for the specified axis. * * @param axis the axis, which should be changed. */ public DefaultValueAxisEditor(ValueAxis axis) { super(axis); this.autoRange = axis.isAutoRange(); this.minimumValue = axis.getLowerBound(); this.maximumValue = axis.getUpperBound(); this.autoTickUnitSelection = axis.isAutoTickUnitSelection(); this.gridPaintSample = new PaintSample(Color.blue); this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples = new StrokeSample[3]; this.availableStrokeSamples[0] = new StrokeSample( new BasicStroke(1.0f)); this.availableStrokeSamples[1] = new StrokeSample( new BasicStroke(2.0f)); this.availableStrokeSamples[2] = new StrokeSample( new BasicStroke(3.0f)); JTabbedPane other = getOtherTabs(); JPanel range = new JPanel(new LCBLayout(3)); range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); range.add(new JPanel()); this.autoRangeCheckBox = new JCheckBox(localizationResources.getString( "Auto-adjust_range"), this.autoRange); this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff"); this.autoRangeCheckBox.addActionListener(this); range.add(this.autoRangeCheckBox); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Minimum_range_value"))); this.minimumRangeValue = new JTextField(Double.toString( this.minimumValue)); this.minimumRangeValue.setEnabled(!this.autoRange); this.minimumRangeValue.setActionCommand("MinimumRange"); this.minimumRangeValue.addActionListener(this); this.minimumRangeValue.addFocusListener(this); range.add(this.minimumRangeValue); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Maximum_range_value"))); this.maximumRangeValue = new JTextField(Double.toString( this.maximumValue)); this.maximumRangeValue.setEnabled(!this.autoRange); this.maximumRangeValue.setActionCommand("MaximumRange"); this.maximumRangeValue.addActionListener(this); this.maximumRangeValue.addFocusListener(this); range.add(this.maximumRangeValue); range.add(new JPanel()); other.add(localizationResources.getString("Range"), range); other.add(localizationResources.getString("TickUnit"), createTickUnitPanel()); }
Example #9
Source File: DefaultValueAxisEditor.java From buffer_bci with GNU General Public License v3.0 | 4 votes |
/** * Standard constructor: builds a property panel for the specified axis. * * @param axis the axis, which should be changed. */ public DefaultValueAxisEditor(ValueAxis axis) { super(axis); this.autoRange = axis.isAutoRange(); this.minimumValue = axis.getLowerBound(); this.maximumValue = axis.getUpperBound(); this.autoTickUnitSelection = axis.isAutoTickUnitSelection(); this.gridPaintSample = new PaintSample(Color.blue); this.gridStrokeSample = new StrokeSample(new BasicStroke(1.0f)); this.availableStrokeSamples = new StrokeSample[3]; this.availableStrokeSamples[0] = new StrokeSample( new BasicStroke(1.0f)); this.availableStrokeSamples[1] = new StrokeSample( new BasicStroke(2.0f)); this.availableStrokeSamples[2] = new StrokeSample( new BasicStroke(3.0f)); JTabbedPane other = getOtherTabs(); JPanel range = new JPanel(new LCBLayout(3)); range.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); range.add(new JPanel()); this.autoRangeCheckBox = new JCheckBox(localizationResources.getString( "Auto-adjust_range"), this.autoRange); this.autoRangeCheckBox.setActionCommand("AutoRangeOnOff"); this.autoRangeCheckBox.addActionListener(this); range.add(this.autoRangeCheckBox); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Minimum_range_value"))); this.minimumRangeValue = new JTextField(Double.toString( this.minimumValue)); this.minimumRangeValue.setEnabled(!this.autoRange); this.minimumRangeValue.setActionCommand("MinimumRange"); this.minimumRangeValue.addActionListener(this); this.minimumRangeValue.addFocusListener(this); range.add(this.minimumRangeValue); range.add(new JPanel()); range.add(new JLabel(localizationResources.getString( "Maximum_range_value"))); this.maximumRangeValue = new JTextField(Double.toString( this.maximumValue)); this.maximumRangeValue.setEnabled(!this.autoRange); this.maximumRangeValue.setActionCommand("MaximumRange"); this.maximumRangeValue.addActionListener(this); this.maximumRangeValue.addFocusListener(this); range.add(this.maximumRangeValue); range.add(new JPanel()); other.add(localizationResources.getString("Range"), range); other.add(localizationResources.getString("TickUnit"), createTickUnitPanel()); }