Search in sources :

Example 11 with ResourceManager

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

the class TinaController method backgroundColorBtn_clicked.

public void backgroundColorBtn_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().getBgColorULRed(), getCurrFlame().getBgColorULGreen(), getCurrFlame().getBgColorULBlue()));
        if (selectedColor != null) {
            getCurrFlame().setBgColorULRed(selectedColor.getRed());
            getCurrFlame().setBgColorULGreen(selectedColor.getGreen());
            getCurrFlame().setBgColorULBlue(selectedColor.getBlue());
            refreshFlameImage(true, false, 1, true, true);
            refreshBGColorULIndicator();
        }
    }
}
Also used : Color(java.awt.Color) RGBColor(org.jwildfire.create.tina.palette.RGBColor) ResourceManager(com.l2fprod.common.util.ResourceManager)

Example 12 with ResourceManager

use of com.l2fprod.common.util.ResourceManager in project CodenameOne by codenameone.

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)

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