Search in sources :

Example 6 with ResourceManager

use of com.l2fprod.common.util.ResourceManager in project JWildfire by thargor6.

the class GradientOverlay method gradientMarker_selectColor.

public boolean gradientMarker_selectColor(int marker, RGBPalette pGradient) {
    if (marker >= 0) {
        ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);
        String title = rm.getString("ColorPropertyEditor.title");
        RGBColor color = pGradient.getColor(markerPos[marker]);
        Color selectedColor = JColorChooser.showDialog(parent, title, new Color(color.getRed(), color.getGreen(), color.getBlue()));
        if (selectedColor != null) {
            pGradient.setColor(markerPos[marker], selectedColor.getRed(), selectedColor.getGreen(), selectedColor.getBlue());
            return true;
        }
    }
    return false;
}
Also used : Color(java.awt.Color) RGBColor(org.jwildfire.create.tina.palette.RGBColor) RGBColor(org.jwildfire.create.tina.palette.RGBColor) ResourceManager(com.l2fprod.common.util.ResourceManager)

Example 7 with ResourceManager

use of com.l2fprod.common.util.ResourceManager in project JWildfire by thargor6.

the class FlameControlsDelegate method solidRenderingLightColorBtn_clicked.

public void solidRenderingLightColorBtn_clicked() {
    DistantLight light = getSolidRenderingSelectedLight();
    if (light != null) {
        owner.undoManager.saveUndoPoint(getCurrFlame());
        ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);
        String title = rm.getString("ColorPropertyEditor.title");
        Color selectedColor = JColorChooser.showDialog(rootPanel, title, new Color(Tools.roundColor(light.getRed() * GammaCorrectionFilter.COLORSCL), Tools.roundColor(light.getGreen() * GammaCorrectionFilter.COLORSCL), Tools.roundColor(light.getBlue() * GammaCorrectionFilter.COLORSCL)));
        setLightColor(light, selectedColor);
    }
}
Also used : Color(java.awt.Color) RGBColor(org.jwildfire.create.tina.palette.RGBColor) Stereo3dColor(org.jwildfire.create.tina.base.Stereo3dColor) DistantLight(org.jwildfire.create.tina.base.solidrender.DistantLight) ResourceManager(com.l2fprod.common.util.ResourceManager)

Example 8 with ResourceManager

use of com.l2fprod.common.util.ResourceManager in project JWildfire by thargor6.

the class ColorPropertyEditor method selectColor.

protected void selectColor() {
    ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);
    String title = rm.getString("ColorPropertyEditor.title");
    Color selectedColor = JColorChooser.showDialog(editor, title, color);
    if (selectedColor != null) {
        Color oldColor = color;
        Color newColor = selectedColor;
        label.setValue(newColor);
        color = newColor;
        firePropertyChange(oldColor, newColor);
    }
}
Also used : Color(java.awt.Color) ResourceManager(com.l2fprod.common.util.ResourceManager)

Example 9 with ResourceManager

use of com.l2fprod.common.util.ResourceManager in project JWildfire by thargor6.

the class TinaController method backgroundColorLRBtn_clicked.

public void backgroundColorLRBtn_clicked() {
    if (getCurrFlame() != null) {
        undoManager.saveUndoPoint(getCurrFlame());
        ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);
        String title = rm.getString("ColorPropertyEditor.title");
        Color selectedColor = JColorChooser.showDialog(rootPanel, title, new Color(getCurrFlame().getBgColorLRRed(), getCurrFlame().getBgColorLRGreen(), getCurrFlame().getBgColorLRBlue()));
        if (selectedColor != null) {
            getCurrFlame().setBgColorLRRed(selectedColor.getRed());
            getCurrFlame().setBgColorLRGreen(selectedColor.getGreen());
            getCurrFlame().setBgColorLRBlue(selectedColor.getBlue());
            refreshFlameImage(true, false, 1, true, true);
            refreshBGColorLRIndicator();
        }
    }
}
Also used : Color(java.awt.Color) RGBColor(org.jwildfire.create.tina.palette.RGBColor) ResourceManager(com.l2fprod.common.util.ResourceManager)

Example 10 with ResourceManager

use of com.l2fprod.common.util.ResourceManager in project JWildfire by thargor6.

the class TinaController method backgroundColorURBtn_clicked.

public void backgroundColorURBtn_clicked() {
    if (getCurrFlame() != null) {
        undoManager.saveUndoPoint(getCurrFlame());
        ResourceManager rm = ResourceManager.all(FilePropertyEditor.class);
        String title = rm.getString("ColorPropertyEditor.title");
        Color selectedColor = JColorChooser.showDialog(rootPanel, title, new Color(getCurrFlame().getBgColorURRed(), getCurrFlame().getBgColorURGreen(), getCurrFlame().getBgColorURBlue()));
        if (selectedColor != null) {
            getCurrFlame().setBgColorURRed(selectedColor.getRed());
            getCurrFlame().setBgColorURGreen(selectedColor.getGreen());
            getCurrFlame().setBgColorURBlue(selectedColor.getBlue());
            refreshFlameImage(true, false, 1, true, true);
            refreshBGColorURIndicator();
        }
    }
}
Also used : Color(java.awt.Color) RGBColor(org.jwildfire.create.tina.palette.RGBColor) ResourceManager(com.l2fprod.common.util.ResourceManager)

Aggregations

ResourceManager (com.l2fprod.common.util.ResourceManager)12 Color (java.awt.Color)10 RGBColor (org.jwildfire.create.tina.palette.RGBColor)8 File (java.io.File)2 JFileChooser (javax.swing.JFileChooser)2 Stereo3dColor (org.jwildfire.create.tina.base.Stereo3dColor)2 IOException (java.io.IOException)1 DistantLight (org.jwildfire.create.tina.base.solidrender.DistantLight)1 MaterialSettings (org.jwildfire.create.tina.base.solidrender.MaterialSettings)1