Color skins

Basic skin set to new Oceanic
Error log Frame now skinned
This commit is contained in:
Jindra Petřík
2015-04-14 22:26:07 +02:00
parent 33395b0e5c
commit 707e86ac4e
18 changed files with 755 additions and 43 deletions

View File

@@ -50,6 +50,10 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.swing.JLabel;
import javax.swing.JPanel;
import org.pushingpixels.substance.api.ColorSchemeAssociationKind;
import org.pushingpixels.substance.api.ComponentState;
import org.pushingpixels.substance.api.DecorationAreaType;
import org.pushingpixels.substance.api.SubstanceLookAndFeel;
/**
*
@@ -188,9 +192,13 @@ public class FolderPreviewPanel extends JPanel {
JLabel l = new JLabel();
Font f = l.getFont().deriveFont(AffineTransform.getScaleInstance(0.8, 0.8));
int finish_y = (int) Math.ceil((r.y + r.height) / (float) CELL_HEIGHT);
g.setColor(Color.black);
Color color = new Color(0xd9, 0xe8, 0xfb);
Color selectedColor = new Color(0xfe, 0xca, 0x81);
Color color = SubstanceLookAndFeel.getCurrentSkin().getColorScheme(DecorationAreaType.GENERAL, ColorSchemeAssociationKind.FILL, ComponentState.ENABLED).getBackgroundFillColor();
Color selectedColor = SubstanceLookAndFeel.getCurrentSkin().getColorScheme(DecorationAreaType.GENERAL, ColorSchemeAssociationKind.FILL, ComponentState.ROLLOVER_SELECTED).getBackgroundFillColor();
Color borderColor = SubstanceLookAndFeel.getCurrentSkin().getColorScheme(DecorationAreaType.GENERAL, ColorSchemeAssociationKind.BORDER, ComponentState.ROLLOVER_SELECTED).getUltraDarkColor();
Color textColor = SubstanceLookAndFeel.getCurrentSkin().getColorScheme(DecorationAreaType.GENERAL, ColorSchemeAssociationKind.FILL, ComponentState.ROLLOVER_SELECTED).getForegroundColor();
//g.setColor(SubstanceLookAndFeel.getCurrentSkin().getColorScheme(DecorationAreaType.GENERAL, ColorSchemeAssociationKind.FILL, ComponentState.ENABLED));
for (int y = start_y; y <= finish_y; y++) {
for (int x = 0; x < cols; x++) {
int index = y * cols + x;
@@ -222,10 +230,12 @@ public class FolderPreviewPanel extends JPanel {
s = treeItem.toString();
}
g.setFont(f);
g.setColor(Color.black);
g.setColor(borderColor);
g.drawLine(x * CELL_WIDTH, y * CELL_HEIGHT + BORDER_SIZE + PREVIEW_SIZE, x * CELL_WIDTH + CELL_WIDTH, y * CELL_HEIGHT + BORDER_SIZE + PREVIEW_SIZE);
g.drawString(s, x * CELL_WIDTH + BORDER_SIZE, y * CELL_HEIGHT + BORDER_SIZE + PREVIEW_SIZE + LABEL_HEIGHT);
g.drawRect(x * CELL_WIDTH, y * CELL_HEIGHT, CELL_WIDTH, CELL_HEIGHT);
g.setColor(textColor);
g.drawString(s, x * CELL_WIDTH + BORDER_SIZE, y * CELL_HEIGHT + BORDER_SIZE + PREVIEW_SIZE + LABEL_HEIGHT);
}
}
}