Examples of RGBColorSelection


Examples of com.lightcrafts.model.RGBColorSelection

    void operationChanged( Operation op ) {
        m_op = op;
    }

    void save( XmlNode node ) {
        final RGBColorSelection cs = m_op.getColorSelection();

        final XmlNode colorNode = node.addChild( ColorSelectionKey );

        colorNode.setAttribute(
            HueRedKey, Float.toString( cs.red )
View Full Code Here

Examples of com.lightcrafts.model.RGBColorSelection

                final boolean isInverted = Boolean.parseBoolean(
                    node.getAttribute( InvertedKey )
                );

                final RGBColorSelection cs = new RGBColorSelection(
                    red, green, blue, radius, blv, blfv, buv, bufv,
                    isInverted, isHueEnabled, isLuminosityEnabled
                );
                colorSelectionToControls( cs, false );
                m_op.setColorSelection( cs );
View Full Code Here

Examples of com.lightcrafts.model.RGBColorSelection

        final float cllv = llv / lWidth;
        final float cllfv = (llv - llfv) / lWidth;
        final float cluv = luv / lWidth;
        final float clufv = (lufv - luv) / lWidth;

        final RGBColorSelection cs = new RGBColorSelection(
            c.getRed() / 255F, c.getGreen() / 255F, c.getBlue() / 255F,
            radius,
            cllv, cllfv, cluv, clufv,
            m_invertSelection.isSelected(),
            m_hueEnabled.isSelected(), m_luminosityEnabled.isSelected()
        );

        if ( cs.isAllSelected() )
            pcs.firePropertyChange(
                COLOR_SELECTION, Boolean.TRUE, Boolean.FALSE
            );
        else
            pcs.firePropertyChange(
View Full Code Here

Examples of com.lightcrafts.model.RGBColorSelection

                    Math.min( cs.luminosityLower, cs.luminosityLowerFeather );
                luminosityUpperFeather =
                    Math.min( 1-cs.luminosityUpper, cs.luminosityUpperFeather );
            }

            cs = new RGBColorSelection(
                cs.red, cs.green, cs.blue, radius,
                cs.luminosityLower, luminosityLowerFeather,
                cs.luminosityUpper, luminosityUpperFeather,
                false,
                m_hueEnabled.isSelected(),
View Full Code Here

Examples of com.lightcrafts.model.RGBColorSelection

            m_isUpdatingControls = false;
        }
    }

    private void selectColorAt( Point2D p ) {
        RGBColorSelection cs = m_op.getColorSelectionAt( p );
        cs = mergeColorSelections( cs );
        m_op.setColorSelection( cs );
        colorSelectionToControls( cs, false );
        postEdit( LOCALE.get( "ColorDropperEditName" ) );
    }
View Full Code Here

Examples of com.lightcrafts.model.RGBColorSelection

        if ( !m_skipSelectPresetCode ) {
            final boolean wasUpdatingControls = m_isUpdatingControls;
            m_skipSelectPresetCode = true;
            m_isUpdatingControls = true;
            m_hueEnabled.setSelected( true );
            RGBColorSelection cs =
                new RGBColorSelection( p, m_invertSelection.isSelected() );
            //cs = mergeColorSelections( cs );
            m_op.setColorSelection( cs );
            colorSelectionToControls( cs, false );
            m_skipSelectPresetCode = false;
            if ( !wasUpdatingControls )
View Full Code Here

Examples of com.lightcrafts.model.RGBColorSelection

                        button.setText("All");
                        button.setSelected(true);

                        button.setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 3));
                    } else {
                        final RGBColorSelection cs =
                            new RGBColorSelection(p, false);

                        final byte[] systemColor = new byte[3];
                        ts.doTransform(
                            new byte[]{
                                (byte)(0xff * cs.red),
 
View Full Code Here

Examples of com.lightcrafts.model.RGBColorSelection

            postEdit( LOCALE.get( "ColorSelectorEditName" ) );
        }

        public void stateChanged( ChangeEvent ce ) {
            if ( !m_isUpdatingControls ) {
                final RGBColorSelection cs = controlsToColorSelection();
                m_lowerLuminosityFeather = cs.luminosityLowerFeather;
                m_upperLuminosityFeather = cs.luminosityUpperFeather;
                m_op.setColorSelection( cs );
                m_prevCS = cs;
            }
View Full Code Here
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.