DESY ACOP Beans Home

com.cosylab.gui.components.util
Class PaintHelper

java.lang.Object
  extended by com.cosylab.gui.components.util.PaintHelper

public final class PaintHelper
extends java.lang.Object

Static helper class for painting standardised syimbols over existing Graphics objects. There is antialiasing switch for whole singelton helper class.

Version:
$id$
Author:
Jernej Kamenik

Method Summary
static java.awt.RenderingHints getAntialiasingHints()
          Returns rendering hints, which switches on antialiasing and high quality rendering.
static java.awt.Paint getLinePaint(java.awt.Color color)
          DOCUMENT ME!
static java.awt.Paint getRasterPaint(java.awt.Color color)
          DOCUMENT ME!
static boolean isEnhanced()
          If true then this singelton class paints all simbols with switcher aon high quality rendering.
static void main(java.lang.String[] args)
           
static void paintAlarm(java.awt.Graphics g, int x, int y, int alarmSize)
           
static void paintAlarmInvalid(java.awt.Graphics g, int x, int y, int alarmSize)
           
static void paintAlarmMajor(java.awt.Graphics g, int x, int y, int alarmSize)
           
static void paintAlarmMinor(java.awt.Graphics g, int x, int y, int alarmSize)
           
static void paintBumps(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color light, java.awt.Color dark)
           
static void paintDark(java.awt.Graphics g)
           
static void paintDark(java.awt.Graphics g, int x, int y, int width, int height)
           
static void paintDisabled(java.awt.Graphics g)
          Deprecated.  
static void paintDisabled(java.awt.Graphics g, int x, int y, int width, int height)
          Paints picture indicateing disabled state.
static void paintEmergency(java.awt.Graphics g, int x, int y, int emergencySize)
           
static void paintNetworkError(java.awt.Graphics g, int x, int y, int networkSize)
           
static void paintRectangle(java.awt.Graphics g, java.awt.Color color, float strokeWidth)
           
static void paintRectangle(java.awt.Graphics g, int x, int y, int width, int height, java.awt.Color color, float strokeWidth)
           
static void paintTimeout(java.awt.Graphics g, int x, int y, int clockSize, java.util.Date time)
           
static void paintWarning(java.awt.Graphics g, int x, int y, int warningSize)
           
static void setEnhanced(boolean antial)
          If set true then this singelton class paints all simbols with switcher aon high quality rendering.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAntialiasingHints

public static java.awt.RenderingHints getAntialiasingHints()
Returns rendering hints, which switches on antialiasing and high quality rendering.

Returns:
hints for high quality rendering

getRasterPaint

public static java.awt.Paint getRasterPaint(java.awt.Color color)
DOCUMENT ME!

Parameters:
color - DOCUMENT ME!
Returns:
DOCUMENT ME!

getLinePaint

public static java.awt.Paint getLinePaint(java.awt.Color color)
DOCUMENT ME!

Parameters:
color - DOCUMENT ME!
Returns:
DOCUMENT ME!

paintDisabled

public static void paintDisabled(java.awt.Graphics g)
Deprecated. 

Paints picture indicating disabled state.

Parameters:
g - 2D graphics to be painted on

paintDisabled

public static void paintDisabled(java.awt.Graphics g,
                                 int x,
                                 int y,
                                 int width,
                                 int height)
Paints picture indicateing disabled state.

Parameters:
g - 2D graphics to be painted on
x - the x coordinate of left upper corner of picture
y - the y coordinate of left upper corner of picture
width - the width of picture area
height - the heigth of picture area

paintDark

public static void paintDark(java.awt.Graphics g,
                             int x,
                             int y,
                             int width,
                             int height)
Parameters:
g -
x -
y -
width -
height -

paintDark

public static void paintDark(java.awt.Graphics g)
Parameters:
g -

paintTimeout

public static void paintTimeout(java.awt.Graphics g,
                                int x,
                                int y,
                                int clockSize,
                                java.util.Date time)
Parameters:
g -
x -
y -
clockSize -
time -

paintRectangle

public static void paintRectangle(java.awt.Graphics g,
                                  int x,
                                  int y,
                                  int width,
                                  int height,
                                  java.awt.Color color,
                                  float strokeWidth)
Parameters:
g -
x -
y -
width -
height -
color -
strokeWidth -

paintRectangle

public static void paintRectangle(java.awt.Graphics g,
                                  java.awt.Color color,
                                  float strokeWidth)
Parameters:
g -
color -
strokeWidth -

paintWarning

public static void paintWarning(java.awt.Graphics g,
                                int x,
                                int y,
                                int warningSize)
Parameters:
g -
x -
y -
warningSize -

paintAlarm

public static void paintAlarm(java.awt.Graphics g,
                              int x,
                              int y,
                              int alarmSize)
Parameters:
g -
x -
y -
alarmSize -

paintAlarmMinor

public static void paintAlarmMinor(java.awt.Graphics g,
                                   int x,
                                   int y,
                                   int alarmSize)
Parameters:
g -
x -
y -
alarmSize -

paintAlarmMajor

public static void paintAlarmMajor(java.awt.Graphics g,
                                   int x,
                                   int y,
                                   int alarmSize)
Parameters:
g -
x -
y -
alarmSize -

paintAlarmInvalid

public static void paintAlarmInvalid(java.awt.Graphics g,
                                     int x,
                                     int y,
                                     int alarmSize)
Parameters:
g -
x -
y -
alarmSize -

paintNetworkError

public static void paintNetworkError(java.awt.Graphics g,
                                     int x,
                                     int y,
                                     int networkSize)
Parameters:
g -
x -
y -
networkSize -

paintEmergency

public static void paintEmergency(java.awt.Graphics g,
                                  int x,
                                  int y,
                                  int emergencySize)

main

public static void main(java.lang.String[] args)

paintBumps

public static void paintBumps(java.awt.Graphics g,
                              int x,
                              int y,
                              int width,
                              int height,
                              java.awt.Color light,
                              java.awt.Color dark)

isEnhanced

public static boolean isEnhanced()
If true then this singelton class paints all simbols with switcher aon high quality rendering.

Returns:
if true all paintin is done with antialiasing rendering

setEnhanced

public static void setEnhanced(boolean antial)
If set true then this singelton class paints all simbols with switcher aon high quality rendering.

Parameters:
antial - new antialiasing flag


Copyright © 2010. All Rights Reserved.