org.universAAL.support.utils.ui
Class Media

Package class diagram package Media
java.lang.Object
  extended by org.universAAL.support.utils.ui.Control
      extended by org.universAAL.support.utils.ui.Media

public class Media
extends Control

Class representing a Multimedia Output UI element. Multimedia Output can be of different types and their display depends completely on the UI renderer (a voice renderer cannot display an image). The output is represented as a String URL in the Resource server.

Example render:

        __________
 Label |          |
       |    :)    |
       |__________|
 

Author:
alfiva

Field Summary
 
Fields inherited from class org.universAAL.support.utils.ui.Control
help, hint, label, MY_NAMESPACE, ref
 
Constructor Summary
Media()
          Generic empty constructor.
Media(String url)
          Constructor with only the url.
Media(String label, String url)
          Constructor with the URL value.
Media(String label, String url, String type)
          Constructor with the URL value.
 
Method Summary
 String[] create(Group group)
          This method is for internal use of utils only.
 String getType()
          Get the type of media element of the value.
 String getUrl()
          Get the URL to the the value to be displayed, from the Resource server.
 void setType(String type)
          Set the type of media element of the value.
 void setUrl(String url)
          Set the URL to the the value to be displayed, from the Resource server.
 
Methods inherited from class org.universAAL.support.utils.ui.Control
getHelp, getHint, getLabel, getReference, setHelp, setHint, setLabel, setReference, setReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Media

public Media()
Generic empty constructor. The Output will be generated with default values (empty).


Media

public Media(String url)
Constructor with only the url. All other properties of the input are set to defaults (empty image).

Parameters:
url - The URL to the value to be displayed, from the Resource server.

Media

public Media(String label,
             String url)
Constructor with the URL value.

Parameters:
label - The label text that identifies the output to the user.
url - The URL to the value to be displayed, from the Resource server.

Media

public Media(String label,
             String url,
             String type)
Constructor with the URL value.

Parameters:
label - The label text that identifies the output to the user.
url - The URL to the value to be displayed, from the Resource server.
type - The type of media element. By default it's IMG.
Method Detail

create

public String[] create(Group group)
Description copied from class: Control
This method is for internal use of utils only. It creates the actual official uaal control configured with the properties defined by this class. Once it is created it cannot be modified.

Specified by:
create in class Control
Parameters:
group - The UI group to which the control is being added.
Returns:
An array of Strings representing the property path used to identify the control in the response. This is only of interest for Input Controls. Submits and Triggers have only one String value. If the path has not been set manually by the time this method is called, an automatic one must be generated.

getUrl

public String getUrl()
Get the URL to the the value to be displayed, from the Resource server.

Returns:
The URL

setUrl

public void setUrl(String url)
Set the URL to the the value to be displayed, from the Resource server.

Parameters:
url - The URL

getType

public String getType()
Get the type of media element of the value.

Returns:
The media type

setType

public void setType(String type)
Set the type of media element of the value.

Parameters:
type - The media type


Copyright © 2014 universAAL Consortium. All Rights Reserved.