javax.swing.plaf.ComponentUI Java Examples

The following examples show how to use javax.swing.plaf.ComponentUI. 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: MultiDesktopIconUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getAccessibleChildrenCount</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 int getAccessibleChildrenCount(JComponent a) {
    int returnValue =
        ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(a);
    }
    return returnValue;
}
 
Example #2
Source File: MultiSpinnerUI.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPreferredSize</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 Dimension getPreferredSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getPreferredSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getPreferredSize(a);
    }
    return returnValue;
}
 
Example #3
Source File: MultiPanelUI.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMinimumSize</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 Dimension getMinimumSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getMinimumSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getMinimumSize(a);
    }
    return returnValue;
}
 
Example #4
Source File: MultiTabbedPaneUI.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMinimumSize</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 Dimension getMinimumSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getMinimumSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getMinimumSize(a);
    }
    return returnValue;
}
 
Example #5
Source File: MultiTabbedPaneUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getAccessibleChildrenCount</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 int getAccessibleChildrenCount(JComponent a) {
    int returnValue =
        ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(a);
    }
    return returnValue;
}
 
Example #6
Source File: MultiColorChooserUI.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a multiplexing UI instance if any of the auxiliary
 * <code>LookAndFeel</code>s supports this UI.  Otherwise, just returns the
 * UI object obtained from the default <code>LookAndFeel</code>.
 */
public static ComponentUI createUI(JComponent a) {
    ComponentUI mui = new MultiColorChooserUI();
    return MultiLookAndFeel.createUIs(mui,
                                      ((MultiColorChooserUI) mui).uis,
                                      a);
}
 
Example #7
Source File: MultiViewportUI.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a multiplexing UI instance if any of the auxiliary
 * <code>LookAndFeel</code>s supports this UI.  Otherwise, just returns the
 * UI object obtained from the default <code>LookAndFeel</code>.
 */
public static ComponentUI createUI(JComponent a) {
    ComponentUI mui = new MultiViewportUI();
    return MultiLookAndFeel.createUIs(mui,
                                      ((MultiViewportUI) mui).uis,
                                      a);
}
 
Example #8
Source File: MultiLabelUI.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a multiplexing UI instance if any of the auxiliary
 * <code>LookAndFeel</code>s supports this UI.  Otherwise, just returns the
 * UI object obtained from the default <code>LookAndFeel</code>.
 */
public static ComponentUI createUI(JComponent a) {
    ComponentUI mui = new MultiLabelUI();
    return MultiLookAndFeel.createUIs(mui,
                                      ((MultiLabelUI) mui).uis,
                                      a);
}
 
Example #9
Source File: DefaultLookup.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public static Icon getIcon(JComponent c, ComponentUI ui, String key,
        Icon defaultValue) {
    Object iValue = get(c, ui, key);
    if (iValue == null || !(iValue instanceof Icon)) {
        return defaultValue;
    }
    return (Icon)iValue;
}
 
Example #10
Source File: MultiScrollPaneUI.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPreferredSize</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 Dimension getPreferredSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getPreferredSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getPreferredSize(a);
    }
    return returnValue;
}
 
Example #11
Source File: MultiTreeUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPreferredSize</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 Dimension getPreferredSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getPreferredSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getPreferredSize(a);
    }
    return returnValue;
}
 
Example #12
Source File: MultiDesktopPaneUI.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>contains</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 contains(JComponent a, int b, int c) {
    boolean returnValue =
        ((ComponentUI) (uis.elementAt(0))).contains(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).contains(a,b,c);
    }
    return returnValue;
}
 
Example #13
Source File: MultiOptionPaneUI.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getAccessibleChildrenCount</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 int getAccessibleChildrenCount(JComponent a) {
    int returnValue =
        ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(a);
    }
    return returnValue;
}
 
Example #14
Source File: MultiSliderUI.java    From Java8CN with Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMinimumSize</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 Dimension getMinimumSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getMinimumSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getMinimumSize(a);
    }
    return returnValue;
}
 
Example #15
Source File: MultiSplitPaneUI.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Invokes the <code>contains</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 contains(JComponent a, int b, int c) {
    boolean returnValue =
        ((ComponentUI) (uis.elementAt(0))).contains(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).contains(a,b,c);
    }
    return returnValue;
}
 
Example #16
Source File: MultiFileChooserUI.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMaximumSize</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 Dimension getMaximumSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getMaximumSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getMaximumSize(a);
    }
    return returnValue;
}
 
