|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ocap.system.EASModuleRegistrar
public class EASModuleRegistrar
An OCAP-J application can set and get a preferred attribute value of an EAS alert text. The capability method provides possible attribute values. And also, an OCAP-J application can set an EASHandler to be notified of a private descriptor indicating an alternative audio, if the alert_priority=15 but no audio specified by SCTE 18 is available. The OCAP implementation may throw an exception if a specified preference doesn't conform to FCC rules or the SCTE 18 specification. For example, some color combinations could make text unreadable. See http://www.fcc.gov/eb/eas/ for FCC rules.
See also Section 20 Baseline Functionality for detail on EAS functionality.
Field Summary | |
---|---|
static int |
EAS_ATTRIBUTE_BACK_COLOR
Indicates a background color attribute of an EAS alert text. |
static int |
EAS_ATTRIBUTE_BACK_OPACITY
Indicates a background opacity attribute of an EAS alert text. |
static int |
EAS_ATTRIBUTE_FONT_COLOR
Indicates a font color attribute of an EAS alert text. |
static int |
EAS_ATTRIBUTE_FONT_FACE
Indicates a font face attribute of an EAS alert text. |
static int |
EAS_ATTRIBUTE_FONT_OPACITY
Indicates a font opacity attribute of an EAS alert text. |
static int |
EAS_ATTRIBUTE_FONT_SIZE
Indicates a font size attribute of an EAS alert text. |
static int |
EAS_ATTRIBUTE_FONT_STYLE
Indicates a font style attribute of an EAS alert text. |
Constructor Summary | |
---|---|
protected |
EASModuleRegistrar()
A constructor of this class. |
Method Summary | |
---|---|
java.lang.Object |
getEASAttribute(int attribute)
This method returns a current attribute values applied to an EAS alert text on a screen. |
java.lang.Object[] |
getEASCapability(int attribute)
This method returns a possible attribute values applied to an EAS alert text on a screen. |
static EASModuleRegistrar |
getInstance()
This method returns a sole instance of the EASModuleRegistrar class. |
void |
registerEASHandler(EASHandler handler)
This method registers an EASHandler instance. |
void |
setEASAttribute(int[] attribute,
java.lang.Object[] value)
This method sets a preferred attribute values applied to an EAS alert text on a screen. |
void |
unregisterEASHandler()
This method unregisters the current registered EASHandler instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int EAS_ATTRIBUTE_FONT_COLOR
public static final int EAS_ATTRIBUTE_FONT_STYLE
public static final int EAS_ATTRIBUTE_FONT_FACE
public static final int EAS_ATTRIBUTE_FONT_SIZE
public static final int EAS_ATTRIBUTE_BACK_COLOR
public static final int EAS_ATTRIBUTE_FONT_OPACITY
public static final int EAS_ATTRIBUTE_BACK_OPACITY
Constructor Detail |
---|
protected EASModuleRegistrar()
getInstance()
method to create an
instance.
Method Detail |
---|
public static EASModuleRegistrar getInstance()
java.lang.SecurityException
- if the caller does not have
MonitorAppPermission("handler.eas").public void registerEASHandler(EASHandler handler)
This method registers an EASHandler instance. At most only one EASHandler instance can be registered. Multiple calls of this method replace the previous instance by a new one. By default, no instance is registered. If null is specified, this method do nothing and raise an exception.
java.lang.IllegalArgumentException
- if null is specified.public void unregisterEASHandler()
This method unregisters the current registered EASHandler instance. If no EASHandler instance has registered, do nothing.
public java.lang.Object[] getEASCapability(int attribute)
This method returns a possible attribute values applied to an EAS alert text on a screen. Note that the possible font attribute may be different from the possible font for Java application since the EAS may be implemented by native language.
attribute
- one of constants that has a prefix of EAS_ATTRIBUTE_
to specify an attribute to get possible values.
java.lang.IllegalArgumentException
- if the attribute is out of range.public void setEASAttribute(int[] attribute, java.lang.Object[] value)
This method sets a preferred attribute values applied to an EAS alert
text on a screen. If the specified attribute value is invalid, i.e.,
the value is not included in the return value of the
getEASCapability(int)
method, this method doesn't change current
attribute value and throw an exception. If the specified attribute is
EAS_ATTRIBUTE_FONT_OPACITY or EAS_ATTRIBUTE_BACK_OPACITY, this method accepts
any Float value and the OCAP implementation tries to apply it. The OCAP
implementation may not able to apply the specified opacity exactly.
Note that even if the application could set a preference successfully, the OCAP implementation may not apply it to an EAS message text on a screen if a conflict with FCC rule or SCTE 18 specification is found while displaying process.
attribute
- an array of constants that has a prefix of
EAS_ATTRIBUTE_ to specify an attribute.value
- an array of preferred attribute values to be set to an
alert text. The i-th item of the value array corresponds to
the i-th item of the attribute array.
java.lang.IllegalArgumentException
- if the attribute is out of range
or the value is not a possible value or if the specified
preference conflicts with FCC rules or SCTE 18. For example,
an EAS message is invisible since same color is specified to
a font and background. Criteria of visibility depends on
a manufacturer or a display device etc.public java.lang.Object getEASAttribute(int attribute)
This method returns a current attribute values applied to an EAS alert text on a screen.
attribute
- one of constants that has a prefix of EAS_ATTRIBUTE_
to specify an attribute to get current values.
java.lang.IllegalArgumentException
- if the attribute is out of range.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |