类java.awt.ItemSelectable源码实例Demo

下面列出了怎么用java.awt.ItemSelectable的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: ET_Redux   文件: CheckBoxNodeEditor.java
/**
 *
 * @param tree
 * @param value
 * @param selected
 * @param expanded
 * @param leaf
 * @param row
 * @return
 */
@Override
public Component getTreeCellEditorComponent(JTree tree, Object value, boolean selected,
        boolean expanded, boolean leaf, int row) {

    Component editor = renderer.getTreeCellRendererComponent(tree, value, true, expanded, leaf,
            row, true);

    ItemListener itemListener = (ItemEvent itemEvent) -> {
        if (stopCellEditing()) {
            fireEditingStopped();
        }
    };
    if (editor instanceof JCheckBox) {
        ((ItemSelectable) editor).addItemListener(itemListener);
    }
    return editor;
}
 
源代码2 项目: netbeans   文件: BasicSearchForm.java
@Override
public void itemStateChanged(ItemEvent e) {
    ItemSelectable is = e.getItemSelectable();
    if (is == matchCase) {
        matchCaseChanged();
    } else if (is == textToFindType) {
        regexpChanged();
    }
}
 
源代码3 项目: evosql   文件: Transfer.java
/**
 * Method declaration
 *
 *
 * @param e
 */
public void itemStateChanged(ItemEvent e) {

    ItemSelectable item = e.getItemSelectable();

    if (item == lTable) {
        if (iSelectionStep == SELECT_SOURCE_TABLES) {
            String table    = lTable.getSelectedItem();
            int    selected = ((Integer) e.getItem()).intValue();

            for (int i = 0; i < tTable.size(); i++) {
                TransferTable t = (TransferTable) tTable.elementAt(i);

                if (t == null) {
                    continue;
                }

                if (i == selected) {
                    saveTable();
                    displayTable(t);
                    updateEnabled(true);
                }
            }
        }
    } else {

        // it must be a checkbox
        saveTable();
        updateEnabled(true);
    }
}
 
源代码4 项目: jdk1.8-source-analysis   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码5 项目: jdk1.8-source-analysis   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码6 项目: dragonwell8_jdk   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码7 项目: dragonwell8_jdk   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码8 项目: TencentKona-8   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码9 项目: TencentKona-8   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码10 项目: jdk8u60   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码11 项目: jdk8u60   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码12 项目: JDKSourceCode1.8   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码13 项目: JDKSourceCode1.8   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码14 项目: openjdk-jdk8u   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码15 项目: openjdk-jdk8u   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码16 项目: openjdk-jdk8u-backup   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码17 项目: openjdk-jdk8u-backup   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码18 项目: Bytecoder   文件: ItemEvent.java
/**
 * Constructs an {@code ItemEvent} object.
 * <p> This method throws an
 * {@code IllegalArgumentException} if {@code source}
 * is {@code null}.
 *
 * @param source The {@code ItemSelectable} object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if {@code source} is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码19 项目: Bytecoder   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码20 项目: openjdk-jdk9   文件: ItemEvent.java
/**
 * Constructs an {@code ItemEvent} object.
 * <p> This method throws an
 * {@code IllegalArgumentException} if {@code source}
 * is {@code null}.
 *
 * @param source The {@code ItemSelectable} object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if {@code source} is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码21 项目: openjdk-jdk9   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码22 项目: jdk8u-jdk   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码23 项目: jdk8u-jdk   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码24 项目: Java8CN   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码25 项目: Java8CN   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码26 项目: hottub   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码27 项目: hottub   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码28 项目: openjdk-8-source   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
源代码29 项目: openjdk-8-source   文件: ItemEvent.java
/**
 * Returns the originator of the event.
 *
 * @return the ItemSelectable object that originated the event.
 */
public ItemSelectable getItemSelectable() {
    return (ItemSelectable)source;
}
 
源代码30 项目: openjdk-8   文件: ItemEvent.java
/**
 * Constructs an <code>ItemEvent</code> object.
 * <p> This method throws an
 * <code>IllegalArgumentException</code> if <code>source</code>
 * is <code>null</code>.
 *
 * @param source The <code>ItemSelectable</code> object
 *               that originated the event
 * @param id           The integer that identifies the event type.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @param item   An object -- the item affected by the event
 * @param stateChange  An integer that indicates whether the item was
 *               selected or deselected.
 *                     For information on allowable values, see
 *                     the class description for {@link ItemEvent}
 * @throws IllegalArgumentException if <code>source</code> is null
 * @see #getItemSelectable()
 * @see #getID()
 * @see #getStateChange()
 */
public ItemEvent(ItemSelectable source, int id, Object item, int stateChange) {
    super(source, id);
    this.item = item;
    this.stateChange = stateChange;
}
 
 类所在包
 类方法
 同包方法