Improve the code

This commit is contained in:
Anas Elgarhy 2022-03-24 19:33:41 +02:00
parent 7229a846e0
commit 0ef2595b25
2 changed files with 18 additions and 15 deletions

View file

@ -1,42 +1,43 @@
package com.anas.jcolorfulconsole;
import com.anas.jcolorfulconsole.color.ASCIIColor;
import com.anas.jcolorfulconsole.color.BackgroundColor;
import com.anas.jcolorfulconsole.color.TextColor;
public interface ConsoleManger {
void setColor(ConsoleProperty property);
void setBackgroundColor(ASCIIColor color);
void setColor(TextColor textColor);
void setBackgroundColor(BackgroundColor backgroundColor);
void setProperty(ConsoleProperty property);
void print(String text);
void print(String text, ConsoleProperty property);
void print(String text, ConsoleProperty... properties);
void println(String text);
void println(String text, ConsoleProperty property);
void println(String text, ConsoleProperty... properties);
void println();
void print(char c);
void print(char c, ConsoleProperty property);
void print(char c, ConsoleProperty... properties);
void println(char c);
void println(char c, ConsoleProperty property);
void println(char c, ConsoleProperty... properties);
void print(int i);
void print(int i, ConsoleProperty property);
void print(int i, ConsoleProperty... properties);
void println(int i);
void println(int i, ConsoleProperty property);
void println(int i, ConsoleProperty... properties);
void print(double d);
void print(double d, ConsoleProperty property);
void print(double d, ConsoleProperty... properties);
void println(double d);
void println(double d, ConsoleProperty property);
void println(double d, ConsoleProperty... properties);
void print(boolean b);
void print(boolean b, ConsoleProperty property);
void print(boolean b, ConsoleProperty... properties);
void println(boolean b);
void println(boolean b, ConsoleProperty property);
void println(boolean b, ConsoleProperty... properties);
void print(Object o);
void print(Object o, ConsoleProperty property);
void print(Object o, ConsoleProperty... properties);
void println(Object o);
void println(Object o, ConsoleProperty property);
void println(Object o, ConsoleProperty... properties);
void printf(String format, Object... args);
}

View file

@ -12,6 +12,8 @@ public class TextColor extends ASCIIColor {
public static final TextColor DARK_WHITE = new TextColor((short)0);
public static final TextColor DARK_GRY = new TextColor((short)47);
public static final TextColor TRANSPARENT = new TextColor((short)2);
public static final TextColor LIGHT_BLACK = new TextColor((short)90);
public static final TextColor LIGHT_RED = new TextColor((short)91);
public static final TextColor LIGHT_GREEN = new TextColor((short)92);