Java 类javax.swing.plaf.ColorChooserUI 实例源码

项目:openjdk-jdk10    文件:JColorChooserOperator.java   
/**
 * Maps {@code JColorChooser.getUI()} through queue
 */
public ColorChooserUI getUI() {
    return (runMapping(new MapAction<ColorChooserUI>("getUI") {
        @Override
        public ColorChooserUI map() {
            return ((JColorChooser) getSource()).getUI();
        }
    }));
}
项目:openjdk-jdk10    文件:JColorChooserOperator.java   
/**
 * Maps {@code JColorChooser.setUI(ColorChooserUI)} through queue
 */
public void setUI(final ColorChooserUI colorChooserUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JColorChooser) getSource()).setUI(colorChooserUI);
        }
    });
}
项目:openjdk9    文件:JColorChooserOperator.java   
/**
 * Maps {@code JColorChooser.getUI()} through queue
 */
public ColorChooserUI getUI() {
    return (runMapping(new MapAction<ColorChooserUI>("getUI") {
        @Override
        public ColorChooserUI map() {
            return ((JColorChooser) getSource()).getUI();
        }
    }));
}
项目:openjdk9    文件:JColorChooserOperator.java   
/**
 * Maps {@code JColorChooser.setUI(ColorChooserUI)} through queue
 */
public void setUI(final ColorChooserUI colorChooserUI) {
    runMapping(new MapVoidAction("setUI") {
        @Override
        public void map() {
            ((JColorChooser) getSource()).setUI(colorChooserUI);
        }
    });
}
项目:javify    文件:JColorChooser.java   
/**
 * This method resets the UI Component property to the Look and Feel
 * default.
 */
public void updateUI()
{
  setUI((ColorChooserUI) UIManager.getUI(this));
}
项目:jvm-stm    文件:JColorChooser.java   
/**
 * This method resets the UI Component property to the Look and Feel
 * default.
 */
public void updateUI()
{
  setUI((ColorChooserUI) UIManager.getUI(this));
}
项目:umple    文件:ButtonFactory.java   
public static JPopupButton createSelectionColorChooserButton(final DrawingEditor editor,
        final AttributeKey<Color> attributeKey, String labelKey,
        ResourceBundleUtil labels,
        @Nullable Map<AttributeKey, Object> defaultAttributes,
        Shape colorShape, @Nullable final Class uiclass, @Nullable final java.util.List<Disposable> dsp) {

    JPopupButton popupButton;

    popupButton = new JPopupButton();
    labels.configureToolBarButton(popupButton, labelKey);
    popupButton.setFocusable(true);
    popupButton.setRequestFocusEnabled(false);

    // We lazily initialize the popup menu because creating a JColorChooser
    // takes a lot of time.
    JComponentPopup popupMenu = new JComponentPopup() {

        private JColorChooser colorChooser;

        @Override
        public void show(Component invoker, int x, int y) {
            if (colorChooser == null) {
                initialize();
            }
            Color c;
            if (editor.getActiveView() != null && editor.getActiveView().getSelectionCount() > 0) {
                c = editor.getActiveView().getSelectedFigures().iterator().next().get(attributeKey);
            } else {
                c = editor.getDefaultAttribute(attributeKey);
            }
            colorChooser.setColor(c == null ? new Color(0, true) : c);
            super.show(invoker, x, y);
        }

        private void initialize() {
            colorChooser = new JColorChooser();
            colorChooser.setOpaque(true);
            colorChooser.setBackground(Color.WHITE);
            if (uiclass != null) {
                try {
                    colorChooser.setUI((ColorChooserUI) Methods.invokeStatic(uiclass, "createUI", new Class[]{JComponent.class}, new Object[]{colorChooser}));
                } catch (NoSuchMethodException ex) {
                    ex.printStackTrace();
                }
            }
            dsp.add(new SelectionColorChooserHandler(editor, attributeKey, colorChooser, this));
            add(colorChooser);
        }
    };


    popupButton.setPopupMenu(popupMenu);
    popupButton.setPopupAlpha(1.0f);// must be set after we set the popup menu
    Icon icon = new SelectionColorIcon(editor,
            attributeKey,
            labels.getIconProperty(labelKey, ButtonFactory.class).getImage(),
            colorShape);
    popupButton.setIcon(icon);
    popupButton.setDisabledIcon(icon);
    popupButton.setFocusable(false);

    if (dsp != null) {
        dsp.add(new SelectionComponentRepainter(editor, popupButton));
    }
    return popupButton;
}
项目:umple    文件:ButtonFactory.java   
public static JPopupButton createDrawingColorChooserButton(final DrawingEditor editor,
        final AttributeKey<Color> attributeKey, String labelKey,
        ResourceBundleUtil labels, @Nullable Map<AttributeKey, Object> defaultAttributes,
        Shape colorShape, @Nullable final Class uiclass, @Nullable final java.util.List<Disposable> dsp) {

    JPopupButton popupButton;

    popupButton = new JPopupButton();
    labels.configureToolBarButton(popupButton, labelKey);
    popupButton.setFocusable(true);
    popupButton.setRequestFocusEnabled(false);

    // We lazily initialize the popup menu because creating a JColorChooser
    // takes a lot of time.
    JComponentPopup popupMenu = new JComponentPopup() {

        private JColorChooser colorChooser;

        @Override
        public void show(Component invoker, int x, int y) {
            if (colorChooser == null) {
                initialize();
            }
            Color c;
            if (editor.getActiveView() != null) {
                c = editor.getActiveView().getDrawing().get(attributeKey);
            } else {
                c = editor.getDefaultAttribute(attributeKey);
            }
            colorChooser.setColor(c == null ? new Color(0, true) : c);
            super.show(invoker, x, y);
        }

        private void initialize() {
            colorChooser = new JColorChooser();
            colorChooser.setOpaque(true);
            colorChooser.setBackground(Color.WHITE);
            if (uiclass != null) {
                try {
                    colorChooser.setUI((ColorChooserUI) Methods.invokeStatic(uiclass, "createUI", new Class[]{JComponent.class}, new Object[]{colorChooser}));
                } catch (NoSuchMethodException ex) {
                    ex.printStackTrace();
                }
            }
            dsp.add(new DrawingColorChooserHandler(editor, attributeKey, colorChooser, this));
            add(colorChooser);
        }
    };


    popupButton.setPopupMenu(popupMenu);
    popupButton.setPopupAlpha(1.0f);// must be set after we set the popup menu
    Icon icon = new DrawingColorIcon(editor,
            attributeKey,
            labels.getIconProperty(labelKey, ButtonFactory.class).getImage(),
            colorShape);
    popupButton.setIcon(icon);
    popupButton.setDisabledIcon(icon);
    popupButton.setFocusable(false);

    if (dsp != null) {
        dsp.add(new SelectionComponentRepainter(editor, popupButton));
    }
    return popupButton;
}
项目:cn1    文件:JColorChooser.java   
public ColorChooserUI getUI() {
    return (ColorChooserUI) ui;
}
项目:cn1    文件:JColorChooser.java   
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:cn1    文件:JColorChooser.java   
@Override
public void updateUI() {
    setUI((ColorChooserUI) UIManager.getUI(this));
}
项目:JamVM-PH    文件:JColorChooser.java   
/**
 * This method resets the UI Component property to the Look and Feel
 * default.
 */
