com.nutiteq.components
Interface Label

All Known Implementing Classes:
PlaceLabel

public interface Label


Method Summary
 java.lang.String getLabel()
          String representation of this label
 Point getViewUpdate(int screenX, int screenY, int displayWidth, int displayHeight)
          Get pixels needed for proper label display.
 void labelClicked(int screenX, int screenY, int displayWidth, int displayHeight, int clickX, int clickY)
          Notify label about the click and click location on screen
 void paint(Graphics g, int screenX, int screenY, int displayWidth, int displayHeight)
          Paint label to screen
 boolean pointOnLabel(int screenX, int screenY, int displayWidth, int displayHeight, int pointX, int pointY)
          Is given screen point on label
 

Method Detail

getLabel

java.lang.String getLabel()
String representation of this label

Returns:
label as string

paint

void paint(Graphics g,
           int screenX,
           int screenY,
           int displayWidth,
           int displayHeight)
Paint label to screen

Parameters:
g - graphics object to be drawn on
screenX - place x location on screen
screenY - place y location on screen
displayWidth - available display width
displayHeight - available display height

pointOnLabel

boolean pointOnLabel(int screenX,
                     int screenY,
                     int displayWidth,
                     int displayHeight,
                     int pointX,
                     int pointY)
Is given screen point on label

Parameters:
screenX - place x location on screen
screenY - place y location on screen
displayWidth - available display width
displayHeight - available display height
pointX - point location x on display
pointY - point location y on display
Returns:
true if point on label

labelClicked

void labelClicked(int screenX,
                  int screenY,
                  int displayWidth,
                  int displayHeight,
                  int clickX,
                  int clickY)
Notify label about the click and click location on screen

Parameters:
screenX - place x location on screen
screenY - place y location on screen
displayWidth - available display width
displayHeight - available display height
clickX - click location x on display
clickY - click location y on display

getViewUpdate

Point getViewUpdate(int screenX,
                    int screenY,
                    int displayWidth,
                    int displayHeight)
Get pixels needed for proper label display.

Parameters:
screenX - object location x on screen
screenY - object location y on screen
displayWidth - available display width
displayHeight - available display height
Returns:
pixel (x/y) required for proper display