Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.utils
Class GraphicalUtils

java.lang.Object
  extended by com.ibm.etools.systems.application.visual.editor.utils.GraphicalUtils
All Implemented Interfaces:
IconRetriever

public class GraphicalUtils
extends Object
implements IconRetriever

Helper class for graphical functions.


Field Summary
static String copyright
           
 
Constructor Summary
GraphicalUtils()
          Constructor.
 
Method Summary
static void drawLine(Graphics graphics, Point p1, Point p2, Image image)
          Draw line.
 ColorRegistry getColorRegistry()
          Get color registry.
 Image getImage(String id, String size)
          Get image from icon service.
 ImageDescriptor getImageDescriptor(String id, String size)
          Get image descriptor.
 ImageRegistry getImageRegistry()
          Get image registry.
 Color getSystemColor(String color)
          Get system color.
 Image getSystemImage(String id, String size)
          Get image.
 ImageDescriptor getSystemImageDescriptor(String id, String size)
          Get system image descriptor.
 Image retrieveIcon(Artifact artifact, int flags)
          Retrieve icon from icon service.
static boolean setHelpId(Control control, String helpId)
          Set help ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

GraphicalUtils

public GraphicalUtils()
Constructor.

Method Detail

drawLine

public static void drawLine(Graphics graphics,
                            Point p1,
                            Point p2,
                            Image image)
Draw line.


getSystemImage

public Image getSystemImage(String id,
                            String size)
Get image.

Parameters:
id -
size -
Returns:

getSystemImageDescriptor

public ImageDescriptor getSystemImageDescriptor(String id,
                                                String size)
Get system image descriptor.

Parameters:
id -
size -
Returns:

getSystemColor

public Color getSystemColor(String color)
Get system color.

Parameters:
color -
Returns:

getImage

public Image getImage(String id,
                      String size)
Get image from icon service.

Specified by:
getImage in interface IconRetriever
Parameters:
id -
size -
Returns:

getImageRegistry

public ImageRegistry getImageRegistry()
Get image registry.

Returns:

getColorRegistry

public ColorRegistry getColorRegistry()
Get color registry.

Returns:

getImageDescriptor

public ImageDescriptor getImageDescriptor(String id,
                                          String size)
Get image descriptor.

Parameters:
id -
size -
Returns:

setHelpId

public static boolean setHelpId(Control control,
                                String helpId)
Set help ID.

Parameters:
control -
helpId -
Returns:

retrieveIcon

public Image retrieveIcon(Artifact artifact,
                          int flags)
Retrieve icon from icon service.

Specified by:
retrieveIcon in interface IconRetriever
Parameters:
artifact - the artifact whose icon to be retrieved
flags - the size hint

Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.