Package org.apache.pivot.wtk

Examples of org.apache.pivot.wtk.ColorChooser


    protected ColorChooser colorChooser;
    protected ColorChooserPopup colorChooserPopup;
    protected boolean pressed = false;

    public ColorChooserButtonSkin() {
        colorChooser = new ColorChooser();
        colorChooser.getComponentMouseButtonListeners().add(colorChooserMouseButtonListener);

        colorChooserPopup = new ColorChooserPopup();
        colorChooserPopup.getComponentKeyListeners().add(colorChooserPopupKeyListener);
        colorChooserPopup.getWindowStateListeners().add(colorChooserPopupWindowStateListener);
View Full Code Here


    implements ColorChooserListener, ColorChooserSelectionListener {
    @Override
    public void install(Component component) {
        super.install(component);

        ColorChooser colorChooser = (ColorChooser)component;
        colorChooser.getColorChooserListeners().add(this);
        colorChooser.getColorChooserSelectionListeners().add(this);
    }
View Full Code Here

    protected ColorChooser colorChooser;
    protected ColorChooserPopup colorChooserPopup;
    protected boolean pressed = false;

    public ColorChooserButtonSkin() {
        colorChooser = new ColorChooser();
        colorChooser.getComponentMouseButtonListeners().add(colorChooserMouseButtonListener);

        colorChooserPopup = new ColorChooserPopup();
        colorChooserPopup.getComponentKeyListeners().add(colorChooserPopupKeyListener);
        colorChooserPopup.getWindowStateListeners().add(colorChooserPopupWindowStateListener);
View Full Code Here

    protected ColorChooser colorChooser;
    protected ColorChooserPopup colorChooserPopup;
    protected boolean pressed = false;

    public ColorChooserButtonSkin() {
        colorChooser = new ColorChooser();
        colorChooser.getComponentMouseButtonListeners().add(colorChooserMouseButtonListener);

        colorChooserPopup = new ColorChooserPopup();
        colorChooserPopup.getComponentKeyListeners().add(colorChooserPopupKeyListener);
        colorChooserPopup.getWindowStateListeners().add(colorChooserPopupWindowStateListener);
View Full Code Here

    @Override
    public void install(Component component) {
        super.install(component);

        ColorChooser colorChooser = (ColorChooser)component;
        colorChooser.add(tablePane);

        selectedColorChanged(colorChooser, null);
    }
View Full Code Here

            return consumed;
        }

        private void setSelectedColor(int y) {
            ColorChooser colorChooser = (ColorChooser)TerraColorChooserSkin.this.getComponent();

            int height = getHeight();

            float hue = 1f - (Math.min(Math.max(y, 0), height - 1) / (float)height);
            float saturation = saturationValueChooser.getSaturation();
            float value = saturationValueChooser.getValue();

            hueChooser.setHue(hue);

            updating = true;
            try {
                colorChooser.setSelectedColor(Color.getHSBColor(hue, saturation, value));
            } finally {
                updating = false;
            }
        }
View Full Code Here

            return consumed;
        }

        private void setSelectedColor(int x, int y) {
            ColorChooser colorChooser = (ColorChooser)TerraColorChooserSkin.this.getComponent();

            int width = getWidth();
            int height = getHeight();

            float hue = hueChooser.getHue();
            float saturation = 1f - (Math.min(Math.max(y, 0), height - 1) / (float)height);
            float value = Math.min(Math.max(x, 0), width - 1) / (float)width;

            saturationValueChooser.setSaturation(saturation);
            saturationValueChooser.setValue(value);

            updating = true;
            try {
                colorChooser.setSelectedColor(Color.getHSBColor(hue, saturation, value));
            } finally {
                updating = false;
            }
        }
View Full Code Here

    implements ColorChooserSelectionListener {
    @Override
    public void install(Component component) {
        super.install(component);

        ColorChooser colorChooser = (ColorChooser)component;
        colorChooser.getColorChooserSelectionListeners().add(this);
    }
View Full Code Here

    protected ColorChooser colorChooser;
    protected ColorChooserPopup colorChooserPopup;
    protected boolean pressed = false;

    public ColorChooserButtonSkin() {
        colorChooser = new ColorChooser();
        colorChooser.getComponentMouseButtonListeners().add(colorChooserMouseButtonListener);

        colorChooserPopup = new ColorChooserPopup();
        colorChooserPopup.getComponentKeyListeners().add(colorChooserPopupKeyListener);
        colorChooserPopup.getWindowStateListeners().add(colorChooserPopupWindowStateListener);
View Full Code Here

    protected ColorChooser colorChooser;
    protected ColorChooserPopup colorChooserPopup;
    protected boolean pressed = false;

    public ColorChooserButtonSkin() {
        colorChooser = new ColorChooser();
        colorChooser.getComponentMouseButtonListeners().add(colorChooserMouseButtonListener);

        colorChooserPopup = new ColorChooserPopup();
        colorChooserPopup.getComponentKeyListeners().add(colorChooserPopupKeyListener);
        colorChooserPopup.getWindowStateListeners().add(colorChooserPopupWindowStateListener);
View Full Code Here

TOP

Related Classes of org.apache.pivot.wtk.ColorChooser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.