Friday, March 23, 2012

Friday Fun Component XVI

Hi everybody,
time for some fun again...last monday i attended a meeting where some colleagues presented some piece of software. The software was a logfile analyzer and to make the results comparable they've added the so called score of the result. This is a simple integer between 1 and 5, where 1 is bad and 5 is very good.
This score thing reminded me on a graphic that i found on the web a few days ago and i decided to create a little component to visualize the score of something.
Long story short, here is the screenshot of the component...



The image above visualizes all available features of this component. Here are the available properties:


noOfArrows      setNoOfArrows(int) [3 - 10]
                getNoOfArrows()
score           setScore(int)
                getScore()
colorDirection  setColorDirection(ColorDirection) ColorDirection.RED_TO_GREEN
                                                  ColorDirection.GREEN_TO_RED
                getColorDirection()
textVisible     setTextVisible(boolean)
                isTextVisible()
textColor       setTextColor(Color)
                getTextColor()


And i think that's it with this component, like i said it's really simple but it might be useful for one or the other, so enjoy using it...
------------------------------------------------------
here is the binary and the NetBeans project:
binary:                 score.jar
NetBeans project: Score.zip
------------------------------------------------------

Enjoy the upcoming weekend and keep coding...

4 comments:

  1. Very nice.
    May I suggest a Component. A square rectangular led with text inside. You can see this can of stuff on the electrical panel of a train for example

    ReplyDelete
    Replies
    1. If you could send me an image I'll see what is possible... :)

      Delete
    2. I have send a drawing on your mail. I hope it will be ok (it is not very nice)

      Delete
    3. Ok, got it...seems to be an easy one...thx and stay tuned,
      Cheers,
      Gerrit

      Delete