WesleyyC / Image-Editor

A command line image editor written in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add text color to make the output more visually pleasant

SerinaTan opened this issue · comments

Now that we have a whole lot of outputs such as error message, logs and stuff, I guess we can add some colors to different kinds of output.

For the sake of reference... http://stackoverflow.com/questions/5762491/how-to-print-color-in-console-using-system-out-println

Haha, this sounds like a good idea!

Since we are working on the output, I think it is a good time to move all the println from the image editor to the editor, since it is the editor that the user interacts with.

Yea agreed. I had that thought before too. But then it seems like a big change. LOL. But I am sure we can do that. I will make the change bit by bit... Starting with the writeImage method since I am still working on the save path ticket.

Actually, I am thinking about something crazy at this point... How about making an enum class containing all the error message matching up with the error code? Then when we deal with whatever function in TheImage class, we can simply spit out the corresponding error code back to the Editor. Then Editor can print out the associated error message to the console. The drawback of this is quite obvious though... the code might not be very readable.

screen shot 2014-11-16 at 3 38 52 pm

Looks a lot better :p I created an enum class just for the sake of... FUN :D