Java DTV API 1.3
18-Nov-2009

com.sun.dtv.ui
Class DTVContainerPattern

java.lang.Object
  extended by com.sun.dtv.ui.DTVContainerPattern

public class DTVContainerPattern
extends Object

The DTVContainerPattern is a means to describe the characteristics of a valid DTVContainer. After instantiation of this class an application can set all attributes as desired, while setting the DTV_CONTAINER_LOCATION and DTV_CONTAINER_DIMENSION is mandatory. The created DTVContainerPattern object can then be used as an argument to the DTVContainer.getBestDTVContainer(com.sun.dtv.ui.DTVContainerPattern) method in order to create a DTVContainer object that meets or exceeds what was requested in the DTVContainerPattern.


Field Summary
static int DTV_CONTAINER_DIMENSION
          A preference value for use in the setPreference, getPreferenceValue and getPriority methods in the DTVContainerPattern.
static int DTV_CONTAINER_LOCATION
          A preference value for use in the setPreference, getPreferenceValue and getPriority methods in the DTVContainerPattern.
static int DTV_CONTAINER_PLANE_SETUP
          A preference value for use in the setPreference, getPreferenceValue and getPriority methods in the DTVContainerPattern.
 
Constructor Summary
DTVContainerPattern()
           
 
Method Summary
 Object getPreferenceValue(int preference)
          Returns the preference value for the specified preference.
 int getPriority(int preference)
          Returns the preference priority for the specified preference.
 void setPreference(int preference, Object value, int priority)
          Sets the indicated preference to have the specified value with the specified priority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DTV_CONTAINER_PLANE_SETUP

public static final int DTV_CONTAINER_PLANE_SETUP
A preference value for use in the setPreference, getPreferenceValue and getPriority methods in the DTVContainerPattern. It indicates that the DTVContainer has to be created using the specified PlaneSetup.

See Also:
Constant Field Values

DTV_CONTAINER_DIMENSION

public static final int DTV_CONTAINER_DIMENSION
A preference value for use in the setPreference, getPreferenceValue and getPriority methods in the DTVContainerPattern. It indicates that the DTVContainer has the preferred dimension in pixels as specified in the provided Dimension object. Setting this preference field in an existing DTVContainerPattern is mandatory.

See Also:
Constant Field Values

DTV_CONTAINER_LOCATION

public static final int DTV_CONTAINER_LOCATION
A preference value for use in the setPreference, getPreferenceValue and getPriority methods in the DTVContainerPattern. It indicates that the DTVContainer has the preferred location in pixels as specified in the provided Point object. Setting this preference field in an existing DTVContainerPattern is mandatory.

See Also:
Constant Field Values
Constructor Detail

DTVContainerPattern

public DTVContainerPattern()
Method Detail

setPreference

public void setPreference(int preference,
                          Object value,
                          int priority)
                   throws IllegalArgumentException
Sets the indicated preference to have the specified value with the specified priority. A call to this method can be also used to overwrite values and priorities of previously set preferences.

Parameters:
preference - the preference to to be indicated. Valid values are DTV_CONTAINER_GRAPHICS_SETUP, DTV_CONTAINER_DIMENSION, and DTV_CONTAINER_LOCATION.
value - the value to be set for the indicated preference
priority - the priority of the indicated preference. Valid values are: REQUIRED, PREFERRED, and DONT_CARE
Throws:
IllegalArgumentException - if any of the parameters has an unappropriate value

getPreferenceValue

public Object getPreferenceValue(int preference)
                          throws IllegalArgumentException
Returns the preference value for the specified preference.

Parameters:
preference - the preference for which the value should be retrieved. Valid values are DTV_CONTAINER_PLANE_SETUP, DTV_CONTAINER_DIMENSION, and DTV_CONTAINER_LOCATION.
Returns:
the currently valid value for the specified preference. This should be a PlaneSetup object for DTV_CONTAINER_PLANE_SETUP, and a Dimension for DTV_CONTAINER_DIMENSION or DTV_CONTAINER_LOCATION
Throws:
IllegalArgumentException - if the paramter has an unappropriate value

getPriority

public int getPriority(int preference)
                throws IllegalArgumentException
Returns the preference priority for the specified preference.

Parameters:
preference - the preference for which the value should be retrieved. Valid values are DTV_CONTAINER_GRAPHICS_SETUP, DTV_CONTAINER_DIMENSION, and DTV_CONTAINER_LOCATION.
Returns:
the currently valid priority for the specified preference. Possible return values are: REQUIRED, PREFERRED, and DONT_CARE
Throws:
IllegalArgumentException - if the paramter has an unappropriate value

Java DTV API 1.3
18-Nov-2009

Copyright © 2008-2009 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.Products covered by and information contained in this service manual are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited.

DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.

Use of this document is subject to license terms.