public void updateUI()
{
  setUI((ColorChooserUI) UIManager.getUI(this));
}
项目:classpath    文件:JColorChooser.java   
/**
 * This method resets the UI Component property to the Look and Feel
 * default.
 */
public void updateUI()
{
  setUI((ColorChooserUI) UIManager.getUI(this));
}
项目:freeVM    文件:JColorChooser.java   
public ColorChooserUI getUI() {
    return (ColorChooserUI) ui;
}
项目:freeVM    文件:JColorChooser.java   
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:freeVM    文件:JColorChooser.java   
@Override
public void updateUI() {
    setUI((ColorChooserUI) UIManager.getUI(this));
}
项目:freeVM    文件:JColorChooser.java   
public ColorChooserUI getUI() {
    return (ColorChooserUI) ui;
}
项目:freeVM    文件:JColorChooser.java   
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:freeVM    文件:JColorChooser.java   
@Override
public void updateUI() {
    setUI((ColorChooserUI) UIManager.getUI(this));
}
项目:OpenJSharp    文件:JColorChooser.java   
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return the <code>ColorChooserUI</code> object that renders
 *          this component
 */
public ColorChooserUI getUI() {
    return (ColorChooserUI)ui;
}
项目:OpenJSharp    文件:JColorChooser.java   
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>ColorChooserUI</code> L&amp;F object
 * @see UIDefaults#getUI
 *
 * @beaninfo
 *       bound: true
 *      hidden: true
 * description: The UI object that implements the color chooser's LookAndFeel.
 */
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:OpenJSharp    文件:JColorChooser.java   
/**
 * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 * Replaces the current UI object with the latest version from the
 * <code>UIManager</code>.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((ColorChooserUI)UIManager.getUI(this));
}
项目:jdk8u-jdk    文件:JColorChooser.java   
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return the <code>ColorChooserUI</code> object that renders
 *          this component
 */
