congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
StrokeChooserPanel
Code IndexAdd Tabnine to your IDE (free)

How to use
StrokeChooserPanel
in
org.jfree.ui

Best Java code snippets using org.jfree.ui.StrokeChooserPanel (Showing top 8 results out of 315)

origin: jfree/jcommon

  public void actionPerformed(final ActionEvent evt) {
    getSelector().transferFocus();
  }
});
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Allow the user to change the outline stroke.
 */
private void attemptOutlineStrokeSelection() {
  StrokeChooserPanel panel = new StrokeChooserPanel(
      this.outlineStrokeSample, this.availableStrokeSamples);
  int result = JOptionPane.showConfirmDialog(this, panel,
      localizationResources.getString("Stroke_Selection"),
      JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
  if (result == JOptionPane.OK_OPTION) {
    this.outlineStrokeSample.setStroke(panel.getSelectedStroke());
  }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Creates a panel containing a combo-box that allows the user to select
 * one stroke from a list of available strokes.
 *
 * @param current  the current stroke sample.
 * @param available  an array of 'available' stroke samples.
 */
public StrokeChooserPanel(final StrokeSample current, final StrokeSample[] available) {
  setLayout(new BorderLayout());
  this.selector = new JComboBox(available);
  this.selector.setSelectedItem(current);
  this.selector.setRenderer(new StrokeSample(new BasicStroke(1)));
  add(this.selector);
  // Changes due to focus problems!! DZ
  this.selector.addActionListener(new ActionListener() {
    public void actionPerformed(final ActionEvent evt) {
      getSelector().transferFocus();
    }
  });
}
origin: jfree/jcommon

/**
 * Creates a panel containing a combo-box that allows the user to select
 * one stroke from a list of available strokes.
 *
 * @param current  the current stroke sample.
 * @param available  an array of 'available' stroke samples.
 */
public StrokeChooserPanel(StrokeSample current, StrokeSample[] available) {
  setLayout(new BorderLayout());
  // we've changed the behaviour here to populate the combo box
  // with Stroke objects directly - ideally we'd change the signature
  // of the constructor too...maybe later.
  DefaultComboBoxModel model = new DefaultComboBoxModel();
  for (int i = 0; i < available.length; i++) {
    model.addElement(available[i].getStroke());
  }
  this.selector = new JComboBox(model);
  this.selector.setSelectedItem(current.getStroke());
  this.selector.setRenderer(new StrokeSample(null));
  add(this.selector);
  // Changes due to focus problems!! DZ
  this.selector.addActionListener(new ActionListener() {
    public void actionPerformed(final ActionEvent evt) {
      getSelector().transferFocus();
    }
  });
}
origin: org.jfree/jcommon

/**
 * Creates a panel containing a combo-box that allows the user to select
 * one stroke from a list of available strokes.
 *
 * @param current  the current stroke sample.
 * @param available  an array of 'available' stroke samples.
 */
public StrokeChooserPanel(StrokeSample current, StrokeSample[] available) {
  setLayout(new BorderLayout());
  // we've changed the behaviour here to populate the combo box
  // with Stroke objects directly - ideally we'd change the signature
  // of the constructor too...maybe later.
  DefaultComboBoxModel model = new DefaultComboBoxModel();
  for (int i = 0; i < available.length; i++) {
    model.addElement(available[i].getStroke());
  }
  this.selector = new JComboBox(model);
  this.selector.setSelectedItem(current.getStroke());
  this.selector.setRenderer(new StrokeSample(null));
  add(this.selector);
  // Changes due to focus problems!! DZ
  this.selector.addActionListener(new ActionListener() {
    public void actionPerformed(final ActionEvent evt) {
      getSelector().transferFocus();
    }
  });
}
origin: org.jfree/com.springsource.org.jfree

  public void actionPerformed(final ActionEvent evt) {
    getSelector().transferFocus();
  }
});
origin: org.codehaus.jtstand/jtstand-chart

/**
 * Handle a grid stroke selection.
 */
private void attemptGridStrokeSelection() {
  StrokeChooserPanel panel = new StrokeChooserPanel(this.gridStrokeSample,
      this.availableStrokeSamples);
  int result = JOptionPane.showConfirmDialog(this, panel,
      localizationResources.getString("Stroke_Selection"),
      JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
  if (result == JOptionPane.OK_OPTION) {
    this.gridStrokeSample.setStroke(panel.getSelectedStroke());
  }
}
origin: org.jfree/jcommon

  public void actionPerformed(final ActionEvent evt) {
    getSelector().transferFocus();
  }
});
org.jfree.uiStrokeChooserPanel

Javadoc

A component for choosing a stroke from a list of available strokes. This class needs work.

Most used methods

  • add
  • getSelector
    Returns the selector component.
  • setLayout
  • <init>
    Creates a panel containing a combo-box that allows the user to select one stroke from a list of avai
  • getSelectedStroke
    Returns the selected stroke.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • getExternalFilesDir (Context)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ImageIO (javax.imageio)
  • JTextField (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now