|
SageTV Platform V7.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsage.api.WidgetAPI
public class WidgetAPI
Widget reflection API
| Method Summary | |
|---|---|
sage.Widget |
AddWidget(java.lang.String WidgetType)
Creates a new Widget of the specified type and adds it to the STV |
void |
AddWidgetChild(sage.Widget WidgetParent,
sage.Widget WidgetChild)
Creates a parent-child relationship between two Widgets. |
sage.Widget |
AddWidgetWithSymbol(java.lang.String WidgetType,
java.lang.String Symbol)
Creates a new Widget of the specified type and adds it to the STV. |
java.lang.Object |
EvaluateExpression(java.lang.String Expression)
Evaluates the passed in expression and returns the result. |
java.lang.Object |
ExecuteWidgetChain(sage.Widget Widget)
Executes a Widget and the chain of child Widgets underneath it |
java.lang.Object |
ExecuteWidgetChainInCurrentMenuContext(sage.Widget Widget)
Executes a Widget and the chain of child Widgets underneath it. |
sage.Widget |
FindWidgetBySymbol(java.lang.String Symbol)
Returns the Widget represented by the specified UID symbol |
sage.Widget[] |
GetAllWidgets()
Gets all of the Widgets that are in the currently loaded STV |
sage.Widget |
GetCurrentMenuWidget()
Gets the Widget the defines the menu that is currently loaded by the system |
java.lang.String |
GetCurrentSTVFile()
Gets the STV file that is currently loaded by the system |
java.io.File |
GetDefaultSTVFile()
Returns the file path for the default STV file |
java.lang.String |
GetSTVName()
Returns the value of the 'STVName' Attribute under the Global Theme Widget. |
java.lang.String |
GetSTVVersion()
Returns the value of the 'STVVersion' Attribute under the Global Theme Widget. |
sage.Widget |
GetUIWidgetContext()
Returns the Widget for the corresponding UI component that this execution originated from. |
sage.Widget |
GetWidgetChild(sage.Widget Widget,
java.lang.String Type,
java.lang.String Name)
Searches the children of the specified Widget for one with the specified type and name. |
sage.Widget[] |
GetWidgetChildren(sage.Widget Widget)
Gets the list of Widgets that are children of the specified Widget. |
sage.Widget[] |
GetWidgetMenuBackHistory()
Gets a list of the Widgets that have defined the menus that were recently displayed in the UI. |
sage.Widget[] |
GetWidgetMenuHistory()
Gets a list of the Widgets that have defined the menus that were recently displayed in the UI |
java.lang.String |
GetWidgetName(sage.Widget Widget)
Returns the name of the specified Widget |
sage.Widget |
GetWidgetParent(sage.Widget Widget,
java.lang.String Type,
java.lang.String Name)
Searches the parents of the specified Widget for one with the specified type and name. |
sage.Widget[] |
GetWidgetParents(sage.Widget Widget)
Gets the list of Widgets that are parents of the specified Widget. |
java.lang.String |
GetWidgetProperty(sage.Widget Widget,
java.lang.String PropertyName)
Returns the value for a specified property in a Widget |
sage.Widget[] |
GetWidgetsByType(java.lang.String WidgetType)
Gets all of the Widgets that are in the currently loaded STV that are of the specified type |
java.lang.String |
GetWidgetSymbol(sage.Widget Widget)
Returns the UID symbol for the specified Widget |
java.lang.String |
GetWidgetType(sage.Widget Widget)
Returns the type of a Widget |
boolean |
HasWidgetProperty(sage.Widget Widget,
java.lang.String PropertyName)
Returns true if the specified Widget has a property defined with the specified name |
java.lang.Object |
ImportSTVFile(java.io.File STVFile)
Imports a SageTV Application Definition file into the current STV file that is loaded. |
void |
InsertWidgetChild(sage.Widget WidgetParent,
sage.Widget WidgetChild,
int ChildIndex)
Creates a parent-child relationship between two Widgets. |
boolean |
IsSTVModified()
Returns true if the currently loaded STV has been modified at all since its last save |
boolean |
IsWidgetParentOf(sage.Widget WidgetParent,
sage.Widget WidgetChild)
Returns true if the specified Widgets have a parent-child relationship. |
void |
LaunchMenuWidget(sage.Widget Widget)
Launches a new menu in SageTV with the specified Widget as the menu's definition. |
java.lang.Object |
LoadSTVFile(java.io.File STVFile)
Loads a new SageTV Application Definition file that defines the entire user interface for SageTV |
void |
RemoveWidget(sage.Widget Widget)
Removes a Widget from the STV |
void |
RemoveWidgetChild(sage.Widget WidgetParent,
sage.Widget WidgetChild)
Breaks a parent-child relationships between two Widgets. |
boolean |
SaveWidgetsAsXML(java.io.File File,
boolean Overwrite)
Saves all of the current Widgets as an XML file. |
void |
SetWidgetName(sage.Widget Widget,
java.lang.String Name)
Sets the name for a Widget |
void |
SetWidgetProperty(sage.Widget Widget,
java.lang.String PropertyName,
java.lang.String PropertyValue)
Sets a property in a Widget to a specified value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public java.lang.Object LoadSTVFile(java.io.File STVFile)
STVFile - the new .stv file that should be loaded for the UI
public java.lang.Object ImportSTVFile(java.io.File STVFile)
STVFile - the .stv file that should be imported into the currently loaded one
public boolean IsSTVModified()
public sage.Widget[] GetAllWidgets()
public sage.Widget[] GetWidgetsByType(java.lang.String WidgetType)
public sage.Widget AddWidget(java.lang.String WidgetType)
WidgetType - the type of the new Widget
public sage.Widget AddWidgetWithSymbol(java.lang.String WidgetType,
java.lang.String Symbol)
WidgetType - the type of the new Widget
public void RemoveWidget(sage.Widget Widget)
Widget - the Widget (or a String which represents the symbol for that Widget) to remove
public void AddWidgetChild(sage.Widget WidgetParent,
sage.Widget WidgetChild)
WidgetParent - the Widget (or a String which represents the symbol for that Widget) that should be the parent in the relationshipWidgetChild - the Widget (or a String which represents the symbol for that Widget) that should be the child in the relationship
public void InsertWidgetChild(sage.Widget WidgetParent,
sage.Widget WidgetChild,
int ChildIndex)
WidgetParent - the Widget (or a String which represents the symbol for that Widget) that should be the parent in the relationshipWidgetChild - the Widget (or a String which represents the symbol for that Widget) that should be the child in the relationshipChildIndex - the 0-based index in the parent's child relationships list that the new relationship should occupy
public void RemoveWidgetChild(sage.Widget WidgetParent,
sage.Widget WidgetChild)
WidgetParent - the parent of the Widget (or a String which represents the symbol for that Widget) relationship to breakWidgetChild - the child of the Widget (or a String which represents the symbol for that Widget) relationship to break
public boolean IsWidgetParentOf(sage.Widget WidgetParent,
sage.Widget WidgetChild)
WidgetParent - the parent Widget (or a String which represents the symbol for that Widget) to testWidgetChild - the child Widget (or a String which represents the symbol for that Widget) to test
public java.lang.String GetWidgetType(sage.Widget Widget)
Widget - the Widget (or a String which represents the symbol for that Widget) object
public boolean HasWidgetProperty(sage.Widget Widget,
java.lang.String PropertyName)
Widget - the Widget object (or a String which represents the symbol for that Widget)PropertyName - the name of the property to check existence of
public void SetWidgetProperty(sage.Widget Widget,
java.lang.String PropertyName,
java.lang.String PropertyValue)
Widget - the Widget object (or a String which represents the symbol for that Widget)PropertyName - the name of the property to set in the WidgetPropertyValue - the value to set the property to
public java.lang.String GetWidgetProperty(sage.Widget Widget,
java.lang.String PropertyName)
Widget - the Widget object (or a String which represents the symbol for that Widget)PropertyName - the name of the property to get
public java.lang.String GetWidgetName(sage.Widget Widget)
Widget - the Widget object (or a String which represents the symbol for that Widget)
public void SetWidgetName(sage.Widget Widget,
java.lang.String Name)
Widget - the Widget object (or a String which represents the symbol for that Widget)Name - the value to set the name to for this Widgetpublic sage.Widget[] GetWidgetParents(sage.Widget Widget)
Widget - the Widget object (or a String which represents the symbol for that Widget)
public sage.Widget[] GetWidgetChildren(sage.Widget Widget)
Widget - the Widget object (or a String which represents the symbol for that Widget)
public java.lang.Object ExecuteWidgetChain(sage.Widget Widget)
Widget - the root of the Widget (or a String which represents the symbol for that Widget) action chain to execute
public java.lang.Object ExecuteWidgetChainInCurrentMenuContext(sage.Widget Widget)
Widget - the root of the Widget (or a String which represents the symbol for that Widget) action chain to execute
public void LaunchMenuWidget(sage.Widget Widget)
Widget - the Widget object (or a String which represents the symbol for that Widget) to use for the launched menu, this must be a Menu type Widgetpublic java.lang.String GetCurrentSTVFile()
public sage.Widget GetWidgetChild(sage.Widget Widget,
java.lang.String Type,
java.lang.String Name)
Widget - the Widget (or a String which represents the symbol for that Widget) who's children should be searchedType - the type of the Widget to search for, if null than any type will matchName - the name that the Widget to search for must match, if null than any name will match
public sage.Widget GetWidgetParent(sage.Widget Widget,
java.lang.String Type,
java.lang.String Name)
Widget - the Widget (or a String which represents the symbol for that Widget) who's parents should be searchedType - the type of the Widget to search for, if null than any type will matchName - the name that the Widget to search for must match, if null than any name will match
public sage.Widget GetCurrentMenuWidget()
public sage.Widget[] GetWidgetMenuHistory()
public sage.Widget[] GetWidgetMenuBackHistory()
GetWidgetMenuHistory() this only returns Menus that are
'Back' (not Forward) in the navigations the user has performed. Similar to getting only the 'Back'
history in a web browser.
public java.lang.Object EvaluateExpression(java.lang.String Expression)
Expression - the expression string to evaluate
public boolean SaveWidgetsAsXML(java.io.File File,
boolean Overwrite)
File - the file to write toOverwrite - if true then if the File exists it will be overwritten
public java.lang.String GetWidgetSymbol(sage.Widget Widget)
Widget - the Widget object
public sage.Widget FindWidgetBySymbol(java.lang.String Symbol)
Symbol - the UID symbol to lookup the Widget for
public java.io.File GetDefaultSTVFile()
public sage.Widget GetUIWidgetContext()
public java.lang.String GetSTVName()
public java.lang.String GetSTVVersion()
|
SageTV Platform V7.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||