Codota Logo
KeyedComboBoxModel$ComboBoxItemPair.getKey
Code IndexAdd Codota to your IDE (free)

How to use
getKey
method
in
org.jfree.ui.KeyedComboBoxModel$ComboBoxItemPair

Best Java code snippets using org.jfree.ui.KeyedComboBoxModel$ComboBoxItemPair.getKey (Showing top 6 results out of 315)

  • Common ways to obtain KeyedComboBoxModel$ComboBoxItemPair
private void myMethod () {
KeyedComboBoxModel$ComboBoxItemPair k =
  • Codota IconObject key;Object value;new ComboBoxItemPair(key, value)
  • Smart code suggestions by Codota
}
origin: org.jfree/jcommon

/**
 * Searches an element by its data value. This method is called by the
 * setSelectedItem method and returns the first occurence of the element.
 *
 * @param anItem the item
 * @return the index of the item or -1 if not found.
 */
private int findDataElementIndex(final Object anItem)
{
 if (anItem == null)
 {
  throw new NullPointerException("Item to find must not be null");
 }
 for (int i = 0; i < this.data.size(); i++)
 {
  final ComboBoxItemPair datacon = (ComboBoxItemPair) this.data.get(i);
  if (anItem.equals(datacon.getKey()))
  {
   return i;
  }
 }
 return -1;
}
origin: jfree/jcommon

/**
 * Searches an element by its data value. This method is called by the
 * setSelectedItem method and returns the first occurence of the element.
 *
 * @param anItem the item
 * @return the index of the item or -1 if not found.
 */
private int findDataElementIndex(final Object anItem)
{
 if (anItem == null)
 {
  throw new NullPointerException("Item to find must not be null");
 }
 for (int i = 0; i < this.data.size(); i++)
 {
  final ComboBoxItemPair datacon = (ComboBoxItemPair) this.data.get(i);
  if (anItem.equals(datacon.getKey()))
  {
   return i;
  }
 }
 return -1;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Searches an element by its data value. This method is called by the
 * setSelectedItem method and returns the first occurence of the element.
 *
 * @param anItem the item
 * @return the index of the item or -1 if not found.
 */
private int findDataElementIndex(final Object anItem)
{
 if (anItem == null)
 {
  throw new NullPointerException("Item to find must not be null");
 }
 for (int i = 0; i < data.size(); i++)
 {
  final ComboBoxItemPair datacon = (ComboBoxItemPair) data.get(i);
  if (anItem.equals(datacon.getKey()))
  {
   return i;
  }
 }
 return -1;
}
origin: org.jfree/jcommon

/**
 * Returns the key from the given index.
 *
 * @param index the index of the key.
 * @return the the key at the specified index.
 */
public Object getKeyAt(final int index)
{
 if (index >= this.data.size())
 {
  return null;
 }
 if (index < 0)
 {
  return null;
 }
 final ComboBoxItemPair datacon = (ComboBoxItemPair) this.data.get(index);
 if (datacon == null)
 {
  return null;
 }
 return datacon.getKey();
}
origin: jfree/jcommon

/**
 * Returns the key from the given index.
 *
 * @param index the index of the key.
 * @return the the key at the specified index.
 */
public Object getKeyAt(final int index)
{
 if (index >= this.data.size())
 {
  return null;
 }
 if (index < 0)
 {
  return null;
 }
 final ComboBoxItemPair datacon = (ComboBoxItemPair) this.data.get(index);
 if (datacon == null)
 {
  return null;
 }
 return datacon.getKey();
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Returns the key from the given index.
 *
 * @param index the index of the key.
 * @return the the key at the specified index.
 */
public Object getKeyAt(final int index)
{
 if (index >= data.size())
 {
  return null;
 }
 if (index < 0)
 {
  return null;
 }
 final ComboBoxItemPair datacon = (ComboBoxItemPair) data.get(index);
 if (datacon == null)
 {
  return null;
 }
 return datacon.getKey();
}
org.jfree.uiKeyedComboBoxModel$ComboBoxItemPairgetKey

Javadoc

Returns the key.

Popular methods of KeyedComboBoxModel$ComboBoxItemPair

  • <init>
    Creates a new item pair for the given key and value. The value can be changed later, if needed.
  • getValue
    Returns the value.

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now