Example #17
Source File: ScreenMenuItem.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
ScreenMenuItem(final JMenuItem mi) {
    super(mi.getText());
    fMenuItem = mi;
    setEnabled(fMenuItem.isEnabled());
    final ComponentUI ui = fMenuItem.getUI();

    if (ui instanceof ScreenMenuItemUI) {
        ((ScreenMenuItemUI)ui).updateListenersForScreenMenuItem();
        // SAK:  Not calling this means that mouse and mouse motion listeners don't get
        // installed.  Not a problem because the menu manager handles tracking for us.
}
}
 
Example #18
Source File: MultiButtonUI.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a multiplexing UI instance if any of the auxiliary
 * <code>LookAndFeel</code>s supports this UI.  Otherwise, just returns the
 * UI object obtained from the default <code>LookAndFeel</code>.
 */
public static ComponentUI createUI(JComponent a) {
    ComponentUI mui = new MultiButtonUI();
    return MultiLookAndFeel.createUIs(mui,
                                      ((MultiButtonUI) mui).uis,
                                      a);
}
 
Example #19
Source File: MultiListUI.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getPreferredSize</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 Dimension getPreferredSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getPreferredSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getPreferredSize(a);
    }
    return returnValue;
}
 
Example #20
Source File: MultiButtonUI.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMinimumSize</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 Dimension getMinimumSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getMinimumSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getMinimumSize(a);
    }
    return returnValue;
}
 
Example #21
Source File: MultiRootPaneUI.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getAccessibleChildrenCount</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 int getAccessibleChildrenCount(JComponent a) {
    int returnValue =
        ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(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>contains</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 contains(JComponent a, int b, int c) {
    boolean returnValue =
        ((ComponentUI) (uis.elementAt(0))).contains(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).contains(a,b,c);
    }
    return returnValue;
}
 
Example #23
Source File: DefaultLookup.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static Icon getIcon(JComponent c, ComponentUI ui, String key,
        Icon defaultValue) {
    Object iValue = get(c, ui, key);
    if (iValue == null || !(iValue instanceof Icon)) {
        return defaultValue;
    }
    return (Icon)iValue;
}
 
Example #24
Source File: MultiOptionPaneUI.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Invokes the <code>getAccessibleChildrenCount</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 int getAccessibleChildrenCount(JComponent a) {
    int returnValue =
        ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(a);
    }
    return returnValue;
}
 
Example #25
Source File: MultiSplitPaneUI.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getAccessibleChildrenCount</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 int getAccessibleChildrenCount(JComponent a) {
    int returnValue =
        ((ComponentUI) (uis.elementAt(0))).getAccessibleChildrenCount(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getAccessibleChildrenCount(a);
    }
    return returnValue;
}
 
Example #26
Source File: MultiSplitPaneUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a multiplexing UI instance if any of the auxiliary
 * <code>LookAndFeel</code>s supports this UI.  Otherwise, just returns the
 * UI object obtained from the default <code>LookAndFeel</code>.
 */
public static ComponentUI createUI(JComponent a) {
    ComponentUI mui = new MultiSplitPaneUI();
    return MultiLookAndFeel.createUIs(mui,
                                      ((MultiSplitPaneUI) mui).uis,
                                      a);
}
 
Example #27
Source File: MultiSeparatorUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>contains</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 contains(JComponent a, int b, int c) {
    boolean returnValue =
        ((ComponentUI) (uis.elementAt(0))).contains(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).contains(a,b,c);
    }
    return returnValue;
}
 
Example #28
Source File: MultiListUI.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getAccessibleChild</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 Accessible getAccessibleChild(JComponent a, int b) {
    Accessible returnValue =
        ((ComponentUI) (uis.elementAt(0))).getAccessibleChild(a,b);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getAccessibleChild(a,b);
    }
    return returnValue;
}
 
Example #29
Source File: MultiToolBarUI.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>getMinimumSize</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 Dimension getMinimumSize(JComponent a) {
    Dimension returnValue =
        ((ComponentUI) (uis.elementAt(0))).getMinimumSize(a);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).getMinimumSize(a);
    }
    return returnValue;
}
 
Example #30
Source File: MultiScrollBarUI.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Invokes the <code>contains</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 contains(JComponent a, int b, int c) {
    boolean returnValue =
        ((ComponentUI) (uis.elementAt(0))).contains(a,b,c);
    for (int i = 1; i < uis.size(); i++) {
        ((ComponentUI) (uis.elementAt(i))).contains(a,b,c);
    }
    return returnValue;
}