Package org.joshy.sketch.modes.pixel

Source Code of org.joshy.sketch.modes.pixel.PixelToolbar

package org.joshy.sketch.modes.pixel;

import org.joshy.gfx.node.control.Label;
import org.joshy.gfx.node.control.Slider;
import org.joshy.gfx.node.control.SwatchColorPicker;
import org.joshy.gfx.node.layout.HFlexBox;
import org.joshy.sketch.controls.HistogramColorPicker;

import java.io.IOException;

/**
* Created by IntelliJ IDEA.
* User: joshmarinacci
* Date: Jul 7, 2010
* Time: 8:42:28 PM
* To change this template use File | Settings | File Templates.
*/
public class PixelToolbar extends HFlexBox {
    public SwatchColorPicker pixelColorPicker;
    public HistogramColorPicker histogramColorPicker;
    public Slider brushWidthSlider;
    public Slider brushHardnessSlider;
    public Slider brushOpacitySlider;

    public PixelToolbar(PixelDocContext context) throws IOException {
        this.setBoxAlign(Align.Top);
        pixelColorPicker = new SwatchColorPicker();
        this.add(pixelColorPicker);
        histogramColorPicker = new HistogramColorPicker(context);
        this.add(histogramColorPicker);
        this.add(new Label("W:"));
        brushWidthSlider = new Slider(false).setValue(10).setMin(1).setMax(100);
        this.add(brushWidthSlider);
        this.add(new Label("S:"));
        brushHardnessSlider = new Slider(false).setValue(1.0).setMin(0).setMax(1.0);
        this.add(brushHardnessSlider);
        this.add(new Label("O:"));
        brushOpacitySlider = new Slider(false).setValue(1.0).setMin(0).setMax(1.0);
        this.add(brushOpacitySlider);
    }
}
TOP

Related Classes of org.joshy.sketch.modes.pixel.PixelToolbar

TOP
Copyright © 2018 www.massapi.com. 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.