com.tensegrity.graphics
Class GraphicConfiguration

java.lang.Object
  extended bycom.tensegrity.graphics.GraphicConfiguration

public final class GraphicConfiguration
extends java.lang.Object

The GraphicConfiguration class holds the information that configurates the graphic environment of the graphics API.
NOTICE:Currently this information is stored globally (means the graphic environment is actually configurable within the scope of a java runtime environment) but this will be changed in a former release of the graphics API such that this information is stored application wide.

Version:
$Id: GraphicConfiguration.java,v 1.9 2006/05/02 14:25:20 MichaelKegel Exp $
Author:
MichaelKegel

Constructor Summary
GraphicConfiguration()
          Constructor for GraphicConfiguration.
 
Method Summary
static ImageOperations getImageOperationsInstance()
          Returns the ImageOperations instance that is currently registered.
static TextOperations getTextOperationsInstance()
          Returns the TextOperations instance that is currently registered.
static boolean isImageOperationsInstanceRegistered()
          Returns a boolean that indicates whether an implementation of ImageOperations is registered at this GraphicConfiguration or not
static boolean isTextOperationsInstanceRegistered()
          Returns a boolean that indicates whether an implementation of TextOpertions is registered at this GraphicConfiguration or not
static boolean isUseSingleLineCalc()
          Return true, to enable new single line calculations
static void registerImageOperationsInstance(ImageOperations imageoperations)
          Registers an instance of a ImageOperations class such that it is used by the graphics API for operations on images.
static void registerTextOperationsInstance(TextOperations textoperations)
          Registers an instance of a TextOperations class such that it is used by the graphics API for operations on text.
static void setUseSingleLineCalc(boolean useSingleLineCalc)
          Enabled/disables the more accurate text bounds calculation for single line texts.
static void unregisterImageOperationsInstance()
          Unregisters the currently registered instance of an ImageOperations class such that it is no longer used by the graphics API for operations on images.
static void unregisterTextOperationsInstance()
          Unregisters the currently registered instance of an TextOpertions class such that it is no longer used by the graphics API for operations on text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicConfiguration

public GraphicConfiguration()
Constructor for GraphicConfiguration.

Method Detail

registerTextOperationsInstance

public static final void registerTextOperationsInstance(TextOperations textoperations)
Registers an instance of a TextOperations class such that it is used by the graphics API for operations on text.

Parameters:
textoperations - the instance of the TextOperations class to register
See Also:
TextOperations

unregisterTextOperationsInstance

public static final void unregisterTextOperationsInstance()
Unregisters the currently registered instance of an TextOpertions class such that it is no longer used by the graphics API for operations on text.


isTextOperationsInstanceRegistered

public static final boolean isTextOperationsInstanceRegistered()
Returns a boolean that indicates whether an implementation of TextOpertions is registered at this GraphicConfiguration or not

Returns:
boolean flag that indicates whether an instance of TextOperations is registered
See Also:
TextOperations

getTextOperationsInstance

public static final TextOperations getTextOperationsInstance()
Returns the TextOperations instance that is currently registered.

Returns:
TextOperations the currently registered TextOperations instance

registerImageOperationsInstance

public static final void registerImageOperationsInstance(ImageOperations imageoperations)
Registers an instance of a ImageOperations class such that it is used by the graphics API for operations on images.

Parameters:
imageoperations - the instance of the ImageOperations class to register
See Also:
ImageOperations

unregisterImageOperationsInstance

public static final void unregisterImageOperationsInstance()
Unregisters the currently registered instance of an ImageOperations class such that it is no longer used by the graphics API for operations on images.


isImageOperationsInstanceRegistered

public static final boolean isImageOperationsInstanceRegistered()
Returns a boolean that indicates whether an implementation of ImageOperations is registered at this GraphicConfiguration or not

Returns:
boolean flag that indicates whether an instance of ImageOperations is registered
See Also:
ImageOperations

getImageOperationsInstance

public static final ImageOperations getImageOperationsInstance()
Returns the ImageOperations instance that is currently registered.

Returns:
ImageOperations the currently registered ImageOperations instance

setUseSingleLineCalc

public static final void setUseSingleLineCalc(boolean useSingleLineCalc)
Enabled/disables the more accurate text bounds calculation for single line texts.

Parameters:
useSingleLineCalc - true, to enable the calculation for single line texts

isUseSingleLineCalc

public static final boolean isUseSingleLineCalc()
Return true, to enable new single line calculations

Returns:
true, to enable new single line calculations


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.