javax.swing.plaf.ComboBoxUI Java Examples

The following examples show how to use javax.swing.plaf.ComboBoxUI. 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: SynthComboPopup.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #2
Source File: SynthComboPopup.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #3
Source File: SynthComboPopup.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #4
Source File: SynthComboPopup.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #5
Source File: SynthComboPopup.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #6
Source File: SynthComboPopup.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #7
Source File: SynthComboPopup.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #8
Source File: SynthComboPopup.java    From Java8CN with Apache License 2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #9
Source File: SynthComboPopup.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #10
Source File: SynthComboPopup.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #11
Source File: SynthComboPopup.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #12
Source File: SynthComboPopup.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #13
Source File: SynthComboPopup.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #14
Source File: SynthComboPopup.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #15
Source File: SynthComboPopup.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #16
Source File: SynthComboPopup.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #17
Source File: SynthComboPopup.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @inheritDoc
 *
 * Overridden to take into account any popup insets specified in
 * SynthComboBoxUI
 */
@Override
protected Rectangle computePopupBounds(int px, int py, int pw, int ph) {
    ComboBoxUI ui = comboBox.getUI();
    if (ui instanceof SynthComboBoxUI) {
        SynthComboBoxUI sui = (SynthComboBoxUI) ui;
        if (sui.popupInsets != null) {
            Insets i = sui.popupInsets;
            return super.computePopupBounds(
                    px + i.left,
                    py + i.top,
                    pw - i.left - i.right,
                    ph - i.top - i.bottom);
        }
    }
    return super.computePopupBounds(px, py, pw, ph);
}
 
Example #18
Source File: MultiComboBoxUI.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isPopupVisible</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isPopupVisible(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isPopupVisible(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isPopupVisible(a);
    }
    return returnValue;
}
 
Example #19
Source File: MultiComboBoxUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isPopupVisible</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isPopupVisible(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isPopupVisible(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isPopupVisible(a);
    }
    return returnValue;
}
 
Example #20
Source File: MultiComboBoxUI.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isFocusTraversable</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isFocusTraversable(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isFocusTraversable(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isFocusTraversable(a);
    }
    return returnValue;
}
 
Example #21
Source File: MultiComboBoxUI.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isFocusTraversable</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isFocusTraversable(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isFocusTraversable(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isFocusTraversable(a);
    }
    return returnValue;
}
 
Example #22
Source File: MultiComboBoxUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isFocusTraversable</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isFocusTraversable(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isFocusTraversable(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isFocusTraversable(a);
    }
    return returnValue;
}
 
Example #23
Source File: MultiComboBoxUI.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isPopupVisible</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isPopupVisible(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isPopupVisible(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isPopupVisible(a);
    }
    return returnValue;
}
 
Example #24
Source File: MultiComboBoxUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isPopupVisible</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isPopupVisible(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isPopupVisible(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isPopupVisible(a);
    }
    return returnValue;
}
 
Example #25
Source File: JComboBoxOperator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Maps {@code JComboBox.getUI()} through queue
 */
public ComboBoxUI getUI() {
    return (runMapping(new MapAction<ComboBoxUI>("getUI") {
        @Override
        public ComboBoxUI map() {
            return ((JComboBox) getSource()).getUI();
        }
    }));
}
 
Example #26
Source File: MultiComboBoxUI.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>isFocusTraversable</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isFocusTraversable(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isFocusTraversable(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isFocusTraversable(a);
    }
    return returnValue;
}
 
Example #27
Source File: JComboBoxOperator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Maps {@code JComboBox.setUI(ComboBoxUI)} through queue
 */
public void setUI(final ComboBoxUI comboBoxUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JComboBox) getSource()).setUI(comboBoxUI);
        }
    });
}
 
Example #28
Source File: MultiComboBoxUI.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>isPopupVisible</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isPopupVisible(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isPopupVisible(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isPopupVisible(a);
    }
    return returnValue;
}
 
Example #29
Source File: MultiComboBoxUI.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>isFocusTraversable</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isFocusTraversable(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isFocusTraversable(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isFocusTraversable(a);
    }
    return returnValue;
}
 
Example #30
Source File: MultiComboBoxUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>isFocusTraversable</code> method on each UI handled by this object.
 *
 * @return the value obtained from the first UI, which is
 * the UI obtained from the default <code>LookAndFeel</code>
 */
public boolean isFocusTraversable(JComboBox a) {
    boolean returnValue =
        ((ComboBoxUI) (uis.elementAt(0))).isFocusTraversable(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComboBoxUI) (uis.elementAt(i))).isFocusTraversable(a);
    }
    return returnValue;
}