// Path: src/main/java/com/jvms/i18neditor/util/Colors.java
// public final class Colors {
// 
// 	/**
// 	 * Multiplies the RGB values of a color with the given factor.
// 	 * 
// 	 * @param 	c the original color
// 	 * @param 	factor the factor to scale with
// 	 * @return 	the scaled color
// 	 */
// 	public static Color scale(Color c, float factor) {
// 		return new Color(
// 				roundColorValue(c.getRed()*factor), 
// 				roundColorValue(c.getGreen()*factor), 
// 				roundColorValue(c.getBlue()*factor),
// 				c.getAlpha());
// 	}
// 	
// 	/**
// 	 * Gets the hex representation of the RGB values of the given color.
// 	 * 
// 	 * @param 	color the color to get the hex value from
// 	 * @return	the hex representation of the color
// 	 */
// 	public static String hexValue(Color color) {
// 		return String.format("#%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue());
// 	}
// 	
// 	private static int roundColorValue(float value) {
// 		return Math.round(Math.max(0, Math.min(255, value)));
// 	}
// }


import java.awt.Component;
import java.awt.Graphics;
import javax.swing.Icon;
import javax.swing.UIManager;
import com.jvms.i18neditor.util.Colors;
package com.jvms.i18neditor.editor;




/**
 * This class represents a toggle icon for a translation tree cell.
 * 
 * @author Jacob van Mourik
 */
public class TranslationTreeToggleIcon implements Icon {
    private final static int SIZE = 10;
    private final ToggleIconType type;
    
    public enum ToggleIconType {
    	Collapsed, Expanded
    }
    
    public TranslationTreeToggleIcon(ToggleIconType type) {
        this.type = type;
    }
    
    @Override
    public void paintIcon(Component c, Graphics g, int x, int y) {
    	g.setColor(UIManager.getColor("Tree.background"));
// Path: src/main/java/com/jvms/i18neditor/util/Colors.java
// public final class Colors {
// 
// 	/**
// 	 * Multiplies the RGB values of a color with the given factor.
// 	 * 
// 	 * @param 	c the original color
// 	 * @param 	factor the factor to scale with
// 	 * @return 	the scaled color
// 	 */
// 	public static Color scale(Color c, float factor) {
// 		return new Color(
// 				roundColorValue(c.getRed()*factor), 
// 				roundColorValue(c.getGreen()*factor), 
// 				roundColorValue(c.getBlue()*factor),
// 				c.getAlpha());
// 	}
// 	
// 	/**
// 	 * Gets the hex representation of the RGB values of the given color.
// 	 * 
// 	 * @param 	color the color to get the hex value from
// 	 * @return	the hex representation of the color
// 	 */
// 	public static String hexValue(Color color) {
// 		return String.format("#%02x%02x%02x", color.getRed(), color.getGreen(), color.getBlue());
// 	}
// 	
// 	private static int roundColorValue(float value) {
// 		return Math.round(Math.max(0, Math.min(255, value)));
// 	}
// }


// Path: src/main/java/com/jvms/i18neditor/editor/TranslationTreeToggleIcon.java
import java.awt.Component;
import java.awt.Graphics;
import javax.swing.Icon;
import javax.swing.UIManager;
import com.jvms.i18neditor.util.Colors;

package com.jvms.i18neditor.editor;




/**
 * This class represents a toggle icon for a translation tree cell.
 * 
 * @author Jacob van Mourik
 */
public class TranslationTreeToggleIcon implements Icon {
    private final static int SIZE = 10;
    private final ToggleIconType type;
    
    public enum ToggleIconType {
    	Collapsed, Expanded
    }
    
    public TranslationTreeToggleIcon(ToggleIconType type) {
        this.type = type;
    }
    
    @Override
    public void paintIcon(Component c, Graphics g, int x, int y) {
    	g.setColor(UIManager.getColor("Tree.background"));
    	g.fillRect(x, y, SIZE, SIZE);