mirror of
https://github.com/anas-elgarhy/JColorfulConsole.git
synced 2024-08-14 23:57:19 +00:00
Fix default valu
This commit is contained in:
parent
139f951ebf
commit
645fb37233
3 changed files with 10 additions and 1 deletions
|
@ -2,10 +2,12 @@ package com.anas.jcolorfulconsole;
|
||||||
|
|
||||||
import com.anas.jcolorfulconsole.color.BackgroundColor;
|
import com.anas.jcolorfulconsole.color.BackgroundColor;
|
||||||
import com.anas.jcolorfulconsole.color.TextColor;
|
import com.anas.jcolorfulconsole.color.TextColor;
|
||||||
|
import com.anas.jcolorfulconsole.style.TextStyle;
|
||||||
|
|
||||||
public interface ConsoleManager {
|
public interface ConsoleManager {
|
||||||
void setTextColor(TextColor textColor);
|
void setTextColor(TextColor textColor);
|
||||||
void setBackgroundColor(BackgroundColor backgroundColor);
|
void setBackgroundColor(BackgroundColor backgroundColor);
|
||||||
|
void setTextStyle(TextStyle textStyle);
|
||||||
void addProperty(ConsoleProperty property);
|
void addProperty(ConsoleProperty property);
|
||||||
void removeProperty(ConsoleProperty property);
|
void removeProperty(ConsoleProperty property);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ public class ASCIIColor implements ConsoleProperty {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final ASCIIColor DEFAULT = new ASCIIColor((short)-1);
|
public static final ASCIIColor DEFAULT = new ASCIIColor((short)0);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public short getCode() {
|
public short getCode() {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.anas.jcolorfulconsole.ConsoleProperty;
|
||||||
import com.anas.jcolorfulconsole.color.BackgroundColor;
|
import com.anas.jcolorfulconsole.color.BackgroundColor;
|
||||||
import com.anas.jcolorfulconsole.color.TextColor;
|
import com.anas.jcolorfulconsole.color.TextColor;
|
||||||
import com.anas.jcolorfulconsole.stringmake.StringProcessor;
|
import com.anas.jcolorfulconsole.stringmake.StringProcessor;
|
||||||
|
import com.anas.jcolorfulconsole.style.TextStyle;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -18,6 +19,7 @@ public class DefaultConsoleManager implements ConsoleManager {
|
||||||
|
|
||||||
properties.add(TextColor.DEFAULT);
|
properties.add(TextColor.DEFAULT);
|
||||||
properties.add(BackgroundColor.DEFAULT);
|
properties.add(BackgroundColor.DEFAULT);
|
||||||
|
properties.add(TextStyle.DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -30,6 +32,11 @@ public class DefaultConsoleManager implements ConsoleManager {
|
||||||
properties.set(1, backgroundColor);
|
properties.set(1, backgroundColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setTextStyle(TextStyle textStyle) {
|
||||||
|
properties.set(2, textStyle);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addProperty(ConsoleProperty property) {
|
public void addProperty(ConsoleProperty property) {
|
||||||
properties.add(property);
|
properties.add(property);
|
||||||
|
|
Loading…
Reference in a new issue