public ColorChooserUI getUI() {
    return (ColorChooserUI)ui;
}
项目:jdk8u-jdk    文件:JColorChooser.java   
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>ColorChooserUI</code> L&amp;F object
 * @see UIDefaults#getUI
 *
 * @beaninfo
 *       bound: true
 *      hidden: true
 * description: The UI object that implements the color chooser's LookAndFeel.
 */
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:jdk8u-jdk    文件:JColorChooser.java   
/**
 * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 * Replaces the current UI object with the latest version from the
 * <code>UIManager</code>.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((ColorChooserUI)UIManager.getUI(this));
}
项目:openjdk-jdk10    文件:JColorChooser.java   
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return the <code>ColorChooserUI</code> object that renders
 *          this component
 */
public ColorChooserUI getUI() {
    return (ColorChooserUI)ui;
}
项目:openjdk-jdk10    文件:JColorChooser.java   
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>ColorChooserUI</code> L&amp;F object
 * @see UIDefaults#getUI
 */
@BeanProperty(hidden = true, description
        = "The UI object that implements the color chooser's LookAndFeel.")
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:openjdk-jdk10    文件:JColorChooser.java   
/**
 * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 * Replaces the current UI object with the latest version from the
 * <code>UIManager</code>.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((ColorChooserUI)UIManager.getUI(this));
}
项目:openjdk9    文件:JColorChooser.java   
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return the <code>ColorChooserUI</code> object that renders
 *          this component
 */
public ColorChooserUI getUI() {
    return (ColorChooserUI)ui;
}
项目:openjdk9    文件:JColorChooser.java   
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>ColorChooserUI</code> L&amp;F object
 * @see UIDefaults#getUI
 */
@BeanProperty(hidden = true, description
        = "The UI object that implements the color chooser's LookAndFeel.")
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:openjdk9    文件:JColorChooser.java   
/**
 * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 * Replaces the current UI object with the latest version from the
 * <code>UIManager</code>.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((ColorChooserUI)UIManager.getUI(this));
}
项目:Java8CN    文件:JColorChooser.java   
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return the <code>ColorChooserUI</code> object that renders
 *          this component
 */
public ColorChooserUI getUI() {
    return (ColorChooserUI)ui;
}
项目:Java8CN    文件:JColorChooser.java   
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>ColorChooserUI</code> L&amp;F object
 * @see UIDefaults#getUI
 *
 * @beaninfo
 *       bound: true
 *      hidden: true
 * description: The UI object that implements the color chooser's LookAndFeel.
 */
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:Java8CN    文件:JColorChooser.java   
/**
 * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 * Replaces the current UI object with the latest version from the
 * <code>UIManager</code>.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((ColorChooserUI)UIManager.getUI(this));
}
项目:jdk8u_jdk    文件:JColorChooser.java   
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return the <code>ColorChooserUI</code> object that renders
 *          this component
 */
public ColorChooserUI getUI() {
    return (ColorChooserUI)ui;
}
项目:jdk8u_jdk    文件:JColorChooser.java   
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>ColorChooserUI</code> L&amp;F object
 * @see UIDefaults#getUI
 *
 * @beaninfo
 *       bound: true
 *      hidden: true
 * description: The UI object that implements the color chooser's LookAndFeel.
 */
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:jdk8u_jdk    文件:JColorChooser.java   
/**
 * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 * Replaces the current UI object with the latest version from the
 * <code>UIManager</code>.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((ColorChooserUI)UIManager.getUI(this));
}
项目:lookaside_java-1.8.0-openjdk    文件:JColorChooser.java   
/**
 * Returns the L&amp;F object that renders this component.
 *
 * @return the <code>ColorChooserUI</code> object that renders
 *          this component
 */
public ColorChooserUI getUI() {
    return (ColorChooserUI)ui;
}
项目:lookaside_java-1.8.0-openjdk    文件:JColorChooser.java   
/**
 * Sets the L&amp;F object that renders this component.
 *
 * @param ui  the <code>ColorChooserUI</code> L&amp;F object
 * @see UIDefaults#getUI
 *
 * @beaninfo
 *       bound: true
 *      hidden: true
 * description: The UI object that implements the color chooser's LookAndFeel.
 */
public void setUI(ColorChooserUI ui) {
    super.setUI(ui);
}
项目:lookaside_java-1.8.0-openjdk    文件:JColorChooser.java   
/**
 * Notification from the <code>UIManager</code> that the L&amp;F has changed.
 * Replaces the current UI object with the latest version from the
 * <code>UIManager</code>.
 *
 * @see JComponent#updateUI
 */
public void updateUI() {
    setUI((ColorChooserUI)UIManager.getUI(this));
}