net.sourceforge.barbecue.env
Class EnvironmentFactory

java.lang.Object
  extended bynet.sourceforge.barbecue.env.EnvironmentFactory

public class EnvironmentFactory
extends java.lang.Object

Factory class for getting hold of the current operating environment.

Author:
Ian Bourke

Constructor Summary
protected EnvironmentFactory()
          Cannot construct directly
 
Method Summary
static Environment getEnvironment()
          Returns the current operating environment.
static void setDefaultEnvironment(Environment newEnv)
          Sets the default environment for the factory.
static void setDefaultMode()
          Sets the factory to use the default (discovered) environment.
static void setHeadlessMode()
          Forces the factory to assume headless mode, regardless of whether this is actually true or not.
static void setNonAWTMode()
          Forces the factory to use the environment that does not access the AWT.
static void setNonAWTMode(int resolution)
          Forces the factory to use the environment that does not access the AWT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentFactory

protected EnvironmentFactory()
Cannot construct directly

Method Detail

getEnvironment

public static Environment getEnvironment()
Returns the current operating environment.

Returns:
The current environment

setHeadlessMode

public static void setHeadlessMode()
Forces the factory to assume headless mode, regardless of whether this is actually true or not.


setNonAWTMode

public static void setNonAWTMode()
Forces the factory to use the environment that does not access the AWT.


setNonAWTMode

public static void setNonAWTMode(int resolution)
Forces the factory to use the environment that does not access the AWT.

Parameters:
resolution - The desired (or current) screen/output resolution

setDefaultMode

public static void setDefaultMode()
Sets the factory to use the default (discovered) environment.


setDefaultEnvironment

public static void setDefaultEnvironment(Environment newEnv)
Sets the default environment for the factory. Use this to set your own environment implementation.

Parameters:
newEnv - The new default environment


Copyright © 2003-2007 barbecue.sourceforge.net. All Rights Reserved.